open-orchestra/open-orchestra-cms-bundle

View on GitHub
UserAdminBundle/Transformer/UserListGroupTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$params'.
Open

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

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

class UserListGroupTransformer extends AbstractSecurityCheckerAwareTransformer

Possibly zero references to use statement for classlike/namespace GroupInterface (\OpenOrchestra\Backoffice\Model\GroupInterface)
Open

use OpenOrchestra\Backoffice\Model\GroupInterface;

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

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

Call to undeclared method \OpenOrchestra\UserAdminBundle\Transformer\UserListGroupTransformer::newFacade
Open

        $facade = $this->newFacade();

Parameter $mixed has undeclared type \OpenOrchestra\UserBundle\Document\User
Open

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

Call to method getFirstName from undeclared class \OpenOrchestra\UserBundle\Document\User
Open

        $facade->firstName = $mixed->getFirstName();

Call to method getUsername from undeclared class \OpenOrchestra\UserBundle\Document\User
Open

        $facade->username = $mixed->getUsername();

Call to method getLastName from undeclared class \OpenOrchestra\UserBundle\Document\User
Open

        $facade->lastName = $mixed->getLastName();

Call to method getEmail from undeclared class \OpenOrchestra\UserBundle\Document\User
Open

        $facade->email = $mixed->getEmail();

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