Helpers
final class Helpers
| internal |
Constants
| ReIdentifier |
|
| Keywords |
|
| PHP_IDENT |
|
| KEYWORDS |
|
Methods
static string
formatDocComment(string $content, bool $forceMultiLine = false)
No description
static string
tagName(string $name, string $of = PhpNamespace::NameNormal)
No description
static string
simplifyTaggedNames(string $code, PhpNamespace|null $namespace)
No description
static string
unformatDocComment(string $comment)
No description
static string
unindent(string $s, int $level = 1)
No description
static bool
isIdentifier(mixed $value)
No description
static bool
isNamespaceIdentifier(mixed $value, bool $allowLeadingSlash = false)
No description
static string
extractNamespace(string $name)
No description
static string
extractShortName(string $name)
No description
static string
tabsToSpaces(string $s, int $count = 4)
No description
static object
createObject(string $class, array $props)
No description
static string|null
validateType(string|null $type, bool $nullable = false)
Validates a type declaration. Strips the leading '?' and sets $nullable=true for nullable shorthand.
Details
at line 48
static string
formatDocComment(string $content, bool $forceMultiLine = false)
No description
at line 64
static string
tagName(string $name, string $of = PhpNamespace::NameNormal)
No description
at line 72
static string
simplifyTaggedNames(string $code, PhpNamespace|null $namespace)
No description
at line 83
static string
unformatDocComment(string $comment)
No description
at line 89
static string
unindent(string $s, int $level = 1)
No description
at line 97
static bool
isIdentifier(mixed $value)
No description
at line 103
static bool
isNamespaceIdentifier(mixed $value, bool $allowLeadingSlash = false)
No description
at line 110
static string
extractNamespace(string $name)
No description
at line 116
static string
extractShortName(string $name)
No description
at line 124
static string
tabsToSpaces(string $s, int $count = 4)
No description
at line 135
static object
createObject(string $class, array $props)
| internal |
No description
at line 145
static string|null
validateType(string|null $type, bool $nullable = false)
Validates a type declaration. Strips the leading '?' and sets $nullable=true for nullable shorthand.
Returns null for empty/null types.
Traits
StaticClass