open-orchestra/open-orchestra-cms-bundle

View on GitHub
WorkflowAdminBundle/Transformer/StatusCollectionTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$params'.
Open

    public function transform($statusCollection, 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

Avoid unused parameters such as '$params'.
Open

    public function reverseTransform(FacadeInterface $facade, 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

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

        $facade = $this->newFacade();

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\StatusInterface
Open

            $this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, StatusInterface::ENTITY_TYPE)

Parameter $facade has undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open

    public function reverseTransform(FacadeInterface $facade, array $params = array())

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

class StatusCollectionTransformer extends AbstractSecurityCheckerAwareTransformer

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

            $status = $this->getContext()->reverseTransform('status', $statusFacade);

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

            $facade->addStatus($this->getContext()->transform('status', $status));

Parameter $statusCollection has undeclared type \Doctrine\Common\Collections\Collection
Open

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

Return type of reverseTransform() is undeclared type \OpenOrchestra\WorkflowAdminBundle\Transformer\UserInterface
Open

    public function reverseTransform(FacadeInterface $facade, array $params = array())

Reference to undeclared property \OpenOrchestra\WorkflowAdminBundle\Transformer\StatusCollectionTransformer->authorizationChecker
Open

            $this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, StatusInterface::ENTITY_TYPE)

Returning type array<int>|array{}</int> but reverseTransform() is declared to return \OpenOrchestra\WorkflowAdminBundle\Transformer\UserInterface|null
Open

        return $statuses;

Call to method getStatuses from undeclared class \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open

        $statusesFacade = $facade->getStatuses();

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

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

The closing brace for the class must go on the next line after the body
Open

}

There are no issues that match your filters.

Category
Status