@@ -102,10 +102,10 @@ discard block |
||
102 | 102 | $request = $client->createRequest('POST', $w3curl . $validator, ['exceptions' => false]); |
103 | 103 | $postBody = $request->getBody(); |
104 | 104 | $postBody->addFile( |
105 | - new PostFile($field, fopen( |
|
106 | - $file, |
|
107 | - 'r' |
|
108 | - )) |
|
105 | + new PostFile($field, fopen( |
|
106 | + $file, |
|
107 | + 'r' |
|
108 | + )) |
|
109 | 109 | ); |
110 | 110 | |
111 | 111 | $retry = self::MAX_RETRY; |
@@ -166,13 +166,13 @@ discard block |
||
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]['field'], |
|
172 | - $this->types[$ext]['resulttag'], |
|
173 | - strtr($fileinfo->getRealPath(), ["\\" => "/"]), |
|
174 | - $title, |
|
175 | - $this->types[$ext]['css'] |
|
169 | + $this->types[$ext]['w3curl'], |
|
170 | + $this->types[$ext]['validator'], |
|
171 | + $this->types[$ext]['field'], |
|
172 | + $this->types[$ext]['resulttag'], |
|
173 | + strtr($fileinfo->getRealPath(), ["\\" => "/"]), |
|
174 | + $title, |
|
175 | + $this->types[$ext]['css'] |
|
176 | 176 | ); |
177 | 177 | |
178 | 178 | if (!$view) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | { |
103 | 103 | $client = new Client(); |
104 | 104 | |
105 | - $request = $client->createRequest('POST', $w3curl . $validator, ['exceptions' => false]); |
|
105 | + $request = $client->createRequest('POST', $w3curl.$validator, ['exceptions' => false]); |
|
106 | 106 | $postBody = $request->getBody(); |
107 | 107 | $postBody->addFile( |
108 | 108 | new PostFile($field, fopen( |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $html->delete('head style'); |
132 | 132 | $style = '<style type="text/css" media="all">'; |
133 | 133 | foreach ($csslist as $css) { |
134 | - $style .= '@import url("' . $w3curl . $css . '");'; |
|
134 | + $style .= '@import url("'.$w3curl.$css.'");'; |
|
135 | 135 | } |
136 | 136 | $style .= '</style>'; |
137 | 137 | $html->get("head")[0]->add($style); |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | $result = $resulttag[0]->getHtml(); |
152 | 152 | } |
153 | 153 | |
154 | - $view = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">' . |
|
155 | - $head . "</head><body><h2>$title</h2>" . |
|
156 | - $result . "</body></html>"; |
|
154 | + $view = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">'. |
|
155 | + $head."</head><body><h2>$title</h2>". |
|
156 | + $result."</body></html>"; |
|
157 | 157 | |
158 | 158 | return $view; |
159 | 159 | } |
@@ -183,11 +183,11 @@ discard block |
||
183 | 183 | return null; |
184 | 184 | } |
185 | 185 | |
186 | - $filedir = $this->resultrootdir . '/' . strtr($fileinfo->getRelativepath(), ["\\" => "/"]); |
|
186 | + $filedir = $this->resultrootdir.'/'.strtr($fileinfo->getRelativepath(), ["\\" => "/"]); |
|
187 | 187 | if (!$this->fs->exists($filedir)) { |
188 | 188 | $this->fs->mkdir($filedir); |
189 | 189 | } |
190 | - $resultname = $filedir . "/w3c_" . $ext . "_" . $fileinfo->getBaseName($ext) . 'html'; |
|
190 | + $resultname = $filedir."/w3c_".$ext."_".$fileinfo->getBaseName($ext).'html'; |
|
191 | 191 | file_put_contents($resultname, $view); |
192 | 192 | |
193 | 193 | return $resultname; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function validate(array $files, array $types, callable $callback) |
205 | 205 | { |
206 | - $filter = '/\.(' . implode('|', $types) . ')$/'; |
|
206 | + $filter = '/\.('.implode('|', $types).')$/'; |
|
207 | 207 | |
208 | 208 | $results = []; |
209 | 209 | foreach ($files as $file) { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | */ |
237 | 237 | foreach ($files as $file) { |
238 | 238 | $callback($file); |
239 | - $result[strtr($file->getRelativePath() . '/' . $file->getFilename(), ["\\" => "/"])] = $this->validateFile( |
|
239 | + $result[strtr($file->getRelativePath().'/'.$file->getFilename(), ["\\" => "/"])] = $this->validateFile( |
|
240 | 240 | $file |
241 | 241 | ); |
242 | 242 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | foreach ($finder as $finderfile) { |
260 | 260 | $callback($finderfile); |
261 | 261 | $result[strtr( |
262 | - $finderfile->getRelativePath() . '/' . $finderfile->getFilename(), |
|
262 | + $finderfile->getRelativePath().'/'.$finderfile->getFilename(), |
|
263 | 263 | ["\\" => "/"] |
264 | 264 | )] = $this->validateFile($finderfile); |
265 | 265 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $finderfile = new SplFileInfo($file, "", ""); |
269 | 269 | $callback($finderfile); |
270 | 270 | $result[strtr( |
271 | - $finderfile->getRelativePath() . '/' . $finderfile->getFilename(), |
|
271 | + $finderfile->getRelativePath().'/'.$finderfile->getFilename(), |
|
272 | 272 | ["\\" => "/"] |
273 | 273 | )] = $this->validateFile($finderfile); |
274 | 274 | } |