REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.28 KB
Close
//opt/cpanel/ea-wappspector/vendor/rector/rector/rules/Naming/NamingConvention/NamingConventionAnalyzer.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\Naming\NamingConvention; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; use Rector\NodeNameResolver\NodeNameResolver; use Rector\Util\StringUtils; final class NamingConventionAnalyzer { /** * @readonly * @var \Rector\NodeNameResolver\NodeNameResolver */ private $nodeNameResolver; public function __construct(NodeNameResolver $nodeNameResolver) { $this->nodeNameResolver = $nodeNameResolver; } /** * Matches cases: * * $someNameSuffix = $this->getSomeName(); * $prefixSomeName = $this->getSomeName(); * $someName = $this->getSomeName(); * @param \PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall $expr */ public function isCallMatchingVariableName($expr, string $currentName, string $expectedName) : bool { // skip "$call = $method->call();" based conventions $callName = $this->nodeNameResolver->getName($expr->name); if ($currentName === $callName) { return \true; } // starts with or ends with return StringUtils::isMatch($currentName, '#^(' . $expectedName . '|' . $expectedName . '$)#i'); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 1
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
NamingConventionAnalyzer.php
1.28 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).