1
1
<?php
2
2
3
- /**
4
- * pmt.mcpe.me
5
- * Copyright (C) 2015 PEMapModder
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- * You should have received a copy of the GNU General Public License along
15
- * with this program; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
3
namespace inspections ;
20
4
21
5
class SyntaxErrorInspection{
@@ -31,8 +15,7 @@ public function run(){
31
15
$ good = 0 ;
32
16
$ bad = 0 ;
33
17
foreach (new \RegexIterator (new \RecursiveIteratorIterator (new \RecursiveDirectoryIterator ($ this ->dir )), "# \\.php \$# " ) as $ file ){
34
- $ ef = escapeshellarg ($ file );
35
- exec ("php -l $ ef 2>&1 " , $ out );
18
+ exec ("php -l $ file 2>&1 " , $ out );
36
19
$ lint = implode ("<br> " , $ out );
37
20
if (strpos ($ lint , "No syntax errors detected in " ) === 0 ){
38
21
$ good ++;
0 commit comments