mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-28 06:44:39 +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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue