mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fixed further inspection issues
This commit is contained in:
parent
33e36f3d2b
commit
87533b6031
37 changed files with 46 additions and 71 deletions
|
@ -44,7 +44,7 @@ class NoLockoutValidator extends ConstraintValidator
|
|||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*/
|
||||
public function validate($value, Constraint $constraint): void
|
||||
public function validate(mixed $value, Constraint $constraint): void
|
||||
{
|
||||
if (!$constraint instanceof NoLockout) {
|
||||
throw new UnexpectedTypeException($constraint, NoLockout::class);
|
||||
|
|
|
@ -39,7 +39,7 @@ class NoneOfItsChildrenValidator extends ConstraintValidator
|
|||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*/
|
||||
public function validate($value, Constraint $constraint): void
|
||||
public function validate(mixed $value, Constraint $constraint): void
|
||||
{
|
||||
if (!$constraint instanceof NoneOfItsChildren) {
|
||||
throw new UnexpectedTypeException($constraint, NoneOfItsChildren::class);
|
||||
|
|
|
@ -31,5 +31,5 @@ use Symfony\Component\Validator\Constraint;
|
|||
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
||||
class Selectable extends Constraint
|
||||
{
|
||||
public $message = 'validator.isSelectable';
|
||||
public string $message = 'validator.isSelectable';
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class SelectableValidator extends ConstraintValidator
|
|||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*/
|
||||
public function validate($value, Constraint $constraint): void
|
||||
public function validate(mixed $value, Constraint $constraint): void
|
||||
{
|
||||
if (!$constraint instanceof Selectable) {
|
||||
throw new UnexpectedTypeException($constraint, Selectable::class);
|
||||
|
|
|
@ -42,7 +42,7 @@ class ValidFileFilterValidator extends ConstraintValidator
|
|||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*/
|
||||
public function validate($value, Constraint $constraint): void
|
||||
public function validate(mixed $value, Constraint $constraint): void
|
||||
{
|
||||
if (!$constraint instanceof ValidFileFilter) {
|
||||
throw new UnexpectedTypeException($constraint, ValidFileFilter::class);
|
||||
|
|
|
@ -42,7 +42,7 @@ class ValidPartLotValidator extends ConstraintValidator
|
|||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*/
|
||||
public function validate($value, Constraint $constraint): void
|
||||
public function validate(mixed $value, Constraint $constraint): void
|
||||
{
|
||||
if (!$constraint instanceof ValidPartLot) {
|
||||
throw new UnexpectedTypeException($constraint, ValidPartLot::class);
|
||||
|
|
|
@ -46,7 +46,7 @@ class ValidPermissionValidator extends ConstraintValidator
|
|||
* @param mixed $value The value that should be validated
|
||||
* @param Constraint $constraint The constraint for the validation
|
||||
*/
|
||||
public function validate($value, Constraint $constraint): void
|
||||
public function validate(mixed $value, Constraint $constraint): void
|
||||
{
|
||||
if (!$constraint instanceof ValidPermission) {
|
||||
throw new UnexpectedTypeException($constraint, ValidPermission::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue