open-orchestra/open-orchestra-cms-bundle

View on GitHub
ApiBundle/Transformer/ApiClientTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$params'.
Open

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

Parameter $apiClient has undeclared type \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

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

Call to method getId from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        $facade->id = $apiClient->getId();

Call to method getKey from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        $facade->key = $apiClient->getKey();

Call to method isTrusted from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        $facade->trusted = $apiClient->isTrusted();

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

class ApiClientTransformer extends AbstractSecurityCheckerAwareTransformer

Call to method getRoles from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        $facade->roles = implode(',', $apiClient->getRoles());

Call to method getSecret from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        $facade->secret = $apiClient->getSecret();

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

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

Checking instanceof against undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        if (!$apiClient instanceof ApiClientInterface) {

Call to method getName from undeclared class \OpenOrchestra\BaseApi\Model\ApiClientInterface
Open

        $facade->name = $apiClient->getName();

Call to undeclared method \OpenOrchestra\ApiBundle\Transformer\ApiClientTransformer::newFacade
Open

        $facade = $this->newFacade();

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

            throw new TransformerParameterTypeException();

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

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

There are no issues that match your filters.

Category
Status