Backoffice/Security/Authorization/Voter/ContentVoter.php
Avoid unused parameters such as '$action'. Open
Open
protected function voteForOwnedSubject($action, $content, TokenInterface $token)
- 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
Parameter $token
has undeclared type \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Open
Open
protected function voteForReadAction($subject, TokenInterface $token)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $token
has undeclared type \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Open
Open
protected function voteForOwnedSubject($action, $content, TokenInterface $token)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open
Open
&& $this->isSubjectInPerimeter($content->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContentType
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
$contentType = $subject->getContentType();
- Create a ticketCreate a ticket
- Exclude checks
Parameter $subject
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
protected function voteForReadAction($subject, TokenInterface $token)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $content
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
protected function voteForOwnedSubject($action, $content, TokenInterface $token)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open
Open
return $this->isSubjectInPerimeter($contentType, $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getUser
from undeclared class \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Open
Open
&& $this->isSubjectInPerimeter($subject->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $subject
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
protected function voteForSomeoneElseSubject($action, $subject, TokenInterface $token)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getUser
from undeclared class \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Open
Open
return $this->isSubjectInPerimeter($contentType, $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContentType
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
&& $this->isSubjectInPerimeter($subject->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getUser
from undeclared class \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Open
Open
&& $this->isSubjectInPerimeter($content->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open
Open
&& $this->isSubjectInPerimeter($subject->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
return $subject === ContentInterface::ENTITY_TYPE;
- Create a ticketCreate a ticket
- Exclude checks
Parameter $token
has undeclared type \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Open
Open
protected function voteForSomeoneElseSubject($action, $subject, TokenInterface $token)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContentType
from undeclared class \OpenOrchestra\ModelInterface\Model\ContentInterface
Open
Open
&& $this->isSubjectInPerimeter($content->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Create a ticketCreate a ticket
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
Open
&& $this->isSubjectInPerimeter($content->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
Open
&& $this->isSubjectInPerimeter($subject->getContentType(), $token->getUser(), ContentTypeInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks