mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 04:30:08 +02:00
Use typed properties
This commit is contained in:
parent
548ec2ea50
commit
51e05a8669
216 changed files with 603 additions and 698 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue