Skip to content

Commit 439dcfa

Browse files
committed
refactor: clean up rector config and re-run rector
1 parent d983f20 commit 439dcfa

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
3737
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
3838
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
39-
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
4039
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
4140
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
4241
use Rector\PHPUnit\Set\PHPUnitSetList;
@@ -151,7 +150,6 @@
151150
__DIR__ . '/system/Security/Security.php',
152151
__DIR__ . '/system/Session/Session.php',
153152
],
154-
MixedTypeRector::class,
155153

156154
ReturnNeverTypeRector::class => [
157155
__DIR__ . '/system/Cache/Handlers/BaseHandler.php',

system/Session/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public function start()
248248
if (! isset($_SESSION['__ci_last_regenerate'])) {
249249
$_SESSION['__ci_last_regenerate'] = Time::now()->getTimestamp();
250250
} elseif ($_SESSION['__ci_last_regenerate'] < (Time::now()->getTimestamp() - $regenerateTime)) {
251-
$this->regenerate((bool) $this->config->regenerateDestroy);
251+
$this->regenerate($this->config->regenerateDestroy);
252252
}
253253
}
254254
// Another work-around ... PHP doesn't seem to send the session cookie

utils/src/Rector/RemoveErrorSuppressInTryCatchStmtsRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace Utils\Rector;
1515

1616
use PhpParser\Node;
17+
use PhpParser\Node\Expr;
1718
use PhpParser\Node\Expr\ErrorSuppress;
1819
use PhpParser\Node\Stmt\Class_;
1920
use PhpParser\Node\Stmt\Function_;
@@ -60,7 +61,7 @@ public function refactor(Node $node): ?Node
6061

6162
$this->traverseNodesWithCallable(
6263
$node->stmts,
63-
static function (Node $subNode) use (&$hasChanged) {
64+
static function (Node $subNode) use (&$hasChanged): int|Expr|null {
6465
if ($subNode instanceof Class_ || $subNode instanceof Function_) {
6566
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
6667
}

utils/src/Rector/UnderscoreToCamelCaseVariableNameRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private function updateDocblock(string $variableName, string $camelCaseName, ?Fu
169169
}
170170

171171
$docComment = $functionLike->getDocComment();
172-
if ($docComment === null) {
172+
if (! $docComment instanceof Doc) {
173173
return;
174174
}
175175

0 commit comments

Comments
 (0)