Skip to content

Commit

Permalink
Updated Rector to commit c78e255cf9cb17cedead84ff8a54f421f563942d
Browse files Browse the repository at this point in the history
rectorphp/rector-src@c78e255 Fix @return docblock on IfManipulator (#3239)
  • Loading branch information
TomasVotruba committed Dec 22, 2022
1 parent 1013215 commit d72c810
Show file tree
Hide file tree
Showing 16 changed files with 134 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\GroupUse;
use PhpParser\Node\Stmt\Property;
use PhpParser\Node\Stmt\Use_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
Expand Down Expand Up @@ -42,9 +43,9 @@ public function __construct(UseImportNameMatcher $useImportNameMatcher, UseImpor
$this->useImportsResolver = $useImportsResolver;
$this->reflectionProvider = $reflectionProvider;
}
public function resolveTagToKnownFullyQualifiedName(string $tag, Node $node) : ?string
public function resolveTagToKnownFullyQualifiedName(string $tag, Property $property) : ?string
{
return $this->_resolveTagFullyQualifiedName($tag, $node, \true);
return $this->_resolveTagFullyQualifiedName($tag, $property, \true);
}
public function resolveTagFullyQualifiedName(string $tag, Node $node) : ?string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function create(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValu
return new AttributeGroup([$attribute]);
}
/**
* @param ArrayItemNode[] $items
* @param ArrayItemNode[]|mixed[] $items
* @return Arg[]
*/
public function createArgsFromItems(array $items, string $attributeClass) : array
Expand Down
4 changes: 2 additions & 2 deletions packages/Testing/Fixture/FixtureFileUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
use RectorPrefix202212\Nette\Utils\FileSystem;
final class FixtureFileUpdater
{
public static function updateFixtureContent(string $originalFilePath, string $changedContent, string $fixtureFilepath) : void
public static function updateFixtureContent(string $originalFilePath, string $changedContent, string $fixtureFilePath) : void
{
if (!\getenv('UPDATE_TESTS') && !\getenv('UT')) {
return;
}
$newOriginalContent = self::resolveNewFixtureContent($originalFilePath, $changedContent);
FileSystem::write($fixtureFilepath, $newOriginalContent);
FileSystem::write($fixtureFilePath, $newOriginalContent);
}
private static function resolveNewFixtureContent(string $originalFilePath, string $changedContent) : string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use RectorPrefix202212\Webmozart\Assert\Assert;
/**
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\OrderAttributesRector\SpecificOrder\OrderAttributesRectorTest
* @see \Rector\Tests\CodingStyle\Rector\ClassMethod\OrderAttributesRector\SpecificOrder\SpecificOrderAttributesRectorTest
*/
final class OrderAttributesRector extends AbstractRector implements ConfigurableRectorInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'ea223437f27820fa43a96bf17839d7d1b88417d1';
public const PACKAGE_VERSION = 'c78e255cf9cb17cedead84ff8a54f421f563942d';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-12-22 15:18:17';
public const RELEASE_DATE = '2022-12-22 16:49:11';
/**
* @var int
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Style/RectorConsoleOutputStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
final class RectorConsoleOutputStyle extends SymfonyStyle
{
/**
* @var mixed|ProgressBar
* @var \Symfony\Component\Console\Helper\ProgressBar|null
*/
public $progressBar;
private $progressBar;
/**
* @var bool|null
*/
Expand Down
2 changes: 1 addition & 1 deletion src/NodeManipulator/IfManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function matchIfValueReturnValue(If_ $if) : ?Expr
return null;
}
/**
* @return mixed[]
* @return If_[]
*/
public function collectNestedIfsWithOnlyReturn(If_ $if) : array
{
Expand Down
8 changes: 4 additions & 4 deletions src/ValueObject/Application/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ final class File
* @readonly
* @var string
*/
private $filepath;
private $filePath;
/**
* @var string
*/
private $fileContent;
public function __construct(string $filepath, string $fileContent)
public function __construct(string $filePath, string $fileContent)
{
$this->filepath = $filepath;
$this->filePath = $filePath;
$this->fileContent = $fileContent;
$this->originalFileContent = $fileContent;
}
public function getFilePath() : string
{
return $this->filepath;
return $this->filePath;
}
public function getFileContent() : string
{
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

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

return ComposerAutoloaderInit72618e0b48726d2ac88112d6effe92fc::getLoader();
return ComposerAutoloaderInit099468b8f0503dfa63adfbd0082c61cf::getLoader();
36 changes: 22 additions & 14 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
class ClassLoader
{
/** @var \Closure(string):void */
private $includeFile;
private static $includeFile;

/** @var ?string */
private $vendorDir;
Expand Down Expand Up @@ -109,18 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
$this->includeFile = static function($file) {
include $file;
};
self::initializeIncludeClosure();
}

/**
Expand Down Expand Up @@ -440,7 +429,7 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
($this->includeFile)($file);
(self::$includeFile)($file);

return true;
}
Expand Down Expand Up @@ -570,4 +559,23 @@ private function findFileWithExtension($class, $ext)

return false;
}

private static function initializeIncludeClosure(): void
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = static function($file) {
include $file;
};
}
}
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit72618e0b48726d2ac88112d6effe92fc
class ComposerAutoloaderInit099468b8f0503dfa63adfbd0082c61cf
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit72618e0b48726d2ac88112d6effe92fc', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit099468b8f0503dfa63adfbd0082c61cf', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit72618e0b48726d2ac88112d6effe92fc', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit099468b8f0503dfa63adfbd0082c61cf', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit72618e0b48726d2ac88112d6effe92fc::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit099468b8f0503dfa63adfbd0082c61cf::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit72618e0b48726d2ac88112d6effe92fc::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit099468b8f0503dfa63adfbd0082c61cf::$files;
$requireFile = static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit72618e0b48726d2ac88112d6effe92fc
class ComposerStaticInit099468b8f0503dfa63adfbd0082c61cf
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3061,9 +3061,9 @@ class ComposerStaticInit72618e0b48726d2ac88112d6effe92fc
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit72618e0b48726d2ac88112d6effe92fc::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit72618e0b48726d2ac88112d6effe92fc::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit72618e0b48726d2ac88112d6effe92fc::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit099468b8f0503dfa63adfbd0082c61cf::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit099468b8f0503dfa63adfbd0082c61cf::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit099468b8f0503dfa63adfbd0082c61cf::$classMap;

}, null, ClassLoader::class);
}
Expand Down
100 changes: 50 additions & 50 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3033,17 +3033,17 @@
},
{
"name": "symplify\/easy-parallel",
"version": "11.1.20",
"version_normalized": "11.1.20.0",
"version": "11.1.21",
"version_normalized": "11.1.21.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symplify\/easy-parallel.git",
"reference": "2f7df86f96a77b13ae192bb77d3fd806629e5732"
"reference": "464d9fdead366d6cf40db9d94660cdc3076708c8"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symplify\/easy-parallel\/zipball\/2f7df86f96a77b13ae192bb77d3fd806629e5732",
"reference": "2f7df86f96a77b13ae192bb77d3fd806629e5732",
"url": "https:\/\/api.github.com\/repos\/symplify\/easy-parallel\/zipball\/464d9fdead366d6cf40db9d94660cdc3076708c8",
"reference": "464d9fdead366d6cf40db9d94660cdc3076708c8",
"shasum": ""
},
"require": {
Expand All @@ -3056,29 +3056,29 @@
"symfony\/console": "^6.2"
},
"conflict": {
"symplify\/autowire-array-parameter": "<11.1.20",
"symplify\/coding-standard": "<11.1.20",
"symplify\/config-transformer": "<11.1.20",
"symplify\/easy-ci": "<11.1.20",
"symplify\/easy-coding-standard": "<11.1.20",
"symplify\/easy-testing": "<11.1.20",
"symplify\/monorepo-builder": "<11.1.20",
"symplify\/package-builder": "<11.1.20",
"symplify\/php-config-printer": "<11.1.20",
"symplify\/phpstan-extensions": "<11.1.20",
"symplify\/phpstan-rules": "<11.1.20",
"symplify\/rule-doc-generator": "<11.1.20",
"symplify\/rule-doc-generator-contracts": "<11.1.20",
"symplify\/smart-file-system": "<11.1.20",
"symplify\/symfony-static-dumper": "<11.1.20",
"symplify\/symplify-kernel": "<11.1.20",
"symplify\/vendor-patches": "<11.1.20"
"symplify\/autowire-array-parameter": "<11.1.21",
"symplify\/coding-standard": "<11.1.21",
"symplify\/config-transformer": "<11.1.21",
"symplify\/easy-ci": "<11.1.21",
"symplify\/easy-coding-standard": "<11.1.21",
"symplify\/easy-testing": "<11.1.21",
"symplify\/monorepo-builder": "<11.1.21",
"symplify\/package-builder": "<11.1.21",
"symplify\/php-config-printer": "<11.1.21",
"symplify\/phpstan-extensions": "<11.1.21",
"symplify\/phpstan-rules": "<11.1.21",
"symplify\/rule-doc-generator": "<11.1.21",
"symplify\/rule-doc-generator-contracts": "<11.1.21",
"symplify\/smart-file-system": "<11.1.21",
"symplify\/symfony-static-dumper": "<11.1.21",
"symplify\/symplify-kernel": "<11.1.21",
"symplify\/vendor-patches": "<11.1.21"
},
"require-dev": {
"phpunit\/phpunit": "^9.5.26",
"symplify\/package-builder": "^11.1.20"
"symplify\/package-builder": "^11.1.21"
},
"time": "2022-12-19T12:29:17+00:00",
"time": "2022-12-22T15:40:02+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand All @@ -3098,49 +3098,49 @@
"description": "Helper package for easier CLI project parallelization",
"support": {
"issues": "https:\/\/github.com\/symplify\/easy-parallel\/issues",
"source": "https:\/\/github.com\/symplify\/easy-parallel\/tree\/11.1.20"
"source": "https:\/\/github.com\/symplify\/easy-parallel\/tree\/11.1.21"
},
"install-path": "..\/symplify\/easy-parallel"
},
{
"name": "symplify\/rule-doc-generator-contracts",
"version": "11.1.20",
"version_normalized": "11.1.20.0",
"version": "11.1.21",
"version_normalized": "11.1.21.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symplify\/rule-doc-generator-contracts.git",
"reference": "c6f6cdf7e8c2fb1df84f4aad1c9563df21dafaee"
"reference": "aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symplify\/rule-doc-generator-contracts\/zipball\/c6f6cdf7e8c2fb1df84f4aad1c9563df21dafaee",
"reference": "c6f6cdf7e8c2fb1df84f4aad1c9563df21dafaee",
"url": "https:\/\/api.github.com\/repos\/symplify\/rule-doc-generator-contracts\/zipball\/aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7",
"reference": "aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7",
"shasum": ""
},
"require": {
"nette\/utils": "^3.2",
"php": ">=8.1"
},
"conflict": {
"symplify\/autowire-array-parameter": "<11.1.20",
"symplify\/coding-standard": "<11.1.20",
"symplify\/config-transformer": "<11.1.20",
"symplify\/easy-ci": "<11.1.20",
"symplify\/easy-coding-standard": "<11.1.20",
"symplify\/easy-parallel": "<11.1.20",
"symplify\/easy-testing": "<11.1.20",
"symplify\/monorepo-builder": "<11.1.20",
"symplify\/package-builder": "<11.1.20",
"symplify\/php-config-printer": "<11.1.20",
"symplify\/phpstan-extensions": "<11.1.20",
"symplify\/phpstan-rules": "<11.1.20",
"symplify\/rule-doc-generator": "<11.1.20",
"symplify\/smart-file-system": "<11.1.20",
"symplify\/symfony-static-dumper": "<11.1.20",
"symplify\/symplify-kernel": "<11.1.20",
"symplify\/vendor-patches": "<11.1.20"
},
"time": "2022-12-19T12:29:25+00:00",
"symplify\/autowire-array-parameter": "<11.1.21",
"symplify\/coding-standard": "<11.1.21",
"symplify\/config-transformer": "<11.1.21",
"symplify\/easy-ci": "<11.1.21",
"symplify\/easy-coding-standard": "<11.1.21",
"symplify\/easy-parallel": "<11.1.21",
"symplify\/easy-testing": "<11.1.21",
"symplify\/monorepo-builder": "<11.1.21",
"symplify\/package-builder": "<11.1.21",
"symplify\/php-config-printer": "<11.1.21",
"symplify\/phpstan-extensions": "<11.1.21",
"symplify\/phpstan-rules": "<11.1.21",
"symplify\/rule-doc-generator": "<11.1.21",
"symplify\/smart-file-system": "<11.1.21",
"symplify\/symfony-static-dumper": "<11.1.21",
"symplify\/symplify-kernel": "<11.1.21",
"symplify\/vendor-patches": "<11.1.21"
},
"time": "2022-12-22T15:40:09+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand All @@ -3159,7 +3159,7 @@
],
"description": "Contracts for production code of RuleDocGenerator",
"support": {
"source": "https:\/\/github.com\/symplify\/rule-doc-generator-contracts\/tree\/11.1.20"
"source": "https:\/\/github.com\/symplify\/rule-doc-generator-contracts\/tree\/11.1.21"
},
"funding": [
{
Expand Down
Loading

0 comments on commit d72c810

Please sign in to comment.