Skip to content
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

Add @phpcsSuppress to Command::execute #950

Closed
wants to merge 1 commit into from

Conversation

cleptric
Copy link
Member

@cleptric cleptric commented Oct 4, 2023

PHPCS will complain about missing return-type hints when you bake your first command.

Method \App\Command\AppCommand::execute() does not have native return type hint for its return value but it should be possible to add it based on @return
    |       |     annotation "int|null|void".

PHPCBF then adds : int|null|null 🤔

@cleptric cleptric force-pushed the add-phpcs-supression branch from 20f6849 to 9bba47f Compare October 4, 2023 22:39
@dereuromark
Copy link
Member

Is there no way to fix the actual phpcs rule to not throw wrong error?

@dereuromark
Copy link
Member

dereuromark commented Oct 4, 2023

I would recommend opening a Bug ticket or pr for their repo

@markstory markstory added this to the 3.x milestone Oct 5, 2023
@ADmad
Copy link
Member

ADmad commented Oct 5, 2023

We can just bake with return Command::SUCCESS.

Copy link

github-actions bot commented Feb 3, 2024

This pull request is stale because it has been open 30 days with no activity. Remove the stale label or comment on this issue, or it will be closed in 15 days

@github-actions github-actions bot added the stale label Feb 3, 2024
@github-actions github-actions bot closed this Feb 19, 2024
@othercorey othercorey reopened this Feb 19, 2024
@othercorey othercorey removed the stale label Feb 19, 2024
@othercorey
Copy link
Member

Re-opened so we can follow up with the recomendation.

Copy link

This pull request is stale because it has been open 30 days with no activity. Remove the stale label or comment on this issue, or it will be closed in 15 days

@dereuromark
Copy link
Member

That PHPCS is most likely fixed, this was a tooling issue on the CS ruleset.
Closing then for now, if it is still present and the sniffer not fixable we can rediscuss.

@cleptric cleptric deleted the add-phpcs-supression branch October 30, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants