Fixed some deprecation messages

This commit is contained in:
Jan Böhmer 2023-04-15 21:18:11 +02:00
parent b3ecee749e
commit 5f29ee9052
8 changed files with 14 additions and 8 deletions

View file

@ -48,6 +48,9 @@ class RowClassColumn extends AbstractColumn
parent::initialize('$$rowClass', $index, $options, $dataTable); // TODO: Change the autogenerated stub
}
/**
* @return mixed
*/
public function normalize($value)
{
return $value;

View file

@ -43,7 +43,7 @@ class SIUnitNumberColumn extends AbstractColumn
return $this;
}
public function normalize($value)
public function normalize($value): string
{
//Ignore null values
if ($value === null) {

View file

@ -43,6 +43,9 @@ class SelectColumn extends AbstractColumn
return $this;
}
/**
* @return mixed
*/
public function normalize($value)
{
return $value;

View file

@ -203,9 +203,9 @@ final class PermissionData implements \JsonSerializable
/**
* Returns an JSON encodable representation of this object.
* @return array|mixed
* @return array
*/
public function jsonSerialize()
public function jsonSerialize(): array
{
$ret = [];

View file

@ -58,7 +58,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Cach
return $data instanceof Part;
}
public function normalize($object, string $format = null, array $context = [])
public function normalize($object, string $format = null, array $context = []): array
{
if (!$object instanceof Part) {
throw new \InvalidArgumentException('This normalizer only supports Part objects!');
@ -94,7 +94,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Cach
return $data;
}
public function denormalize($data, string $type, string $format = null, array $context = [])
public function denormalize($data, string $type, string $format = null, array $context = []): ?Part
{
$this->normalizeKeys($data);

View file

@ -51,7 +51,7 @@ class StructuralElementDenormalizer implements ContextAwareDenormalizerInterface
&& in_array('import', $context['groups'] ?? []);
}
public function denormalize($data, string $type, string $format = null, array $context = [])
public function denormalize($data, string $type, string $format = null, array $context = []): ?AbstractStructuralDBElement
{
/** @var AbstractStructuralDBElement $deserialized_entity */
$deserialized_entity = $this->normalizer->denormalize($data, $type, $format, $context);

View file

@ -42,7 +42,7 @@ class StructuralElementFromNameDenormalizer implements DenormalizerInterface, Ca
return is_string($data) && is_subclass_of($type, AbstractStructuralDBElement::class);
}
public function denormalize($data, string $type, string $format = null, array $context = [])
public function denormalize($data, string $type, string $format = null, array $context = []): ?AbstractStructuralDBElement
{
//Retrieve the repository for the given type
/** @var StructuralDBElementRepository $repo */

View file

@ -41,7 +41,7 @@ class StructuralElementNormalizer implements NormalizerInterface, CacheableSuppo
return $data instanceof AbstractStructuralDBElement;
}
public function normalize($object, string $format = null, array $context = [])
public function normalize($object, string $format = null, array $context = []): array
{
if (!$object instanceof AbstractStructuralDBElement) {
throw new \InvalidArgumentException('This normalizer only supports AbstractStructural objects!');