Skip to content

Commit b7a98bf

Browse files
Do not use empty()
1 parent f97cda7 commit b7a98bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/type/IntersectionType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(Type ...$types)
3434
$this->ensureOnlyValidTypes(...$types);
3535
$this->ensureNoDuplicateTypes(...$types);
3636

37-
assert(!empty($types));
37+
assert($types !== []);
3838

3939
$this->types = $types;
4040
}

src/type/UnionType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(Type ...$types)
3232
$this->ensureMinimumOfTwoTypes(...$types);
3333
$this->ensureOnlyValidTypes(...$types);
3434

35-
assert(!empty($types));
35+
assert($types !== []);
3636

3737
$this->types = $types;
3838
}

0 commit comments

Comments
 (0)