PATH:
opt
/
cpanel
/
ea-wappspector
/
vendor
/
slevomat
/
coding-standard
/
SlevomatCodingStandard
/
Helpers
<?php declare(strict_types = 1); namespace SlevomatCodingStandard\Helpers; use Exception; use function preg_last_error; use function preg_match; /** * @internal */ class TypeHelper { /** * Validates type name according to the allowed characters in type names + namespaces * * @link http://php.net/manual/en/language.oop5.basic.php */ public static function isTypeName(string $typeName): bool { $result = preg_match( '~^\\\\?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*$~', $typeName, ); if ($result === false) { // @codeCoverageIgnoreStart throw new Exception('PREG error ' . preg_last_error()); // @codeCoverageIgnoreEnd } return $result !== 0; } }
[-] Attribute.php
[edit]
[-] ArrayHelper.php
[edit]
[-] TernaryOperatorHelper.php
[edit]
[-] ConstantHelper.php
[edit]
[-] CatchHelper.php
[edit]
[+]
..
[-] TypeHint.php
[edit]
[-] ConditionHelper.php
[edit]
[-] IndentationHelper.php
[edit]
[-] SuppressHelper.php
[edit]
[-] TokenPointerOutOfBoundsException.php
[edit]
[-] VariableHelper.php
[edit]
[-] StringHelper.php
[edit]
[-] TypeHintHelper.php
[edit]
[-] AnnotationHelper.php
[edit]
[-] SniffLocalCache.php
[edit]
[-] ReferencedNameHelper.php
[edit]
[-] NamespaceHelper.php
[edit]
[-] ScopeHelper.php
[edit]
[-] ParameterHelper.php
[edit]
[-] AnnotationTypeHelper.php
[edit]
[-] TokenHelper.php
[edit]
[-] DocCommentHelper.php
[edit]
[-] AttributeHelper.php
[edit]
[-] Comment.php
[edit]
[-] SniffSettingsHelper.php
[edit]
[-] UseStatement.php
[edit]
[-] FunctionHelper.php
[edit]
[-] YodaHelper.php
[edit]
[-] IdentificatorHelper.php
[edit]
[-] PropertyHelper.php
[edit]
[-] UseStatementHelper.php
[edit]
[-] FixerHelper.php
[edit]
[-] PhpDocParserHelper.php
[edit]
[-] CommentHelper.php
[edit]
[-] Annotation.php
[edit]
[-] ArrayKeyValue.php
[edit]
[-] TypeHelper.php
[edit]
[-] ClassHelper.php
[edit]
[-] ParsedDocComment.php
[edit]
[-] EmptyFileException.php
[edit]
[-] ReferencedName.php
[edit]