mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-19 10:24:50 +02:00
Use typed properties
This commit is contained in:
parent
548ec2ea50
commit
51e05a8669
216 changed files with 603 additions and 698 deletions
|
@ -51,7 +51,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class AttachmentTypeAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected $filterTools;
|
||||
protected FileTypeFilterTools $filterTools;
|
||||
|
||||
public function __construct(Security $security, FileTypeFilterTools $filterTools)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class BaseEntityAdminForm extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class CurrencyAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
private $default_currency;
|
||||
private string $default_currency;
|
||||
|
||||
public function __construct(Security $security, string $default_currency)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class ImportType extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class MassCreationForm extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class SupplierForm extends CompanyForm
|
||||
{
|
||||
protected $default_currency;
|
||||
protected string $default_currency;
|
||||
|
||||
public function __construct(Security $security, string $default_currency)
|
||||
{
|
||||
|
|
|
@ -67,12 +67,12 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||
|
||||
class AttachmentFormType extends AbstractType
|
||||
{
|
||||
protected $attachment_helper;
|
||||
protected $urlGenerator;
|
||||
protected $allow_attachments_download;
|
||||
protected $security;
|
||||
protected $submitHandler;
|
||||
protected $translator;
|
||||
protected AttachmentManager $attachment_helper;
|
||||
protected UrlGeneratorInterface $urlGenerator;
|
||||
protected bool $allow_attachments_download;
|
||||
protected Security $security;
|
||||
protected AttachmentSubmitHandler $submitHandler;
|
||||
protected TranslatorInterface $translator;
|
||||
|
||||
public function __construct(AttachmentManager $attachmentHelper,
|
||||
UrlGeneratorInterface $urlGenerator, Security $security,
|
||||
|
|
|
@ -45,7 +45,7 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
|||
*/
|
||||
class CollectionTypeExtension extends AbstractTypeExtension
|
||||
{
|
||||
protected $propertyAccess;
|
||||
protected PropertyAccessorInterface $propertyAccess;
|
||||
|
||||
public function __construct(PropertyAccessorInterface $propertyAccess)
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class InstanceOfConstraintType extends AbstractType
|
||||
{
|
||||
protected $em;
|
||||
protected EntityManagerInterface $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|||
|
||||
class TagsConstraintType extends AbstractType
|
||||
{
|
||||
protected $urlGenerator;
|
||||
protected UrlGeneratorInterface $urlGenerator;
|
||||
|
||||
public function __construct(UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class LabelOptionsType extends AbstractType
|
||||
{
|
||||
private $security;
|
||||
private Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class LabelDialogType extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class OrderdetailType extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -72,9 +72,8 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class PartBaseType extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected $trans;
|
||||
protected $urlGenerator;
|
||||
protected Security $security;
|
||||
protected UrlGeneratorInterface $urlGenerator;
|
||||
|
||||
public function __construct(Security $security, UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class PartLotType extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -50,8 +50,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class PermissionGroupType extends AbstractType
|
||||
{
|
||||
protected $resolver;
|
||||
protected $perm_structure;
|
||||
protected PermissionResolver $resolver;
|
||||
protected array $perm_structure;
|
||||
|
||||
public function __construct(PermissionResolver $resolver)
|
||||
{
|
||||
|
|
|
@ -53,8 +53,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class PermissionType extends AbstractType
|
||||
{
|
||||
protected $resolver;
|
||||
protected $perm_structure;
|
||||
protected PermissionResolver $resolver;
|
||||
protected array $perm_structure;
|
||||
|
||||
public function __construct(PermissionResolver $resolver)
|
||||
{
|
||||
|
|
|
@ -54,8 +54,8 @@ use Traversable;
|
|||
*/
|
||||
final class PermissionsMapper implements DataMapperInterface
|
||||
{
|
||||
private $resolver;
|
||||
private $inherit;
|
||||
private PermissionResolver $resolver;
|
||||
private bool $inherit;
|
||||
|
||||
public function __construct(PermissionResolver $resolver, bool $inherit = false)
|
||||
{
|
||||
|
|
|
@ -53,8 +53,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class PermissionsType extends AbstractType
|
||||
{
|
||||
protected $resolver;
|
||||
protected $perm_structure;
|
||||
protected PermissionResolver $resolver;
|
||||
protected array $perm_structure;
|
||||
|
||||
public function __construct(PermissionResolver $resolver)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class TFAGoogleSettingsType extends AbstractType
|
||||
{
|
||||
protected $translator;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
|
@ -57,9 +57,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
*/
|
||||
class CurrencyEntityType extends StructuralEntityType
|
||||
{
|
||||
protected $base_currency;
|
||||
protected ?string $base_currency;
|
||||
|
||||
public function __construct(EntityManagerInterface $em, NodesListBuilder $builder, $base_currency)
|
||||
public function __construct(EntityManagerInterface $em, NodesListBuilder $builder, ?string $base_currency)
|
||||
{
|
||||
parent::__construct($em, $builder);
|
||||
$this->base_currency = $base_currency;
|
||||
|
|
|
@ -58,7 +58,7 @@ use Traversable;
|
|||
|
||||
final class SIUnitType extends AbstractType implements DataMapperInterface
|
||||
{
|
||||
protected $si_formatter;
|
||||
protected SIFormatter $si_formatter;
|
||||
|
||||
public function __construct(SIFormatter $SIFormatter)
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
*/
|
||||
class StructuralEntityType extends AbstractType
|
||||
{
|
||||
protected $em;
|
||||
protected EntityManagerInterface $em;
|
||||
|
||||
/**
|
||||
* @var NodesListBuilder
|
||||
|
|
|
@ -67,7 +67,7 @@ use Symfony\Component\Validator\Constraints\Length;
|
|||
|
||||
class UserAdminForm extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected Security $security;
|
||||
|
||||
public function __construct(Security $security)
|
||||
{
|
||||
|
|
|
@ -58,8 +58,8 @@ use Symfony\Component\Security\Core\Security;
|
|||
|
||||
class UserSettingsType extends AbstractType
|
||||
{
|
||||
protected $security;
|
||||
protected $demo_mode;
|
||||
protected Security $security;
|
||||
protected bool $demo_mode;
|
||||
|
||||
public function __construct(Security $security, bool $demo_mode)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue