Skip to content

Commit ad09157

Browse files
committed
[BUGFIX] Return null if nothing was changed
1 parent 6837fda commit ad09157

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/typo3-fractor/rules/TYPO3v10/TypoScript/RemoveUseCacheHashFromTypolinkTypoScriptFractor.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ final class RemoveUseCacheHashFromTypolinkTypoScriptFractor extends AbstractTypo
2020
public function refactor(Statement $statement): null|Statement|int
2121
{
2222
if (! $statement instanceof Assignment) {
23-
return $statement;
23+
return null;
2424
}
2525

2626
// for some weird reason, "foo.bar.baz = 1" leads to "relativeName" being "foo.bar.baz"
2727
if (! str_ends_with($statement->object->absoluteName, '.typolink.useCacheHash')) {
28-
return $statement;
28+
return null;
2929
}
3030

31-
$this->hasChanged = true;
3231
return TypoScriptStatementsIterator::REMOVE_NODE;
3332
}
3433

0 commit comments

Comments
 (0)