mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Fixed some PHPStan level 5 issues
This commit is contained in:
parent
74051c5649
commit
19530a9102
35 changed files with 95 additions and 63 deletions
|
@ -43,6 +43,7 @@ namespace App\Controller;
|
|||
|
||||
use App\Entity\Base\AbstractDBElement;
|
||||
use App\Entity\LabelSystem\LabelOptions;
|
||||
use App\Entity\LabelSystem\LabelProcessMode;
|
||||
use App\Entity\LabelSystem\LabelProfile;
|
||||
use App\Entity\LabelSystem\LabelSupportedElement;
|
||||
use App\Exceptions\TwigModeException;
|
||||
|
@ -81,7 +82,7 @@ class LabelController extends AbstractController
|
|||
$label_options = $profile instanceof LabelProfile ? $profile->getOptions() : new LabelOptions();
|
||||
|
||||
//We have to disable the options, if twig mode is selected and user is not allowed to use it.
|
||||
$disable_options = 'twig' === $label_options->getProcessMode() && !$this->isGranted('@labels.use_twig');
|
||||
$disable_options = (LabelProcessMode::TWIG === $label_options->getProcessMode()) && !$this->isGranted('@labels.use_twig');
|
||||
|
||||
$form = $this->createForm(LabelDialogType::class, null, [
|
||||
'disable_options' => $disable_options,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue