for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Del\Passport;
use Del\Passport\Entity\Passport;
use Doctrine\ORM\EntityManager;
class PassportControl
{
/** @var EntityManager */
private $entityManager;
/**
* PassportControl constructor.
* @param EntityManager $entityManager
*/
public function __construct(EntityManager $entityManager)
$this->entityManager = $entityManager;
}
* @param PassportInterface $passport
* @param ActionInterface $action
* @param ResourceInterface $resource
* @return bool
public function isAuthorized(PassportInterface $passport, ActionInterface $action, ResourceInterface $resource): bool
$passport
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$action
$resource
return true;
* @param RoleInterface $role
public function grantEntitlement(PassportInterface $passport, RoleInterface $role, ResourceInterface $resource): bool
$role
public function revokeEntitlement(PassportInterface $passport, RoleInterface $role, ResourceInterface $resource): bool
* @param int $userId
* @return PassportInterface
public function createNewPassport(int $userId): PassportInterface
$userId
$passport = new Passport();
return $passport;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.