@@ -166,14 +166,14 @@ |
||
166 | 166 | $ext = $fileinfo->getExtension(); |
167 | 167 | $title = strtr($fileinfo->getRelativePathname(), ["\\" => "/"]); |
168 | 168 | $view = $this->sendToW3C( |
169 | - $this->types[$ext]['w3curl'], |
|
170 | - $this->types[$ext]['validator'], |
|
171 | - $this->types[$ext]['selector'], |
|
172 | - $this->types[$ext]['field'], |
|
173 | - $this->types[$ext]['resulttag'], |
|
174 | - strtr($fileinfo->getRealPath(), ["\\" => "/"]), |
|
175 | - $title, |
|
176 | - $this->types[$ext]['css'] |
|
169 | + $this->types[$ext]['w3curl'], |
|
170 | + $this->types[$ext]['validator'], |
|
171 | + $this->types[$ext]['selector'], |
|
172 | + $this->types[$ext]['field'], |
|
173 | + $this->types[$ext]['resulttag'], |
|
174 | + strtr($fileinfo->getRealPath(), ["\\" => "/"]), |
|
175 | + $title, |
|
176 | + $this->types[$ext]['css'] |
|
177 | 177 | ); |
178 | 178 | |
179 | 179 | if ($view === null) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $retry = self::MAX_RETRY; |
106 | 106 | $response = null; |
107 | 107 | while ($retry--) { |
108 | - $response = $client->post($w3curl . $validator, |
|
108 | + $response = $client->post($w3curl.$validator, |
|
109 | 109 | [ |
110 | 110 | 'exceptions' => false, |
111 | 111 | 'verify' => false, |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $html->delete('head style'); |
129 | 129 | $style = '<style type="text/css" media="all">'; |
130 | 130 | foreach ($csslist as $css) { |
131 | - $style .= '@import url("' . $w3curl . $css . '");'; |
|
131 | + $style .= '@import url("'.$w3curl.$css.'");'; |
|
132 | 132 | } |
133 | 133 | $style .= '</style>'; |
134 | 134 | $html->get("head")[0]->add($style); |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | $result = $resulttag[0]->getHtml(); |
149 | 149 | } |
150 | 150 | |
151 | - $view = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">' . |
|
152 | - $head . "</head><body><h2>$title</h2>" . |
|
153 | - $result . "</body></html>"; |
|
151 | + $view = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">'. |
|
152 | + $head."</head><body><h2>$title</h2>". |
|
153 | + $result."</body></html>"; |
|
154 | 154 | |
155 | 155 | return $view; |
156 | 156 | } |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | return null; |
181 | 181 | } |
182 | 182 | |
183 | - $filedir = $this->resultrootdir . '/' . strtr($fileinfo->getRelativepath(), ["\\" => "/"]); |
|
183 | + $filedir = $this->resultrootdir.'/'.strtr($fileinfo->getRelativepath(), ["\\" => "/"]); |
|
184 | 184 | if (!$this->fs->exists($filedir)) { |
185 | 185 | $this->fs->mkdir($filedir); |
186 | 186 | } |
187 | - $resultname = $filedir . "/w3c_" . $ext . "_" . $fileinfo->getBaseName($ext) . 'html'; |
|
187 | + $resultname = $filedir."/w3c_".$ext."_".$fileinfo->getBaseName($ext).'html'; |
|
188 | 188 | file_put_contents($resultname, $view); |
189 | 189 | |
190 | 190 | return $resultname; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function validate(array $files, array $types, callable $callback) |
202 | 202 | { |
203 | - $filter = '/\.(' . implode('|', $types) . ')$/'; |
|
203 | + $filter = '/\.('.implode('|', $types).')$/'; |
|
204 | 204 | |
205 | 205 | $results = []; |
206 | 206 | foreach ($files as $file) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | foreach ($files as $file) { |
235 | 235 | $callback($file); |
236 | - $result[strtr($file->getRelativePath() . '/' . $file->getFilename(), ["\\" => "/"])] = $this->validateFile( |
|
236 | + $result[strtr($file->getRelativePath().'/'.$file->getFilename(), ["\\" => "/"])] = $this->validateFile( |
|
237 | 237 | $file |
238 | 238 | ); |
239 | 239 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | foreach ($finder as $finderfile) { |
257 | 257 | $callback($finderfile); |
258 | 258 | $result[strtr( |
259 | - $finderfile->getRelativePath() . '/' . $finderfile->getFilename(), |
|
259 | + $finderfile->getRelativePath().'/'.$finderfile->getFilename(), |
|
260 | 260 | ["\\" => "/"] |
261 | 261 | )] = $this->validateFile($finderfile); |
262 | 262 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $finderfile = new SplFileInfo($file, "", ""); |
266 | 266 | $callback($finderfile); |
267 | 267 | $result[strtr( |
268 | - $finderfile->getRelativePath() . '/' . $finderfile->getFilename(), |
|
268 | + $finderfile->getRelativePath().'/'.$finderfile->getFilename(), |
|
269 | 269 | ["\\" => "/"] |
270 | 270 | )] = $this->validateFile($finderfile); |
271 | 271 | } |