mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-02 14:34:31 +02:00
Use typed properties
This commit is contained in:
parent
548ec2ea50
commit
51e05a8669
216 changed files with 603 additions and 698 deletions
|
@ -30,7 +30,7 @@ use InvalidArgumentException;
|
|||
|
||||
final class BarcodeGenerator
|
||||
{
|
||||
private $barcodeContentGenerator;
|
||||
private BarcodeContentGenerator $barcodeContentGenerator;
|
||||
|
||||
public function __construct(BarcodeContentGenerator $barcodeContentGenerator)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,8 @@ final class BarcodeContentGenerator
|
|||
PartLot::class => 'lot',
|
||||
Storelocation::class => 'location',
|
||||
];
|
||||
private $urlGenerator;
|
||||
|
||||
private UrlGeneratorInterface $urlGenerator;
|
||||
|
||||
public function __construct(UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
|
|
|
@ -31,8 +31,8 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|||
|
||||
final class BarcodeRedirector
|
||||
{
|
||||
private $urlGenerator;
|
||||
private $em;
|
||||
private UrlGeneratorInterface $urlGenerator;
|
||||
private EntityManagerInterface $em;
|
||||
|
||||
public function __construct(UrlGeneratorInterface $urlGenerator, EntityManagerInterface $entityManager)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ final class LabelGenerator
|
|||
|
||||
public const MM_TO_POINTS_FACTOR = 2.83465;
|
||||
|
||||
private $labelHTMLGenerator;
|
||||
private LabelHTMLGenerator $labelHTMLGenerator;
|
||||
|
||||
public function __construct(LabelHTMLGenerator $labelHTMLGenerator)
|
||||
{
|
||||
|
|
|
@ -34,13 +34,13 @@ use Twig\Error\Error;
|
|||
|
||||
final class LabelHTMLGenerator
|
||||
{
|
||||
private $twig;
|
||||
private $elementTypeNameGenerator;
|
||||
private $replacer;
|
||||
private $barcodeGenerator;
|
||||
private $sandboxedTwigProvider;
|
||||
private $partdb_title;
|
||||
private $security;
|
||||
private Environment $twig;
|
||||
private ElementTypeNameGenerator $elementTypeNameGenerator;
|
||||
private LabelTextReplacer $replacer;
|
||||
private BarcodeGenerator $barcodeGenerator;
|
||||
private SandboxedTwigProvider $sandboxedTwigProvider;
|
||||
private string $partdb_title;
|
||||
private Security $security;
|
||||
|
||||
public function __construct(ElementTypeNameGenerator $elementTypeNameGenerator, LabelTextReplacer $replacer, Environment $twig,
|
||||
BarcodeGenerator $barcodeGenerator, SandboxedTwigProvider $sandboxedTwigProvider, Security $security, string $partdb_title)
|
||||
|
|
|
@ -32,9 +32,9 @@ use Symfony\Contracts\Cache\TagAwareCacheInterface;
|
|||
|
||||
final class LabelProfileDropdownHelper
|
||||
{
|
||||
private $cache;
|
||||
private $entityManager;
|
||||
private $keyGenerator;
|
||||
private TagAwareCacheInterface $cache;
|
||||
private EntityManagerInterface $entityManager;
|
||||
private UserCacheKeyGenerator $keyGenerator;
|
||||
|
||||
public function __construct(TagAwareCacheInterface $treeCache, EntityManagerInterface $entityManager, UserCacheKeyGenerator $keyGenerator)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ use App\Services\LabelSystem\PlaceholderProviders\PlaceholderProviderInterface;
|
|||
*/
|
||||
final class LabelTextReplacer
|
||||
{
|
||||
private $providers;
|
||||
private iterable $providers;
|
||||
|
||||
public function __construct(iterable $providers)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ use App\Services\ElementTypeNameGenerator;
|
|||
|
||||
final class AbstractDBElementProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
private $elementTypeNameGenerator;
|
||||
private ElementTypeNameGenerator $elementTypeNameGenerator;
|
||||
|
||||
public function __construct(ElementTypeNameGenerator $elementTypeNameGenerator)
|
||||
{
|
||||
|
|
|
@ -34,8 +34,8 @@ use Symfony\Component\Security\Core\Security;
|
|||
*/
|
||||
final class GlobalProviders implements PlaceholderProviderInterface
|
||||
{
|
||||
private $partdb_title;
|
||||
private $security;
|
||||
private string $partdb_title;
|
||||
private Security $security;
|
||||
|
||||
public function __construct(string $partdb_title, Security $security)
|
||||
{
|
||||
|
|
|
@ -31,8 +31,8 @@ use Locale;
|
|||
|
||||
final class PartLotProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
private $labelTextReplacer;
|
||||
private $amountFormatter;
|
||||
private LabelTextReplacer $labelTextReplacer;
|
||||
private AmountFormatter $amountFormatter;
|
||||
|
||||
public function __construct(LabelTextReplacer $labelTextReplacer, AmountFormatter $amountFormatter)
|
||||
{
|
||||
|
|
|
@ -30,8 +30,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||
|
||||
final class PartProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
private $siFormatter;
|
||||
private $translator;
|
||||
private SIFormatter $siFormatter;
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
public function __construct(SIFormatter $SIFormatter, TranslatorInterface $translator)
|
||||
{
|
||||
|
|
|
@ -96,7 +96,7 @@ final class SandboxedTwigProvider
|
|||
];
|
||||
private const ALLOWED_PROPERTIES = [];
|
||||
|
||||
private $appExtension;
|
||||
private FormatExtension $appExtension;
|
||||
|
||||
public function __construct(FormatExtension $appExtension)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue