mirror of
https://github.com/Respect/Validation.git
synced 2024-05-03 15:03:18 +02:00
Fix PHPStan issues
This commit will fix an issue but ignore two of them because it will require some refactoring that won't be possible in a PATCH version. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
5ba7646925
commit
44a60f67d9
|
@ -181,7 +181,7 @@ final class Ip extends AbstractRule
|
||||||
throw new ComponentException('Invalid network mask');
|
throw new ComponentException('Invalid network mask');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->mask = sprintf('%032b', ip2long(long2ip(~(2 ** (32 - (int) $parts[1]) - 1))));
|
$this->mask = sprintf('%032b', ip2long((string) long2ip(~(2 ** (32 - (int) $parts[1]) - 1))));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function verifyAddress(string $address): bool
|
private function verifyAddress(string $address): bool
|
||||||
|
|
|
@ -10,14 +10,18 @@ parameters:
|
||||||
checkGenericClassInNonGenericObjectType: false
|
checkGenericClassInNonGenericObjectType: false
|
||||||
checkMissingIterableValueType: false
|
checkMissingIterableValueType: false
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
|
-
|
||||||
|
message: '/Ternary operator condition is always false\./'
|
||||||
|
path: library/Helpers/CanValidateDateTime.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: '/Instanceof between mixed and SimpleXMLElement will always evaluate to false\./'
|
message: '/Instanceof between mixed and SimpleXMLElement will always evaluate to false\./'
|
||||||
path: library/Rules/ArrayVal.php
|
path: library/Rules/ArrayVal.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: '/Parameter #1 \$error_handler of function set_error_handler expects \(callable\(int, string, string, int, array\): bool\)\|null, Closure\(\): void given\./'
|
message: '/Return type \(SplObjectStorage\) of method Respect\\Validation\\Exceptions\\NestedValidationException::getIterator\(\)/'
|
||||||
paths:
|
path: library/Exceptions/NestedValidationException.php
|
||||||
- library/Rules/Call.php
|
|
||||||
- tests/unit/Rules/CallTest.php
|
|
||||||
-
|
-
|
||||||
message: '/Call to an undefined static method Respect\\Validation\\Validator::iDoNotExistSoIShouldThrowException/'
|
message: '/Call to an undefined static method Respect\\Validation\\Validator::iDoNotExistSoIShouldThrowException/'
|
||||||
path: tests/unit/ValidatorTest.php
|
path: tests/unit/ValidatorTest.php
|
||||||
|
|
Loading…
Reference in a new issue