mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Fixed phpstan issues
This commit is contained in:
parent
06c8e584a4
commit
8fdf37261d
1 changed files with 1 additions and 3 deletions
|
@ -48,9 +48,6 @@ class StructuralElementNormalizer implements NormalizerInterface
|
||||||
return $data instanceof AbstractStructuralDBElement;
|
return $data instanceof AbstractStructuralDBElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public function normalize($object, string $format = null, array $context = []): mixed
|
public function normalize($object, string $format = null, array $context = []): mixed
|
||||||
{
|
{
|
||||||
if (!$object instanceof AbstractStructuralDBElement) {
|
if (!$object instanceof AbstractStructuralDBElement) {
|
||||||
|
@ -59,6 +56,7 @@ class StructuralElementNormalizer implements NormalizerInterface
|
||||||
|
|
||||||
$data = $this->normalizer->normalize($object, $format, $context);
|
$data = $this->normalizer->normalize($object, $format, $context);
|
||||||
|
|
||||||
|
//If the data is not an array, we can't do anything with it
|
||||||
if (!is_array($data)) {
|
if (!is_array($data)) {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue