src/CoreBundle/Controller/Api/UpdatePositionLink.php
Avoid unused local variables such as '$newPosition'. Open
Open
$newPosition = (int) $requestData['position'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$repo'. Open
Open
public function __invoke(CLink $link, CLinkRepository $repo, Request $request, EntityManager $em): CLink
- 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
You must use "/**" style comments for a class comment Open
Open
class UpdatePositionLink extends AbstractController
- Exclude checks
Add a single space around assignment operators Open
Open
declare(strict_types=1);
- Exclude checks
Missing function doc comment Open
Open
public function __invoke(CLink $link, CLinkRepository $repo, Request $request, EntityManager $em): CLink
- Exclude checks
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. Open
Open
#[AsController]
- Exclude checks