Added declare strict types to all files

This commit is contained in:
Jan Böhmer 2023-06-11 18:59:07 +02:00
parent bea90a7d94
commit 6a2ff9d153
196 changed files with 685 additions and 360 deletions

View file

@ -147,7 +147,7 @@ class Part extends AttachmentContainingDBElement
//Ensure that the part name fullfills the regex of the category
if ($this->category instanceof Category) {
$regex = $this->category->getPartnameRegex();
if (!empty($regex) && !preg_match($regex, $this->name)) {
if ($regex !== '' && !preg_match($regex, $this->name)) {
$context->buildViolation('part.name.must_match_category_regex')
->atPath('name')
->setParameter('%regex%', $regex)

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace App\Entity\Parts\PartTraits;
use App\Entity\ProjectSystem\Project;
@ -81,4 +83,4 @@ trait ProjectTrait
return $projects;
}
}
}