Skip to content

Commit 4f2a8ec

Browse files
committed
fix patch for PHP 7.0
1 parent 8553f18 commit 4f2a8ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

patch.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function patchDir(string $base, string $dir): int
2323
}
2424
$patched = $original = file_get_contents($filename);
2525
$patched = preg_replace('/\):\s*(\?[a-zA-Z]+|void)\s*\n/', ") /*:$1*/\n", $patched);
26+
$patched = preg_replace('/([\(,])\s*(\?[a-zA-Z]+|void)\s+\$/', "$1 /*$2*/ \$", $patched);
2627
$patched = preg_replace('/(private|public|protected) const/', "/*$1*/ const", $patched);
2728
if ($patched && $patched != $original) {
2829
file_put_contents($filename, $patched);

0 commit comments

Comments
 (0)