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');
|
||||
}
|
||||
|
||||
$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
|
||||
|
|
|
@ -10,14 +10,18 @@ parameters:
|
|||
checkGenericClassInNonGenericObjectType: false
|
||||
checkMissingIterableValueType: false
|
||||
ignoreErrors:
|
||||
-
|
||||
message: '/Ternary operator condition is always false\./'
|
||||
path: library/Helpers/CanValidateDateTime.php
|
||||
|
||||
-
|
||||
message: '/Instanceof between mixed and SimpleXMLElement will always evaluate to false\./'
|
||||
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\./'
|
||||
paths:
|
||||
- library/Rules/Call.php
|
||||
- tests/unit/Rules/CallTest.php
|
||||
message: '/Return type \(SplObjectStorage\) of method Respect\\Validation\\Exceptions\\NestedValidationException::getIterator\(\)/'
|
||||
path: library/Exceptions/NestedValidationException.php
|
||||
|
||||
-
|
||||
message: '/Call to an undefined static method Respect\\Validation\\Validator::iDoNotExistSoIShouldThrowException/'
|
||||
path: tests/unit/ValidatorTest.php
|
||||
|
|
Loading…
Reference in New Issue