File manager - Edit - /var/www/payraty/helpdesk/vendor/rector/rector/rules/CodingStyle/Reflection/VendorLocationDetector.php
Back
<?php declare (strict_types=1); namespace Rector\CodingStyle\Reflection; use PHPStan\Reflection\MethodReflection; use RectorPrefix202208\Symplify\SmartFileSystem\Normalizer\PathNormalizer; final class VendorLocationDetector { /** * @readonly * @var \Symplify\SmartFileSystem\Normalizer\PathNormalizer */ private $pathNormalizer; public function __construct(PathNormalizer $pathNormalizer) { $this->pathNormalizer = $pathNormalizer; } public function detectMethodReflection(MethodReflection $methodReflection) : bool { $declaringClassReflection = $methodReflection->getDeclaringClass(); $fileName = $declaringClassReflection->getFileName(); // probably internal if ($fileName === null) { return \false; } $normalizedFileName = $this->pathNormalizer->normalizePath($fileName); return \strpos($normalizedFileName, '/vendor/') !== \false; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings