mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 19:34:31 +02:00
Fixed phpstan issues
This commit is contained in:
parent
afcbbe0f43
commit
3a8c5a788f
11 changed files with 25 additions and 124 deletions
|
@ -231,7 +231,7 @@ final class DTOtoEntityConverter
|
|||
* @phpstan-param class-string<T> $class
|
||||
* @param string $name The name of the entity to create
|
||||
* @return AbstractStructuralDBElement
|
||||
* @phpstan-return T|null
|
||||
* @phpstan-return T
|
||||
*/
|
||||
private function getOrCreateEntityNonNull(string $class, string $name): AbstractStructuralDBElement
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ final class DTOtoEntityConverter
|
|||
$tmp = $this->em->getRepository(AttachmentType::class)->findOrCreateForInfoProvider(self::TYPE_DATASHEETS_NAME);
|
||||
|
||||
//If the entity was newly created, set the file filter
|
||||
if ($tmp->getId() === null) {
|
||||
if ($tmp->getID() === null) {
|
||||
$tmp->setFiletypeFilter('application/pdf');
|
||||
$tmp->setAlternativeNames(self::TYPE_DATASHEETS_NAME);
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ final class DTOtoEntityConverter
|
|||
$tmp = $this->em->getRepository(AttachmentType::class)->findOrCreateForInfoProvider(self::TYPE_IMAGE_NAME);
|
||||
|
||||
//If the entity was newly created, set the file filter
|
||||
if ($tmp->getId() === null) {
|
||||
if ($tmp->getID() === null) {
|
||||
$tmp->setFiletypeFilter('image/*');
|
||||
$tmp->setAlternativeNames(self::TYPE_DATASHEETS_NAME);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue