mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Fixed static analysis issues.
This commit is contained in:
parent
aa719ab79a
commit
0d0a04c36f
7 changed files with 13 additions and 8 deletions
|
@ -58,7 +58,7 @@ class LocaleDateTimeColumn extends AbstractColumn
|
|||
{
|
||||
/**
|
||||
* @param $value
|
||||
* @return bool|mixed|string
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*/
|
||||
public function normalize($value): string
|
||||
|
|
|
@ -21,6 +21,8 @@ class SIUnitNumberColumn extends AbstractColumn
|
|||
|
||||
$resolver->setDefault('precision', 2);
|
||||
$resolver->setDefault('unit', '');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function normalize($value)
|
||||
|
|
|
@ -21,6 +21,8 @@ class SelectColumn extends AbstractColumn
|
|||
'className' => 'select-checkbox no-colvis',
|
||||
'visible' => true,
|
||||
]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function normalize($value)
|
||||
|
|
|
@ -13,7 +13,8 @@ class BooleanConstraint extends AbstractConstraint
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ use App\Services\Trees\NodesListBuilder;
|
|||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template T of AbstractDBElement
|
||||
*/
|
||||
class EntityConstraint extends AbstractConstraint
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ class EntityConstraint extends AbstractConstraint
|
|||
private const ALLOWED_OPERATOR_VALUES_STRUCTURAL = ['INCLUDING_CHILDREN', 'EXCLUDING_CHILDREN'];
|
||||
|
||||
/**
|
||||
* @var
|
||||
* @var NodesListBuilder
|
||||
*/
|
||||
protected $nodesListBuilder;
|
||||
|
||||
|
@ -37,7 +37,7 @@ class EntityConstraint extends AbstractConstraint
|
|||
|
||||
/**
|
||||
* @param NodesListBuilder|null $nodesListBuilder
|
||||
* @param class-string $class
|
||||
* @param class-string<T> $class
|
||||
* @param string $property
|
||||
* @param string|null $identifier
|
||||
* @param null $value
|
||||
|
@ -80,7 +80,7 @@ class EntityConstraint extends AbstractConstraint
|
|||
}
|
||||
|
||||
/**
|
||||
* @return mixed|null
|
||||
* @return T|null
|
||||
*/
|
||||
public function getValue(): ?AbstractDBElement
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ abstract class AbstractPartsContainingRepository extends StructuralDBElementRepo
|
|||
* @param object $element the element for which the parts should be determined
|
||||
* @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;
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class NodesListBuilder
|
|||
* Returns a flattened list of all (recursive) children elements of the given AbstractStructuralDBElement.
|
||||
* The value is cached for performance reasons.
|
||||
*
|
||||
* @template T
|
||||
* @template T of AbstractStructuralDBElement
|
||||
* @param T $element
|
||||
* @return T[]
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue