code-cleanup: removed unused classes, added role constants, phpcs fixes (#96)

This commit is contained in:
Kevin Papst
2018-01-16 23:56:55 +01:00
committed by GitHub
parent 0a65965187
commit 7df21f3f5a
13 changed files with 35 additions and 118 deletions

View File

@@ -11,6 +11,7 @@
namespace App\Validator\Constraints;
use App\Entity\User;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@@ -21,7 +22,16 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class RoleValidator extends ConstraintValidator
{
protected $allowedRoles = ['ROLE_CUSTOMER', 'ROLE_USER', 'ROLE_TEAMLEAD', 'ROLE_ADMIN', 'ROLE_SUPER_ADMIN'];
/**
* @var string[]
*/
protected $allowedRoles = [
User::ROLE_CUSTOMER,
User::ROLE_USER,
User::ROLE_TEAMLEAD,
User::ROLE_ADMIN,
User::ROLE_SUPER_ADMIN
];
/**
* {@inheritdoc}