mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-05 06:49:36 +00:00
Fixed phpstan analysis issues and bad code that showed up with phpstan 2.0
This commit is contained in:
parent
a273acbecd
commit
946032a101
42 changed files with 98 additions and 85 deletions
|
|
@ -205,10 +205,6 @@ trait PKImportHelperTrait
|
|||
*/
|
||||
protected function setIDOfEntity(AbstractDBElement $element, int|string $id): void
|
||||
{
|
||||
if (!is_int($id) && !is_string($id)) {
|
||||
throw new \InvalidArgumentException('ID must be an integer or string');
|
||||
}
|
||||
|
||||
$id = (int) $id;
|
||||
|
||||
$metadata = $this->em->getClassMetadata($element::class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue