ApiBundle/Transformer/KeywordTransformer.php
Avoid unused parameters such as '$params'. Open
Open
public function transform($keyword, 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
Avoid unused parameters such as '$params'. Open
Open
public function reverseTransform(FacadeInterface $facade, 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 method __construct
from undeclared class \OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException
Open
Open
throw new TransformerParameterTypeException();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Transformer\KeywordTransformer::newFacade
Open
Open
$facade = $this->newFacade();
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\ApiBundle\Transformer\KeywordTransformer->authorizationChecker
Open
Open
$facade->addRight('can_edit', $this->authorizationChecker->isGranted(ContributionActionInterface::EDIT, $keyword));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getLabel
from undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
$facade->label = $keyword->getLabel();
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\ApiBundle\Transformer\KeywordTransformer->authorizationChecker
Open
Open
$facade->addRight('can_delete', $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $keyword) &&
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared class \OpenOrchestra\BaseApi\Transformer\AbstractSecurityCheckerAwareTransformer
Open
Open
parent::__construct($facadeClass, $authorizationChecker);
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseApi\Transformer\AbstractSecurityCheckerAwareTransformer
Open
Open
class KeywordTransformer extends AbstractSecurityCheckerAwareTransformer
- Create a ticketCreate a ticket
- Exclude checks
Return type of transform()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function transform($keyword, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
@throws type of transform
has undeclared type \OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException
Open
Open
public function transform($keyword, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Return type of reverseTransform()
is undeclared type \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
public function reverseTransform(FacadeInterface $facade, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property id
from undeclared class \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
if (null !== $facade->id) {
- Create a ticketCreate a ticket
- Exclude checks
Parameter $authorizationChecker
has undeclared type \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $keywordRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $facade
has undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function reverseTransform(FacadeInterface $facade, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Call to method find
from undeclared class \OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface
Open
Open
return $this->keywordRepository->find($facade->id);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getLabel
from undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
$facade->label = $keyword->getLabel();
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property id
from undeclared class \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
return $this->keywordRepository->find($facade->id);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $keyword
has undeclared type \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
public function transform($keyword, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
if (!$keyword instanceof KeywordInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getId
from undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
$facade->id = $keyword->getId();
- Create a ticketCreate a ticket
- Exclude checks
Call to method countUse
from undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open
Open
$facade->numberUse = $keyword->countUse();
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
Open
$facade->addRight('can_delete', $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $keyword) &&
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
Open
$facade->addRight('can_edit', $this->authorizationChecker->isGranted(ContributionActionInterface::EDIT, $keyword));
- Create a ticketCreate a ticket
- Exclude checks