mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-15 05:59:35 +00:00
Improved code style of tests
This commit is contained in:
parent
5629215ce4
commit
684334ba22
73 changed files with 196 additions and 38 deletions
|
|
@ -50,6 +50,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|||
|
||||
/**
|
||||
* Provides Placeholders for infos about global infos like Installation name or datetimes.
|
||||
* @see \App\Tests\Services\LabelSystem\PlaceholderProviders\GlobalProvidersTest
|
||||
*/
|
||||
final class GlobalProviders implements PlaceholderProviderInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ namespace App\Services\LabelSystem\PlaceholderProviders;
|
|||
|
||||
use App\Entity\Contracts\NamedElementInterface;
|
||||
|
||||
/**
|
||||
* @see \App\Tests\Services\LabelSystem\PlaceholderProviders\NamedElementProviderTest
|
||||
*/
|
||||
final class NamedElementProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
public function replace(string $placeholder, object $label_target, array $options = []): ?string
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ use App\Services\LabelSystem\LabelTextReplacer;
|
|||
use IntlDateFormatter;
|
||||
use Locale;
|
||||
|
||||
/**
|
||||
* @see \App\Tests\Services\LabelSystem\PlaceholderProviders\PartLotProviderTest
|
||||
*/
|
||||
final class PartLotProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
public function __construct(private readonly LabelTextReplacer $labelTextReplacer, private readonly AmountFormatter $amountFormatter)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ use App\Services\Formatters\SIFormatter;
|
|||
use Parsedown;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* @see \App\Tests\Services\LabelSystem\PlaceholderProviders\PartProviderTest
|
||||
*/
|
||||
final class PartProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
public function __construct(private readonly SIFormatter $siFormatter, private readonly TranslatorInterface $translator)
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ use DateTime;
|
|||
use IntlDateFormatter;
|
||||
use Locale;
|
||||
|
||||
/**
|
||||
* @see \App\Tests\Services\LabelSystem\PlaceholderProviders\TimestampableElementProviderTest
|
||||
*/
|
||||
final class TimestampableElementProvider implements PlaceholderProviderInterface
|
||||
{
|
||||
public function replace(string $placeholder, object $label_target, array $options = []): ?string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue