Skip to content

Commit 5673dc2

Browse files
Fix typo cause error in return statement (#930)
* Fix typo cause error in return statement Ref 7e76204#diff-9a0550d9d66fe528e4abdae40f66d7ad52032c1efa68f97b05490454e168cb7c * [rector] Rector fixes --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent 7e76204 commit 5673dc2

4 files changed

Lines changed: 2 additions & 5 deletions

File tree

rules/Configs/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private function createAbsolutePathConcat(string $classFilePath): Concat
218218
{
219219
$relativeDirectoryPath = $this->filesystem->makePathRelative(
220220
dirname($classFilePath),
221-
dirname($this->getFile()->getFilePath())
221+
dirname((string) $this->getFile()->getFilePath())
222222
);
223223

224224
$distConstFetch = new ConstFetch(new Name('__DIR__'));

rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public function refactor(Node $node): ?Node
7373
return null;
7474
}
7575

76-
/** @var String_ $stringNode */
7776
$stringNode = $firstArg->value;
7877

7978
// not a form type string

rules/Symfony43/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function refactor(Node $node): ?Node
112112
}
113113

114114
if (! isset($matches[0])) {
115-
return null;t
115+
return null;
116116
}
117117

118118
$newValue = '@' .

rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,11 @@ private function isReturnIntegerType(?Expr $expr): bool
163163

164164
private function isIntegerTernaryIfElse(Ternary $ternary): bool
165165
{
166-
/** @var Expr|null $if */
167166
$if = $ternary->if;
168167
if (! $if instanceof Expr) {
169168
$if = $ternary->cond;
170169
}
171170

172-
/** @var Expr $else */
173171
$else = $ternary->else;
174172
$ifType = $this->getType($if);
175173
$elseType = $this->getType($else);

0 commit comments

Comments
 (0)