mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fixed some deprecations.
This commit is contained in:
parent
4fa8eef1bf
commit
5fd608f42a
59 changed files with 202 additions and 165 deletions
|
@ -35,7 +35,7 @@ class BigDecimalGreaterThanValidator extends AbstractComparisonValidator
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function compareValues($value1, $value2)
|
||||
protected function compareValues($value1, $value2): bool
|
||||
{
|
||||
if ($value1 instanceof BigDecimal) {
|
||||
$value1 = (string) $value1;
|
||||
|
@ -51,7 +51,7 @@ class BigDecimalGreaterThanValidator extends AbstractComparisonValidator
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getErrorCode()
|
||||
protected function getErrorCode(): ?string
|
||||
{
|
||||
return GreaterThan::TOO_LOW_ERROR;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class BigDecimalGreaterThenOrEqualValidator extends AbstractComparisonValidator
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function compareValues($value1, $value2)
|
||||
protected function compareValues($value1, $value2): bool
|
||||
{
|
||||
if ($value1 instanceof BigDecimal) {
|
||||
$value1 = (string) $value1;
|
||||
|
@ -51,7 +51,7 @@ class BigDecimalGreaterThenOrEqualValidator extends AbstractComparisonValidator
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getErrorCode()
|
||||
protected function getErrorCode(): ?string
|
||||
{
|
||||
return GreaterThanOrEqual::TOO_LOW_ERROR;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ use Symfony\Component\Validator\Constraint;
|
|||
*/
|
||||
class ValidPartLot extends Constraint
|
||||
{
|
||||
public function getTargets()
|
||||
public function getTargets(): string
|
||||
{
|
||||
return self::CLASS_CONSTRAINT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue