Skip to content

Commit f9d0536

Browse files
committed
Simplify code
1 parent e3691b9 commit f9d0536

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/PHPStan/UnsafeStrictGroupsCallRule.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function processNode(Node $node, Scope $scope): array
5757
return [];
5858
}
5959

60-
$patternArg = $args[0] ?? null;
60+
$patternArg = $args[0];
6161
if ($isPreg) {
6262
if (!isset($args[2])) { // no matches set, skip as the matches won't be used anyway
6363
return [];
@@ -67,10 +67,6 @@ public function processNode(Node $node, Scope $scope): array
6767
$flagsArg = $args[2] ?? null;
6868
}
6969

70-
if ($patternArg === null) {
71-
return [];
72-
}
73-
7470
$flagsType = PregMatchFlags::getType($flagsArg, $scope);
7571
if ($flagsType === null) {
7672
return [];

0 commit comments

Comments
 (0)