File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 121
121
if ($ _POST ["inspection_lint " ] === "on " ){
122
122
$ inspections [] = new SyntaxErrorInspection ($ dir );
123
123
}
124
- $ jsonData = [
125
- "phar " => "http://pmt.mcpe.me " . $ url ,
126
- "expiry " => time () + 7200 ,
127
- "inspections " => []
128
- ];
129
- foreach ($ inspections as $ inspection ){
130
- $ result = $ inspection ->run ();
131
- if (!$ jsonExpected ){
132
- $ result ->htmlEcho ();
133
- }else {
134
- $ jsonData ["inspections " ][$ result ->getName ()] = $ result ->jsonResult ();
135
- }
136
- }
137
124
if ($ jsonExpected ){
125
+ $ jsonData = [
126
+ "phar " => "http://pmt.mcpe.me " . $ url ,
127
+ "expiry " => time () + 7200 ,
128
+ "inspections " => []
129
+ ];
130
+ foreach ($ inspections as $ inspection ){
131
+ $ jsonData ["inspections " ][$ result ->getName ()] = $ inspection ->run ()->jsonResult ();
132
+ }
138
133
echo json_encode ($ jsonData );
139
134
die;
140
135
}
148
143
echo "<hr> " ;
149
144
echo "<h2>Inspections</h2> " ;
150
145
echo "<ul> " ;
146
+ foreach ($ inspections as $ inspection ){
147
+ $ inspection ->run ()->htmlEcho ();
148
+ }
151
149
echo "</ul> " ;
152
150
echo "<p>End of inspections</p> " ;
153
151
?>
You can’t perform that action at this time.
0 commit comments