mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +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'];
|
final public const ALLOWED_OPERATOR_VALUES = ['ANY', 'ALL', 'NONE'];
|
||||||
|
|
||||||
/**
|
public function __construct(string $property, string $identifier = null,
|
||||||
* @param string $value
|
protected ?string $value = null,
|
||||||
*/
|
protected ?string $operator = '')
|
||||||
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 = '')
|
|
||||||
{
|
{
|
||||||
parent::__construct($property, $identifier);
|
parent::__construct($property, $identifier);
|
||||||
}
|
}
|
||||||
|
@ -61,12 +54,12 @@ class TagsConstraint extends AbstractConstraint
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getValue(): string
|
public function getValue(): ?string
|
||||||
{
|
{
|
||||||
return $this->value;
|
return $this->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setValue(string $value): self
|
public function setValue(?string $value): self
|
||||||
{
|
{
|
||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -33,9 +33,9 @@ class TextConstraint extends AbstractConstraint
|
||||||
* @param string $value
|
* @param string $value
|
||||||
*/
|
*/
|
||||||
public function __construct(string $property, string $identifier = null, /**
|
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
|
* @var string|null The operator to use
|
||||||
*/
|
*/
|
||||||
protected ?string $operator = '')
|
protected ?string $operator = '')
|
||||||
|
@ -60,12 +60,12 @@ class TextConstraint extends AbstractConstraint
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getValue(): string
|
public function getValue(): ?string
|
||||||
{
|
{
|
||||||
return $this->value;
|
return $this->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setValue(string $value): self
|
public function setValue(?string $value): self
|
||||||
{
|
{
|
||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue