Updated Rector to commit db7859576b5da879bca918d9964ff1656ca9ddd1

db7859576b [phpstan] fix next ingored errors (#6572)
This commit is contained in:
Tomas Votruba 2024-12-12 17:14:38 +00:00
parent 54e8e488b0
commit f6e5db3520
8 changed files with 5 additions and 11 deletions

View File

@ -87,7 +87,7 @@ final class AutoloadIncluder
if (\in_array($filePath, $this->alreadyLoadedAutoloadFiles, \true)) {
return;
}
/** @var string $realPath always string after file_exists() check */
/** @var non-empty-string $realPath always string after file_exists() check */
$realPath = \realpath($filePath);
$this->alreadyLoadedAutoloadFiles[] = $realPath;
require_once $filePath;

View File

@ -32,6 +32,5 @@ final class ReturnTypeInferer
return new MixedType();
}
return $originalType;
// return $this->typeNormalizer->normalizeArrayTypeAndArrayNever($originalType);
}
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '7e6353dcf625ee4cc474cde8266baac10c9368da';
public const PACKAGE_VERSION = 'db7859576b5da879bca918d9964ff1656ca9ddd1';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-12-12 18:07:34';
public const RELEASE_DATE = '2024-12-12 17:12:12';
/**
* @var int
*/

View File

@ -39,9 +39,9 @@ final class BootstrapFilesIncluder
return;
}
$dir = new RecursiveDirectoryIterator($stubsRectorDirectory, RecursiveDirectoryIterator::SKIP_DOTS);
/** @var SplFileInfo[] $stubs */
$stubs = new RecursiveIteratorIterator($dir);
foreach ($stubs as $stub) {
/** @var SplFileInfo $stub */
require_once $stub->getRealPath();
}
}

View File

@ -82,7 +82,6 @@ final class ChangedFilesDetector
}
private function resolvePath(string $filePath) : string
{
/** @var string|false $realPath */
$realPath = \realpath($filePath);
if ($realPath === \false) {
return $filePath;

View File

@ -4,7 +4,6 @@ declare (strict_types=1);
namespace Rector\PHPStanStaticTypeMapper\TypeMapper;
use PhpParser\Node\Identifier;
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
@ -150,7 +149,7 @@ final class ArrayTypeMapper implements TypeMapperInterface
}
// @see https://github.com/phpstan/phpdoc-parser/blob/98a088b17966bdf6ee25c8a4b634df313d8aa531/tests/PHPStan/Parser/PhpDocParserTest.php#L2692-L2696
foreach ($genericTypes as $genericType) {
/** @var Node $genericType */
/** @var TypeNode $genericType */
$genericType->setAttribute(self::HAS_GENERIC_TYPE_PARENT, $withKey);
}
$identifierTypeNode->setAttribute(self::HAS_GENERIC_TYPE_PARENT, $withKey);

View File

@ -14,7 +14,6 @@ final class FnMatchPathNormalizer
return '*' . \trim($path, '*') . '*';
}
if (\strpos($path, '..') !== \false) {
/** @var string|false $realPath */
$realPath = \realpath($path);
if ($realPath === \false) {
return '';

View File

@ -8,12 +8,10 @@ final class RealpathMatcher
{
public function match(string $matchingPath, string $filePath) : bool
{
/** @var string|false $realPathMatchingPath */
$realPathMatchingPath = \realpath($matchingPath);
if ($realPathMatchingPath === \false) {
return \false;
}
/** @var string|false $realpathFilePath */
$realpathFilePath = \realpath($filePath);
if ($realpathFilePath === \false) {
return \false;