-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Add RemoveAddLLrefForTCAdescrMethodCallRector #4471
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
*/ | ||
public function refactor(Node $node): ?Node | ||
{ | ||
if (! $node instanceof StaticCall) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check is useless as this will always be the case because of the nodeTypes filter above
|
||
if (! $this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType( | ||
$node, | ||
new ObjectType(ExtensionManagementUtility::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not import class names from TYPO3. See other rules how it is done.
return null; | ||
} | ||
|
||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return null does nothing and does not remove the node.
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; | ||
CODE_SAMPLE | ||
), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
|
||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; | ||
|
||
defined('TYPO3') or die(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove please
Please also link the corresponding issue to this rule in the commit message and in the future please use a new branch to keep your main branch clean, otherwise you have to hard reset it after a merge. |
Co-authored-by: Simon Schaufelberger <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.