Fixed coding style.

This commit is contained in:
Jan Böhmer 2020-05-10 21:39:31 +02:00
parent e9493e52ec
commit f5d685dfd4
71 changed files with 619 additions and 531 deletions

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/**
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -20,21 +23,16 @@
namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Contracts\NamedElementInterface;
final class NamedElementProvider implements PlaceholderProviderInterface
{
/**
* @inheritDoc
*/
public function replace(string $placeholder, object $label_target, array $options = []): ?string
{
if ($label_target instanceof NamedElementInterface && $placeholder === '[[NAME]]') {
if ($label_target instanceof NamedElementInterface && '[[NAME]]' === $placeholder) {
return $label_target->getName();
}
return null;
}
}
}