Use typed properties

This commit is contained in:
Jan Böhmer 2022-09-18 22:59:31 +02:00
parent 548ec2ea50
commit 51e05a8669
216 changed files with 603 additions and 698 deletions

View file

@ -62,19 +62,19 @@ class ColumnSecurity
/**
* @var string The name of the edit permission
*/
public $edit = 'edit';
public string $edit = 'edit';
/**
* @var string The name of the read permission
*/
public $read = 'read';
public string $read = 'read';
/**
* @var string A prefix for all permission names (e.g..edit, useful for Parts)
*/
public $prefix = '';
public string $prefix = '';
/**
* @var string the placeholder that should be used, when the access to the property is denied
* @var mixed the placeholder that should be used, when the access to the property is denied
*/
public $placeholder = null;

View file

@ -68,12 +68,12 @@ use Symfony\Component\Security\Core\Security;
*/
class ElementPermissionListener
{
protected $security;
protected $reader;
protected $em;
protected $disabled;
protected Security $security;
protected Reader $reader;
protected EntityManagerInterface $em;
protected bool $disabled;
protected $perm_cache;
protected array $perm_cache;
public function __construct(Security $security, Reader $reader, EntityManagerInterface $em)
{

View file

@ -54,11 +54,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
*/
abstract class ExtendedVoter extends Voter
{
protected $entityManager;
/**
* @var PermissionResolver
*/
protected $resolver;
protected EntityManagerInterface $entityManager;
protected PermissionResolver $resolver;
public function __construct(PermissionResolver $resolver, EntityManagerInterface $entityManager)
{