Skip to content

Generic.CodeAnalysis.UnusedFunctionParameter: Add possibility to specify excludes#3017

Merged
gsherwood merged 1 commit intosquizlabs:masterfrom
o5:ignore-type-hints
Jan 18, 2021
Merged

Generic.CodeAnalysis.UnusedFunctionParameter: Add possibility to specify excludes#3017
gsherwood merged 1 commit intosquizlabs:masterfrom
o5:ignore-type-hints

Conversation

@o5
Copy link
Copy Markdown
Contributor

@o5 o5 commented Jul 14, 2020

Sometimes you have to implement interface but not all required parameters are needed to use. For example in symfony/console.

public function execute(InputInterface $input, OutputInterface $output): int
{
    $output->writeln('Do something without using of $input');
    return 0;
}

@gsherwood gsherwood added this to the 3.6.0 milestone Jul 14, 2020
o5 added a commit to slimapi/coding-standard that referenced this pull request Jul 17, 2020
gsherwood added a commit that referenced this pull request Jan 18, 2021
@gsherwood gsherwood merged commit 2252d17 into squizlabs:master Jan 18, 2021
@gsherwood
Copy link
Copy Markdown
Member

Thanks a lot for this contribution. The new sniff property will be available in 3.6.0, and is documented here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties#genericcodeanalysisunusedfunctionparameter

@o5 o5 deleted the ignore-type-hints branch January 27, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants