examples/Complete/MyService.php
Method oneHandler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function oneHandler(Context $context): void
{
self::console('Just starting');
// Recover the parameter by the key
Avoid unused parameters such as '$context'. Wontfix
Wontfix
public function otherHandler(Context $context): void
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
syntax error, unexpected ')'
Open
Open
);
- Exclude checks