Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Fix Fix EnsureExplicitNullableTypes (#1717)
  • Loading branch information
OskarStark committed Apr 17, 2024
2 parents 80155cd + ced2f1e commit 9495850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rule/EnsureExplicitNullableTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function check(Lines $lines, int $number, string $filename): ViolationInt
continue;
}

$pattern = '#((?:\??\\\\?\w+[|]?)+)\s+\$(\w+)\s*=\s*null(?=\s*[,\)])#siu';
$pattern = '#([\w|\\\\?]+)\s+\$(\w+)\s*=\s*null[\n,\)]#';
if ($matches = $lines->current()->clean()->match($pattern, \PREG_SET_ORDER)) {
foreach ($matches as $match) {
Expand Down

0 comments on commit 9495850

Please sign in to comment.