Completed
Push — master ( 39f9e8...30031a )
by Emmanuel
02:50 queued 10s
created
src/GlW3CValidator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.