UserAdminBundle/Security/OrchestraUserChecker.php
Parameter $user
has undeclared type \Symfony\Component\Security\Core\User\UserInterface
Open
Open
public function checkPreAuth(UserInterface $user)
- Create a ticketCreate a ticket
- Exclude checks
Call with 1 arg(s) to \OpenOrchestra\UserAdminBundle\Exception\NoRolesException::__construct()
which only takes 0 arg(s) defined at /code/UserAdminBundle/Exception/NoRolesException.php:10
Open
Open
$ex = new NoRolesException('Account has not access');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\UserAdminBundle\Exception\NoRolesException::setUser
Open
Open
$ex->setUser($user);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getRoles
from undeclared class \OpenOrchestra\UserBundle\Model\UserInterface
Open
Open
$roles = $user->getRoles();
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\UserBundle\Model\UserInterface
Open
Open
if (!$user instanceof OrchestraUserInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \Symfony\Component\Security\Core\User\UserChecker
Open
Open
class OrchestraUserChecker extends UserChecker
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared class \Symfony\Component\Security\Core\User\UserChecker
Open
Open
parent::checkPreAuth($user);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ROLE_DEFAULT
from undeclared class \OpenOrchestra\UserBundle\Model\UserInterface
Open
Open
(1 === count($roles) && $user->hasRole(OrchestraUserInterface::ROLE_DEFAULT))
- Create a ticketCreate a ticket
- Exclude checks
Call to method hasRole
from undeclared class \OpenOrchestra\UserBundle\Model\UserInterface
Open
Open
(1 === count($roles) && $user->hasRole(OrchestraUserInterface::ROLE_DEFAULT))
- Create a ticketCreate a ticket
- Exclude checks
Avoid variables with short names like $ex. Configured minimum length is 3. Open
Open
$ex = new NoRolesException('Account has not access');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Expected 0 spaces after opening bracket; newline found Open
Open
if (
- Create a ticketCreate a ticket
- Exclude checks