@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $client = new Client(); |
| 101 | 101 | |
| 102 | - $request = $client->createRequest('POST', $w3curl . $validator, ['exceptions' => false, 'verify' => false]); |
|
| 102 | + $request = $client->createRequest('POST', $w3curl.$validator, ['exceptions' => false, 'verify' => false]); |
|
| 103 | 103 | $postBody = $request->getBody(); |
| 104 | 104 | $postBody->addFile( |
| 105 | 105 | new PostFile($field, fopen( |
@@ -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 | } |
@@ -179,11 +179,11 @@ discard block |
||
| 179 | 179 | return null; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | - $filedir = $this->resultrootdir . '/' . strtr($fileinfo->getRelativepath(), ["\\" => "/"]); |
|
| 182 | + $filedir = $this->resultrootdir.'/'.strtr($fileinfo->getRelativepath(), ["\\" => "/"]); |
|
| 183 | 183 | if (!$this->fs->exists($filedir)) { |
| 184 | 184 | $this->fs->mkdir($filedir); |
| 185 | 185 | } |
| 186 | - $resultname = $filedir . "/w3c_" . $ext . "_" . $fileinfo->getBaseName($ext) . 'html'; |
|
| 186 | + $resultname = $filedir."/w3c_".$ext."_".$fileinfo->getBaseName($ext).'html'; |
|
| 187 | 187 | file_put_contents($resultname, $view); |
| 188 | 188 | |
| 189 | 189 | return $resultname; |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | public function validate(array $files, array $types, callable $callback) |
| 201 | 201 | { |
| 202 | - $filter = '/\.(' . implode('|', $types) . ')$/'; |
|
| 202 | + $filter = '/\.('.implode('|', $types).')$/'; |
|
| 203 | 203 | |
| 204 | 204 | $results = []; |
| 205 | 205 | foreach ($files as $file) { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | */ |
| 233 | 233 | foreach ($files as $file) { |
| 234 | 234 | $callback($file); |
| 235 | - $result[strtr($file->getRelativePath() . '/' . $file->getFilename(), ["\\" => "/"])] = $this->validateFile( |
|
| 235 | + $result[strtr($file->getRelativePath().'/'.$file->getFilename(), ["\\" => "/"])] = $this->validateFile( |
|
| 236 | 236 | $file |
| 237 | 237 | ); |
| 238 | 238 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | foreach ($finder as $finderfile) { |
| 256 | 256 | $callback($finderfile); |
| 257 | 257 | $result[strtr( |
| 258 | - $finderfile->getRelativePath() . '/' . $finderfile->getFilename(), |
|
| 258 | + $finderfile->getRelativePath().'/'.$finderfile->getFilename(), |
|
| 259 | 259 | ["\\" => "/"] |
| 260 | 260 | )] = $this->validateFile($finderfile); |
| 261 | 261 | } |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $finderfile = new SplFileInfo($file, "", ""); |
| 265 | 265 | $callback($finderfile); |
| 266 | 266 | $result[strtr( |
| 267 | - $finderfile->getRelativePath() . '/' . $finderfile->getFilename(), |
|
| 267 | + $finderfile->getRelativePath().'/'.$finderfile->getFilename(), |
|
| 268 | 268 | ["\\" => "/"] |
| 269 | 269 | )] = $this->validateFile($finderfile); |
| 270 | 270 | } |
@@ -105,10 +105,10 @@ |
||
| 105 | 105 | $request = $client->createRequest('POST', $w3curl . $validator, ['exceptions' => false]); |
| 106 | 106 | $postBody = $request->getBody(); |
| 107 | 107 | $postBody->addFile( |
| 108 | - new PostFile($field, fopen( |
|
| 109 | - $file, |
|
| 110 | - 'r' |
|
| 111 | - )) |
|
| 108 | + new PostFile($field, fopen( |
|
| 109 | + $file, |
|
| 110 | + 'r' |
|
| 111 | + )) |
|
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | 114 | $retry = self::MAX_RETRY; |