We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ca8796 commit 41f2ef4Copy full SHA for 41f2ef4
classes/tests/critical.php
@@ -144,10 +144,8 @@ public function _oldClassConstructors($line) {
144
}
145
146
// find the start of PHP class declaration
147
- if (strpos($line, 'class') === 0) {
148
- if (preg_match('#class (\w+)#', $line, $matches)) {
149
- $lastClassName = $matches[1];
150
- }
+ if (preg_match('#^(abstract\s+)?class (\w+)#', $line, $matches)) {
+ $lastClassName = $matches[2];
151
152
153
// is the class name used as the function name?
testcases.php
@@ -153,3 +153,8 @@ function FooBar()
// NOP
154
155
156
+
157
+abstract class TheThing {
158
+ public function TheThing() {
159
+ }
160
+}
0 commit comments