mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Fixed typing of TextConstraint
This commit is contained in:
parent
c780c0bd92
commit
eb02404d49
2 changed files with 9 additions and 16 deletions
|
@ -30,16 +30,9 @@ class TagsConstraint extends AbstractConstraint
|
|||
{
|
||||
final public const ALLOWED_OPERATOR_VALUES = ['ANY', 'ALL', 'NONE'];
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*/
|
||||
public function __construct(string $property, string $identifier = null, /**
|
||||
* @var string The value to compare to
|
||||
*/
|
||||
protected $value = null, /**
|
||||
* @var string|null The operator to use
|
||||
*/
|
||||
protected ?string $operator = '')
|
||||
public function __construct(string $property, string $identifier = null,
|
||||
protected ?string $value = null,
|
||||
protected ?string $operator = '')
|
||||
{
|
||||
parent::__construct($property, $identifier);
|
||||
}
|
||||
|
@ -61,12 +54,12 @@ class TagsConstraint extends AbstractConstraint
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getValue(): string
|
||||
public function getValue(): ?string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function setValue(string $value): self
|
||||
public function setValue(?string $value): self
|
||||
{
|
||||
$this->value = $value;
|
||||
return $this;
|
||||
|
|
|
@ -33,9 +33,9 @@ class TextConstraint extends AbstractConstraint
|
|||
* @param string $value
|
||||
*/
|
||||
public function __construct(string $property, string $identifier = null, /**
|
||||
* @var string The value to compare to
|
||||
* @var string|null The value to compare to
|
||||
*/
|
||||
protected $value = null, /**
|
||||
protected ?string $value = null, /**
|
||||
* @var string|null The operator to use
|
||||
*/
|
||||
protected ?string $operator = '')
|
||||
|
@ -60,12 +60,12 @@ class TextConstraint extends AbstractConstraint
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getValue(): string
|
||||
public function getValue(): ?string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function setValue(string $value): self
|
||||
public function setValue(?string $value): self
|
||||
{
|
||||
$this->value = $value;
|
||||
return $this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue