Skip to content

Commit 6e8d9f0

Browse files
committed
Updated Rector to commit 9ff238819b2cfed103b30766d2c0e33135abed38
rectorphp/rector-src@9ff2388 apply cs
1 parent dac98be commit 6e8d9f0

File tree

5 files changed

+43
-43
lines changed

5 files changed

+43
-43
lines changed

rules/Naming/Naming/UseImportsResolver.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,6 @@ public function __construct(CurrentFileProvider $currentFileProvider)
2222
{
2323
$this->currentFileProvider = $currentFileProvider;
2424
}
25-
/**
26-
* @return \PhpParser\Node\Stmt\Namespace_|\Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace|null
27-
*/
28-
private function resolveNamespace()
29-
{
30-
/** @var File|null $file */
31-
$file = $this->currentFileProvider->getFile();
32-
if (!$file instanceof File) {
33-
return null;
34-
}
35-
$newStmts = $file->getNewStmts();
36-
if ($newStmts === []) {
37-
return null;
38-
}
39-
$namespaces = \array_filter($newStmts, static function (Stmt $stmt) : bool {
40-
return $stmt instanceof Namespace_;
41-
});
42-
// multiple namespaces is not supported
43-
if (\count($namespaces) > 1) {
44-
return null;
45-
}
46-
$currentNamespace = \current($namespaces);
47-
if ($currentNamespace instanceof Namespace_) {
48-
return $currentNamespace;
49-
}
50-
$currentStmt = \current($newStmts);
51-
if (!$currentStmt instanceof FileWithoutNamespace) {
52-
return null;
53-
}
54-
return $currentStmt;
55-
}
5625
/**
5726
* @return Use_[]|GroupUse[]
5827
*/
@@ -87,4 +56,35 @@ public function resolvePrefix($use) : string
8756
{
8857
return $use instanceof GroupUse ? $use->prefix . '\\' : '';
8958
}
59+
/**
60+
* @return \PhpParser\Node\Stmt\Namespace_|\Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace|null
61+
*/
62+
private function resolveNamespace()
63+
{
64+
/** @var File|null $file */
65+
$file = $this->currentFileProvider->getFile();
66+
if (!$file instanceof File) {
67+
return null;
68+
}
69+
$newStmts = $file->getNewStmts();
70+
if ($newStmts === []) {
71+
return null;
72+
}
73+
$namespaces = \array_filter($newStmts, static function (Stmt $stmt) : bool {
74+
return $stmt instanceof Namespace_;
75+
});
76+
// multiple namespaces is not supported
77+
if (\count($namespaces) > 1) {
78+
return null;
79+
}
80+
$currentNamespace = \current($namespaces);
81+
if ($currentNamespace instanceof Namespace_) {
82+
return $currentNamespace;
83+
}
84+
$currentStmt = \current($newStmts);
85+
if (!$currentStmt instanceof FileWithoutNamespace) {
86+
return null;
87+
}
88+
return $currentStmt;
89+
}
9090
}

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '9d85c96cb1d90aeb6d03eed4856be6861dc07673';
22+
public const PACKAGE_VERSION = '9ff238819b2cfed103b30766d2c0e33135abed38';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2023-06-29 10:52:03';
27+
public const RELEASE_DATE = '2023-06-29 11:59:41';
2828
/**
2929
* @var int
3030
*/

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 ComposerAutoloaderInit66946d2f17dc4a5961b873af41863f35::getLoader();
25+
return ComposerAutoloaderInita24b30f9c380e3b4383472b0cf89383a::getLoader();

vendor/composer/autoload_real.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// autoload_real.php @generated by Composer
44

5-
class ComposerAutoloaderInit66946d2f17dc4a5961b873af41863f35
5+
class ComposerAutoloaderInita24b30f9c380e3b4383472b0cf89383a
66
{
77
private static $loader;
88

@@ -22,17 +22,17 @@ public static function getLoader()
2222
return self::$loader;
2323
}
2424

25-
spl_autoload_register(array('ComposerAutoloaderInit66946d2f17dc4a5961b873af41863f35', 'loadClassLoader'), true, true);
25+
spl_autoload_register(array('ComposerAutoloaderInita24b30f9c380e3b4383472b0cf89383a', 'loadClassLoader'), true, true);
2626
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27-
spl_autoload_unregister(array('ComposerAutoloaderInit66946d2f17dc4a5961b873af41863f35', 'loadClassLoader'));
27+
spl_autoload_unregister(array('ComposerAutoloaderInita24b30f9c380e3b4383472b0cf89383a', 'loadClassLoader'));
2828

2929
require __DIR__ . '/autoload_static.php';
30-
call_user_func(\Composer\Autoload\ComposerStaticInit66946d2f17dc4a5961b873af41863f35::getInitializer($loader));
30+
call_user_func(\Composer\Autoload\ComposerStaticInita24b30f9c380e3b4383472b0cf89383a::getInitializer($loader));
3131

3232
$loader->setClassMapAuthoritative(true);
3333
$loader->register(true);
3434

35-
$filesToLoad = \Composer\Autoload\ComposerStaticInit66946d2f17dc4a5961b873af41863f35::$files;
35+
$filesToLoad = \Composer\Autoload\ComposerStaticInita24b30f9c380e3b4383472b0cf89383a::$files;
3636
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
3737
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
3838
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

vendor/composer/autoload_static.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Composer\Autoload;
66

7-
class ComposerStaticInit66946d2f17dc4a5961b873af41863f35
7+
class ComposerStaticInita24b30f9c380e3b4383472b0cf89383a
88
{
99
public static $files = array (
1010
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@@ -3098,9 +3098,9 @@ class ComposerStaticInit66946d2f17dc4a5961b873af41863f35
30983098
public static function getInitializer(ClassLoader $loader)
30993099
{
31003100
return \Closure::bind(function () use ($loader) {
3101-
$loader->prefixLengthsPsr4 = ComposerStaticInit66946d2f17dc4a5961b873af41863f35::$prefixLengthsPsr4;
3102-
$loader->prefixDirsPsr4 = ComposerStaticInit66946d2f17dc4a5961b873af41863f35::$prefixDirsPsr4;
3103-
$loader->classMap = ComposerStaticInit66946d2f17dc4a5961b873af41863f35::$classMap;
3101+
$loader->prefixLengthsPsr4 = ComposerStaticInita24b30f9c380e3b4383472b0cf89383a::$prefixLengthsPsr4;
3102+
$loader->prefixDirsPsr4 = ComposerStaticInita24b30f9c380e3b4383472b0cf89383a::$prefixDirsPsr4;
3103+
$loader->classMap = ComposerStaticInita24b30f9c380e3b4383472b0cf89383a::$classMap;
31043104

31053105
}, null, ClassLoader::class);
31063106
}

0 commit comments

Comments
 (0)