Completed
Pull Request — master (#4)
by Arnaud
02:14
created
src/GlW3CValidator.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,10 +105,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.