Skip to content

Commit d72c810

Browse files
committed
Updated Rector to commit c78e255cf9cb17cedead84ff8a54f421f563942d
rectorphp/rector-src@c78e255 Fix @return docblock on IfManipulator (#3239)
1 parent 1013215 commit d72c810

16 files changed

Lines changed: 134 additions & 125 deletions

File tree

packages/BetterPhpDocParser/PhpDocParser/ClassAnnotationMatcher.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Identifier;
88
use PhpParser\Node\Stmt\GroupUse;
9+
use PhpParser\Node\Stmt\Property;
910
use PhpParser\Node\Stmt\Use_;
1011
use PHPStan\Analyser\Scope;
1112
use PHPStan\Reflection\ReflectionProvider;
@@ -42,9 +43,9 @@ public function __construct(UseImportNameMatcher $useImportNameMatcher, UseImpor
4243
$this->useImportsResolver = $useImportsResolver;
4344
$this->reflectionProvider = $reflectionProvider;
4445
}
45-
public function resolveTagToKnownFullyQualifiedName(string $tag, Node $node) : ?string
46+
public function resolveTagToKnownFullyQualifiedName(string $tag, Property $property) : ?string
4647
{
47-
return $this->_resolveTagFullyQualifiedName($tag, $node, \true);
48+
return $this->_resolveTagFullyQualifiedName($tag, $property, \true);
4849
}
4950
public function resolveTagFullyQualifiedName(string $tag, Node $node) : ?string
5051
{

packages/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function create(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValu
8989
return new AttributeGroup([$attribute]);
9090
}
9191
/**
92-
* @param ArrayItemNode[] $items
92+
* @param ArrayItemNode[]|mixed[] $items
9393
* @return Arg[]
9494
*/
9595
public function createArgsFromItems(array $items, string $attributeClass) : array

packages/Testing/Fixture/FixtureFileUpdater.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
use RectorPrefix202212\Nette\Utils\FileSystem;
77
final class FixtureFileUpdater
88
{
9-
public static function updateFixtureContent(string $originalFilePath, string $changedContent, string $fixtureFilepath) : void
9+
public static function updateFixtureContent(string $originalFilePath, string $changedContent, string $fixtureFilePath) : void
1010
{
1111
if (!\getenv('UPDATE_TESTS') && !\getenv('UT')) {
1212
return;
1313
}
1414
$newOriginalContent = self::resolveNewFixtureContent($originalFilePath, $changedContent);
15-
FileSystem::write($fixtureFilepath, $newOriginalContent);
15+
FileSystem::write($fixtureFilePath, $newOriginalContent);
1616
}
1717
private static function resolveNewFixtureContent(string $originalFilePath, string $changedContent) : string
1818
{

rules/CodingStyle/Rector/ClassMethod/OrderAttributesRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
1919
use RectorPrefix202212\Webmozart\Assert\Assert;
2020
/**
21-
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\OrderAttributesRector\SpecificOrder\OrderAttributesRectorTest
21+
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\OrderAttributesRector\SpecificOrder\SpecificOrderAttributesRectorTest
2222
*/
2323
final class OrderAttributesRector extends AbstractRector implements ConfigurableRectorInterface
2424
{

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ final class VersionResolver
1717
* @api
1818
* @var string
1919
*/
20-
public const PACKAGE_VERSION = 'ea223437f27820fa43a96bf17839d7d1b88417d1';
20+
public const PACKAGE_VERSION = 'c78e255cf9cb17cedead84ff8a54f421f563942d';
2121
/**
2222
* @api
2323
* @var string
2424
*/
25-
public const RELEASE_DATE = '2022-12-22 15:18:17';
25+
public const RELEASE_DATE = '2022-12-22 16:49:11';
2626
/**
2727
* @var int
2828
*/

src/Console/Style/RectorConsoleOutputStyle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
final class RectorConsoleOutputStyle extends SymfonyStyle
1313
{
1414
/**
15-
* @var mixed|ProgressBar
15+
* @var \Symfony\Component\Console\Helper\ProgressBar|null
1616
*/
17-
public $progressBar;
17+
private $progressBar;
1818
/**
1919
* @var bool|null
2020
*/

src/NodeManipulator/IfManipulator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function matchIfValueReturnValue(If_ $if) : ?Expr
114114
return null;
115115
}
116116
/**
117-
* @return mixed[]
117+
* @return If_[]
118118
*/
119119
public function collectNestedIfsWithOnlyReturn(If_ $if) : array
120120
{

src/ValueObject/Application/File.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ final class File
4545
* @readonly
4646
* @var string
4747
*/
48-
private $filepath;
48+
private $filePath;
4949
/**
5050
* @var string
5151
*/
5252
private $fileContent;
53-
public function __construct(string $filepath, string $fileContent)
53+
public function __construct(string $filePath, string $fileContent)
5454
{
55-
$this->filepath = $filepath;
55+
$this->filePath = $filePath;
5656
$this->fileContent = $fileContent;
5757
$this->originalFileContent = $fileContent;
5858
}
5959
public function getFilePath() : string
6060
{
61-
return $this->filepath;
61+
return $this->filePath;
6262
}
6363
public function getFileContent() : string
6464
{

vendor/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

2323
require_once __DIR__ . '/composer/autoload_real.php';
2424

25-
return ComposerAutoloaderInit72618e0b48726d2ac88112d6effe92fc::getLoader();
25+
return ComposerAutoloaderInit099468b8f0503dfa63adfbd0082c61cf::getLoader();

vendor/composer/ClassLoader.php

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
class ClassLoader
4444
{
4545
/** @var \Closure(string):void */
46-
private $includeFile;
46+
private static $includeFile;
4747

4848
/** @var ?string */
4949
private $vendorDir;
@@ -109,18 +109,7 @@ class ClassLoader
109109
public function __construct($vendorDir = null)
110110
{
111111
$this->vendorDir = $vendorDir;
112-
113-
/**
114-
* Scope isolated include.
115-
*
116-
* Prevents access to $this/self from included files.
117-
*
118-
* @param string $file
119-
* @return void
120-
*/
121-
$this->includeFile = static function($file) {
122-
include $file;
123-
};
112+
self::initializeIncludeClosure();
124113
}
125114

126115
/**
@@ -440,7 +429,7 @@ public function unregister()
440429
public function loadClass($class)
441430
{
442431
if ($file = $this->findFile($class)) {
443-
($this->includeFile)($file);
432+
(self::$includeFile)($file);
444433

445434
return true;
446435
}
@@ -570,4 +559,23 @@ private function findFileWithExtension($class, $ext)
570559

571560
return false;
572561
}
562+
563+
private static function initializeIncludeClosure(): void
564+
{
565+
if (self::$includeFile !== null) {
566+
return;
567+
}
568+
569+
/**
570+
* Scope isolated include.
571+
*
572+
* Prevents access to $this/self from included files.
573+
*
574+
* @param string $file
575+
* @return void
576+
*/
577+
self::$includeFile = static function($file) {
578+
include $file;
579+
};
580+
}
573581
}

0 commit comments

Comments
 (0)