Fixed some deprecations.

This commit is contained in:
Jan Böhmer 2022-08-14 19:09:07 +02:00
parent 4fa8eef1bf
commit 5fd608f42a
59 changed files with 202 additions and 165 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -52,7 +52,7 @@ use Symfony\Component\Validator\Constraint;
*/
class ValidPartLot extends Constraint
{
public function getTargets()
public function getTargets(): string
{
return self::CLASS_CONSTRAINT;
}