Make LabelGenerator services final.

This commit is contained in:
Jan Böhmer 2020-05-09 18:17:23 +02:00
parent 28187f1ef2
commit e925bec5b6
18 changed files with 48 additions and 48 deletions

View file

@ -24,9 +24,9 @@ namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Base\AbstractDBElement;
use App\Services\ElementTypeNameGenerator;
class AbstractDBElementProvider implements PlaceholderProviderInterface
final class AbstractDBElementProvider implements PlaceholderProviderInterface
{
protected $elementTypeNameGenerator;
private $elementTypeNameGenerator;
public function __construct(ElementTypeNameGenerator $elementTypeNameGenerator)
{

View file

@ -30,11 +30,11 @@ use Symfony\Component\Security\Core\Security;
* Provides Placeholders for infos about global infos like Installation name or datetimes.
* @package App\Services\LabelSystem\PlaceholderProviders
*/
class GlobalProviders implements PlaceholderProviderInterface
final class GlobalProviders implements PlaceholderProviderInterface
{
protected $partdb_title;
protected $security;
private $partdb_title;
private $security;
public function __construct(string $partdb_title, Security $security)
{

View file

@ -23,7 +23,7 @@ namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Contracts\NamedElementInterface;
class NamedElementProvider implements PlaceholderProviderInterface
final class NamedElementProvider implements PlaceholderProviderInterface
{
/**

View file

@ -27,10 +27,10 @@ use App\Services\LabelSystem\LabelTextReplacer;
use IntlDateFormatter;
use Locale;
class PartLotProvider implements PlaceholderProviderInterface
final class PartLotProvider implements PlaceholderProviderInterface
{
protected $labelTextReplacer;
protected $amountFormatter;
private $labelTextReplacer;
private $amountFormatter;
public function __construct(LabelTextReplacer $labelTextReplacer, AmountFormatter $amountFormatter)
{

View file

@ -25,11 +25,11 @@ use App\Entity\Parts\Part;
use App\Services\SIFormatter;
use Symfony\Contracts\Translation\TranslatorInterface;
class PartProvider implements PlaceholderProviderInterface
final class PartProvider implements PlaceholderProviderInterface
{
protected $siFormatter;
protected $translator;
private $siFormatter;
private $translator;
public function __construct(SIFormatter $SIFormatter, TranslatorInterface $translator)
{

View file

@ -24,7 +24,7 @@ namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractStructuralDBElement;
class StructuralDBElementProvider implements PlaceholderProviderInterface
final class StructuralDBElementProvider implements PlaceholderProviderInterface
{
public function replace(string $placeholder, object $label_target, array $options = []): ?string

View file

@ -24,7 +24,7 @@ use App\Entity\Contracts\TimeStampableInterface;
use IntlDateFormatter;
use Locale;
class TimestampableElementProvider implements PlaceholderProviderInterface
final class TimestampableElementProvider implements PlaceholderProviderInterface
{
/**