Skip to content

Commit 4dad6d1

Browse files
committed
Fixes
1 parent 3990758 commit 4dad6d1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ private function createExpression(
215215
*/
216216
private function getExpressionResolvers(): array
217217
{
218-
if ($this->resolvers === null) {
218+
if (!isset($this->resolvers)) {
219219
$this->resolvers = [
220220
'integer' => static fn (Scope $scope, Arg $value): Expr => new FuncCall(
221221
new Name('is_int'),
@@ -840,16 +840,12 @@ private static function implodeExpr(array $expressions, string $binaryOp): ?Expr
840840

841841
private static function buildAnyOfExpr(Scope $scope, Arg $value, Arg $items, callable $resolver): ?Expr
842842
{
843-
if (!$items->value instanceof Array_ || $items->value->items === null) {
843+
if (!$items->value instanceof Array_) {
844844
return null;
845845
}
846846

847847
$resolvers = [];
848848
foreach ($items->value->items as $key => $item) {
849-
if ($item === null) {
850-
continue;
851-
}
852-
853849
$resolved = $resolver($scope, $value, new Arg($item->value));
854850
if ($resolved === null) {
855851
continue;

0 commit comments

Comments
 (0)