mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-18 09:54:35 +02:00
Fixed some inspection issues
This commit is contained in:
parent
33475dca66
commit
42e604245c
85 changed files with 272 additions and 291 deletions
|
@ -42,7 +42,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
|
||||
use function \count;
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* This service is used to import the datastructures (categories, manufacturers, etc.) from a PartKeepr export.
|
||||
|
|
|
@ -222,7 +222,7 @@ trait PKImportHelperTrait
|
|||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function setCreationDate(TimeStampableInterface $entity, ?string $datetime_str)
|
||||
protected function setCreationDate(TimeStampableInterface $entity, ?string $datetime_str): void
|
||||
{
|
||||
if ($datetime_str !== null && $datetime_str !== '' && $datetime_str !== '0000-00-00 00:00:00') {
|
||||
$date = new \DateTime($datetime_str);
|
||||
|
@ -252,7 +252,7 @@ trait PKImportHelperTrait
|
|||
$prefixes = $data['siprefix'];
|
||||
foreach ($prefixes as $prefix) {
|
||||
if ((int) $prefix['id'] === $prefix_id) {
|
||||
return pow((int) $prefix['base'], (int) $prefix['exponent']);
|
||||
return (int)$prefix['base'] ** (int)$prefix['exponent'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue