open-orchestra/open-orchestra-cms-bundle

View on GitHub
WorkflowAdminBundle/Transformer/WorkflowTransitionTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$params'.
Open

    public function transform($workflowTransition, array $params = array())

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

@throws type of transform has undeclared type \OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException
Open

    public function transform($workflowTransition, array $params = array())

Call to undeclared method \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowTransitionTransformer::getContext
Open

        $facade->statusTo = $this->getContext()->transform('status', $workflowTransition->getStatusTo());

Call to undeclared method \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowTransitionTransformer::getContext
Open

        $facade->statusFrom = $this->getContext()->transform('status', $workflowTransition->getStatusFrom());

Class extends undeclared class \OpenOrchestra\BaseApi\Transformer\AbstractTransformer
Open

class WorkflowTransitionTransformer extends AbstractTransformer

Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface
Open

        if (!$workflowTransition instanceof WorkflowTransitionInterface) {

Call to method getStatusTo from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface
Open

        $facade->statusTo = $this->getContext()->transform('status', $workflowTransition->getStatusTo());

Call to undeclared method \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowTransitionTransformer::newFacade
Open

        $facade = $this->newFacade();

Call to method getStatusFrom from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface
Open

        $facade->statusFrom = $this->getContext()->transform('status', $workflowTransition->getStatusFrom());

Return type of transform() is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open

    public function transform($workflowTransition, array $params = array())

Call to method __construct from undeclared class \OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException
Open

            throw new TransformerParameterTypeException();

Parameter $workflowTransition has undeclared type \OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface
Open

    public function transform($workflowTransition, array $params = array())

There are no issues that match your filters.

Category
Status