lib/Style/Normalizer/TransformRotate.php
Avoid unused parameters such as '$ruleName'. Open
Open
public function normalize($ruleValue, string $ruleName = ''): array
- 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
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function normalize($ruleValue, string $ruleName = ''): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (null !== $this->normalized) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->normalized;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'rotate' => $matches[1],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$matches = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
preg_match('/\s?([0-9]+)([a-z]+)?\s?/i', $ruleValue, $matches);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return [
- Exclude checks