ApiBundle/Transformer/NodesTreeTransformer.php
Avoid unused parameters such as '$params'. Open
Open
public function transform($nodesTree, array $params = array())
- Read upRead up
- Create a ticketCreate a ticket
- 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
Call to undeclared method \OpenOrchestra\ApiBundle\Transformer\NodesTreeTransformer::getContext
Open
Open
$tree[] = $this->getContext()->transform('node_tree', $node);
- Create a ticketCreate a ticket
- Exclude checks
Return type of transform()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function transform($nodesTree, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Returning type array<int>|array{}</int>
but transform()
is declared to return \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
return $tree;
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseApi\Transformer\AbstractTransformer
Open
Open
class NodesTreeTransformer extends AbstractTransformer
- Create a ticketCreate a ticket
- Exclude checks