mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-05 19:00:49 +00:00
Updated Rector to commit 6d408f520f1766ba4450d057e6e10c0ffbfa9275
6d408f520f
[Performance] Use strlen() early before loop on VendorMissAnalyseGuard (#5597)
This commit is contained in:
parent
54904b716f
commit
f2b6b79e92
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user