mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
Updated Rector to commit ad9b5973ebff338b17452fb0240c1834126f388e
ad9b5973eb
[automated] Re-Generate Nodes/Rectors Documentation (#3521)
This commit is contained in:
parent
2955c40fce
commit
093f3c0641
@ -706,16 +706,17 @@ Replace magic property fetch using `__get()` and `__set()` with existing method
|
||||
|
||||
### FlipTypeControlToUseExclusiveTypeRector
|
||||
|
||||
Flip type control to use exclusive type
|
||||
Flip type control from null compare to use exclusive instanceof type
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector`](../rules/CodeQuality/Rector/Identical/FlipTypeControlToUseExclusiveTypeRector.php)
|
||||
|
||||
```diff
|
||||
-/** @var PhpDocInfo|null $phpDocInfo */
|
||||
$phpDocInfo = $functionLike->getAttribute(AttributeKey::PHP_DOC_INFO);
|
||||
-if ($phpDocInfo === null) {
|
||||
+if (! $phpDocInfo instanceof PhpDocInfo) {
|
||||
return;
|
||||
function process(?DateTime $dateTime)
|
||||
{
|
||||
- if ($dateTime === null) {
|
||||
+ if (! $dateTime instanceof DateTime) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -2060,19 +2061,13 @@ Change data provider in PHPUnit test case to newline per item
|
||||
|
||||
### EncapsedStringsToSprintfRector
|
||||
|
||||
Convert enscaped {$string} to more readable sprintf
|
||||
Convert enscaped {$string} to more readable sprintf or concat, if no mask is used
|
||||
|
||||
- class: [`Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector`](../rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php)
|
||||
|
||||
```diff
|
||||
final class SomeClass
|
||||
{
|
||||
public function run(string $format)
|
||||
{
|
||||
- return "Unsupported format {$format}";
|
||||
+ return sprintf('Unsupported format %s', $format);
|
||||
}
|
||||
}
|
||||
-echo "Unsupported format {$format}";
|
||||
+echo sprintf('Unsupported format %s', $format);
|
||||
```
|
||||
|
||||
<br>
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '6c8aa924ca0e92555f8c8cf30b01ff0ff4fff052';
|
||||
public const PACKAGE_VERSION = 'ad9b5973ebff338b17452fb0240c1834126f388e';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-03-25 17:49:21';
|
||||
public const RELEASE_DATE = '2023-03-26 00:30:03';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit4d4739bde693a9f1b324681a7d351798::getLoader();
|
||||
return ComposerAutoloaderInitfe0610a974532c44fdd8c1d5b8078f33::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit4d4739bde693a9f1b324681a7d351798
|
||||
class ComposerAutoloaderInitfe0610a974532c44fdd8c1d5b8078f33
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit4d4739bde693a9f1b324681a7d351798
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit4d4739bde693a9f1b324681a7d351798', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitfe0610a974532c44fdd8c1d5b8078f33', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit4d4739bde693a9f1b324681a7d351798', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitfe0610a974532c44fdd8c1d5b8078f33', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit4d4739bde693a9f1b324681a7d351798::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitfe0610a974532c44fdd8c1d5b8078f33::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit4d4739bde693a9f1b324681a7d351798::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitfe0610a974532c44fdd8c1d5b8078f33::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit4d4739bde693a9f1b324681a7d351798
|
||||
class ComposerStaticInitfe0610a974532c44fdd8c1d5b8078f33
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3127,9 +3127,9 @@ class ComposerStaticInit4d4739bde693a9f1b324681a7d351798
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit4d4739bde693a9f1b324681a7d351798::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit4d4739bde693a9f1b324681a7d351798::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit4d4739bde693a9f1b324681a7d351798::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitfe0610a974532c44fdd8c1d5b8078f33::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitfe0610a974532c44fdd8c1d5b8078f33::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitfe0610a974532c44fdd8c1d5b8078f33::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
14
vendor/composer/installed.json
vendored
14
vendor/composer/installed.json
vendored
@ -934,17 +934,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan\/phpstan-phpunit",
|
||||
"version": "1.3.10",
|
||||
"version_normalized": "1.3.10.0",
|
||||
"version": "1.3.11",
|
||||
"version_normalized": "1.3.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/phpstan\/phpstan-phpunit.git",
|
||||
"reference": "4cc5c6cc38e56bce7ea47c4091814e516d172dc3"
|
||||
"reference": "9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan-phpunit\/zipball\/4cc5c6cc38e56bce7ea47c4091814e516d172dc3",
|
||||
"reference": "4cc5c6cc38e56bce7ea47c4091814e516d172dc3",
|
||||
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan-phpunit\/zipball\/9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c",
|
||||
"reference": "9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -960,7 +960,7 @@
|
||||
"phpstan\/phpstan-strict-rules": "^1.0",
|
||||
"phpunit\/phpunit": "^9.5"
|
||||
},
|
||||
"time": "2023-03-02T10:25:13+00:00",
|
||||
"time": "2023-03-25T19:42:13+00:00",
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
"phpstan": {
|
||||
@ -983,7 +983,7 @@
|
||||
"description": "PHPUnit extensions and rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/phpstan\/phpstan-phpunit\/issues",
|
||||
"source": "https:\/\/github.com\/phpstan\/phpstan-phpunit\/tree\/1.3.10"
|
||||
"source": "https:\/\/github.com\/phpstan\/phpstan-phpunit\/tree\/1.3.11"
|
||||
},
|
||||
"install-path": "..\/phpstan\/phpstan-phpunit"
|
||||
},
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -69,6 +69,9 @@ class CoversHelper
|
||||
}
|
||||
if ($this->reflectionProvider->hasClass($className)) {
|
||||
$class = $this->reflectionProvider->getClass($className);
|
||||
if ($class->isInterface()) {
|
||||
$errors[] = RuleErrorBuilder::message(sprintf('@covers value %s references an interface.', $fullName))->build();
|
||||
}
|
||||
if (isset($method) && $method !== '' && !$class->hasMethod($method)) {
|
||||
$errors[] = RuleErrorBuilder::message(sprintf('@covers value %s references an invalid method.', $fullName))->build();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user