Fixed static analysis issues.

This commit is contained in:
Jan Böhmer 2022-09-11 19:14:16 +02:00
parent aa719ab79a
commit 0d0a04c36f
7 changed files with 13 additions and 8 deletions

View file

@ -58,7 +58,7 @@ class LocaleDateTimeColumn extends AbstractColumn
{ {
/** /**
* @param $value * @param $value
* @return bool|mixed|string * @return string
* @throws Exception * @throws Exception
*/ */
public function normalize($value): string public function normalize($value): string

View file

@ -21,6 +21,8 @@ class SIUnitNumberColumn extends AbstractColumn
$resolver->setDefault('precision', 2); $resolver->setDefault('precision', 2);
$resolver->setDefault('unit', ''); $resolver->setDefault('unit', '');
return $this;
} }
public function normalize($value) public function normalize($value)

View file

@ -21,6 +21,8 @@ class SelectColumn extends AbstractColumn
'className' => 'select-checkbox no-colvis', 'className' => 'select-checkbox no-colvis',
'visible' => true, 'visible' => true,
]); ]);
return $this;
} }
public function normalize($value) public function normalize($value)

View file

@ -13,7 +13,8 @@ class BooleanConstraint extends AbstractConstraint
public function __construct(string $property, string $identifier = null, ?bool $default_value = null) public function __construct(string $property, string $identifier = null, ?bool $default_value = null)
{ {
parent::__construct($property, $identifier, $default_value); parent::__construct($property, $identifier);
$this->value = $default_value;
} }
/** /**

View file

@ -8,7 +8,7 @@ use App\Services\Trees\NodesListBuilder;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
/** /**
* @template T * @template T of AbstractDBElement
*/ */
class EntityConstraint extends AbstractConstraint class EntityConstraint extends AbstractConstraint
{ {
@ -16,7 +16,7 @@ class EntityConstraint extends AbstractConstraint
private const ALLOWED_OPERATOR_VALUES_STRUCTURAL = ['INCLUDING_CHILDREN', 'EXCLUDING_CHILDREN']; private const ALLOWED_OPERATOR_VALUES_STRUCTURAL = ['INCLUDING_CHILDREN', 'EXCLUDING_CHILDREN'];
/** /**
* @var * @var NodesListBuilder
*/ */
protected $nodesListBuilder; protected $nodesListBuilder;
@ -37,7 +37,7 @@ class EntityConstraint extends AbstractConstraint
/** /**
* @param NodesListBuilder|null $nodesListBuilder * @param NodesListBuilder|null $nodesListBuilder
* @param class-string $class * @param class-string<T> $class
* @param string $property * @param string $property
* @param string|null $identifier * @param string|null $identifier
* @param null $value * @param null $value
@ -80,7 +80,7 @@ class EntityConstraint extends AbstractConstraint
} }
/** /**
* @return mixed|null * @return T|null
*/ */
public function getValue(): ?AbstractDBElement public function getValue(): ?AbstractDBElement
{ {

View file

@ -33,7 +33,7 @@ abstract class AbstractPartsContainingRepository extends StructuralDBElementRepo
* @param object $element the element for which the parts should be determined * @param object $element the element for which the parts should be determined
* @param array $order_by The order of the parts. Format ['name' => 'ASC'] * @param array $order_by The order of the parts. Format ['name' => 'ASC']
* *
* @return Part * @return Part[]
*/ */
abstract public function getParts(object $element, array $order_by = ['name' => 'ASC']): array; abstract public function getParts(object $element, array $order_by = ['name' => 'ASC']): array;

View file

@ -92,7 +92,7 @@ class NodesListBuilder
* Returns a flattened list of all (recursive) children elements of the given AbstractStructuralDBElement. * Returns a flattened list of all (recursive) children elements of the given AbstractStructuralDBElement.
* The value is cached for performance reasons. * The value is cached for performance reasons.
* *
* @template T * @template T of AbstractStructuralDBElement
* @param T $element * @param T $element
* @return T[] * @return T[]
*/ */