Skip to content

Commit c89242c

Browse files
committed
oldClassConstructors: allow whitespaces at the beginning of the line
1 parent 41f2ef4 commit c89242c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

classes/tests/critical.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function _oldClassConstructors($line) {
144144
}
145145

146146
// find the start of PHP class declaration
147-
if (preg_match('#^(abstract\s+)?class (\w+)#', $line, $matches)) {
147+
if (preg_match('#^\s?(abstract\s+)?class (\w+)#', $line, $matches)) {
148148
$lastClassName = $matches[2];
149149
}
150150

testcases.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function FooBar()
154154
}
155155
}
156156

157-
abstract class TheThing {
158-
public function TheThing() {
157+
abstract class TheThing {
158+
public function TheThing() {
159+
}
159160
}
160-
}

0 commit comments

Comments
 (0)