mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 20:35:08 +02:00
Added declare strict types to all files
This commit is contained in:
parent
bea90a7d94
commit
6a2ff9d153
196 changed files with 685 additions and 360 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue