File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,11 @@ public function detectFalsyFunction(): bool
123123 return true ;
124124 }
125125
126+ //used to detect class_implements
127+ if (preg_match ("/&false; when the given class doesn't exist/m " , $ file )) {
128+ return true ;
129+ }
130+
126131 return false ;
127132 }
128133
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ public function testDetectFalsyFunction()
1818 $ arrayReplace = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/array/functions/array-replace.xml ' );
1919 $ mktime = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/datetime/functions/mktime.xml ' );
2020 $ date = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/datetime/functions/date.xml ' );
21+ $ classImplement = new DocPage (__DIR__ . '/../doc/doc-en/en/reference/spl/functions/class-implements.xml ' );
2122
2223 $ this ->assertTrue ($ pregMatch ->detectFalsyFunction ());
2324 $ this ->assertFalse ($ implode ->detectFalsyFunction ());
@@ -29,6 +30,7 @@ public function testDetectFalsyFunction()
2930 $ this ->assertFalse ($ arrayReplace ->detectFalsyFunction ());
3031 $ this ->assertTrue ($ mktime ->detectFalsyFunction ());
3132 $ this ->assertTrue ($ date ->detectFalsyFunction ());
33+ $ this ->assertTrue ($ classImplement ->detectFalsyFunction ());
3234 }
3335
3436 public function testDetectNullsyFunction ()
You can’t perform that action at this time.
0 commit comments