Updated Rector to commit 6d408f520f1766ba4450d057e6e10c0ffbfa9275

6d408f520f [Performance] Use strlen() early before loop on VendorMissAnalyseGuard (#5597)
This commit is contained in:
Tomas Votruba 2024-02-10 13:42:27 +00:00
parent 54904b716f
commit f2b6b79e92
2 changed files with 4 additions and 4 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '77ec96e4e8ec9e3a1d514df878e6eadcd199feb8';
public const PACKAGE_VERSION = '6d408f520f1766ba4450d057e6e10c0ffbfa9275';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-02-10 20:35:32';
public const RELEASE_DATE = '2024-02-10 13:40:21';
/**
* @var int
*/

View File

@ -32,10 +32,10 @@ final class VendorMissAnalyseGuard
*/
private function containsVendorPath(array $filePaths) : bool
{
$cwd = PathNormalizer::normalize(\getcwd());
$cwdLength = \strlen(PathNormalizer::normalize(\getcwd()));
foreach ($filePaths as $filePath) {
$normalizedPath = PathNormalizer::normalize(\realpath($filePath));
if (\strncmp(\substr($normalizedPath, \strlen($cwd)), '/vendor/', \strlen('/vendor/')) === 0) {
if (\strncmp(\substr($normalizedPath, $cwdLength), '/vendor/', \strlen('/vendor/')) === 0) {
return \true;
}
}