Passed
Push — master ( 4e14c1...48e7bd )
by Zhou
19:21 queued 13s
created
src/PurifierServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     protected function getConfigSource()
37 37
     {
38
-        return realpath(__DIR__.'/../config/purifier.php');
38
+        return realpath(__DIR__ . '/../config/purifier.php');
39 39
     }
40 40
 
41 41
     /**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $this->mergeConfigFrom($this->getConfigSource(), 'purifier');
49 49
         
50
-        $this->app->singleton('purifier', function (Container $app) {
50
+        $this->app->singleton('purifier', function(Container $app) {
51 51
             return new Purifier($app['files'], $app['config']);
52 52
         });
53 53
 
Please login to merge, or discard this patch.
src/Purifier.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,11 +143,11 @@
 block discarded – undo
143 143
                 }
144 144
 
145 145
                 continue;
146
-	    }
146
+        }
147 147
 
148
-	    if (class_exists($validValues)) {
149
-		$validValues = new $validValues();
150
-	    }
148
+        if (class_exists($validValues)) {
149
+        $validValues = new $validValues();
150
+        }
151 151
 
152 152
             $definition->addAttribute($onElement, $attrName, $validValues);
153 153
         }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
         if ($cachePath) {
192 192
             if (!$this->files->isDirectory($cachePath)) {
193
-                $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755),true);
193
+                $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755), true);
194 194
             }
195 195
         }
196 196
     }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $configObject = HTMLPurifier_Config::createDefault();
207 207
 
208 208
         // Allow configuration to be modified
209
-        if (! $this->config->get('purifier.finalize')) {
209
+        if (!$this->config->get('purifier.finalize')) {
210 210
             $configObject->autoFinalize = false;
211 211
         }
212 212
 
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
         $defaultConfig['Cache.SerializerPath'] = $this->config->get('purifier.cachePath');
217 217
         $defaultConfig['Cache.SerializerPermissions'] = $this->config->get('purifier.cacheFileMode', 0755);
218 218
 
219
-        if (! $config) {
219
+        if (!$config) {
220 220
             $config = $this->config->get('purifier.settings.default');
221 221
         } elseif (is_string($config)) {
222 222
             $config = $this->config->get('purifier.settings.' . $config);
223 223
         }
224 224
 
225
-        if (! is_array($config)) {
225
+        if (!is_array($config)) {
226 226
             $config = [];
227 227
         }
228 228
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     public function clean($dirty, $config = null, \Closure $postCreateConfigHook = null)
264 264
     {
265 265
         if (is_array($dirty)) {
266
-            return array_map(function ($item) use ($config) {
266
+            return array_map(function($item) use ($config) {
267 267
                 return $this->clean($item, $config);
268 268
             }, $dirty);
269 269
         }
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         //If $dirty is not an explicit string, bypass purification assuming configuration allows this
281 281
         $ignoreNonStrings = $this->config->get('purifier.ignoreNonStrings', false);
282 282
         $stringTest = is_string($dirty);
283
-        if($stringTest === false && $ignoreNonStrings === true) {
283
+        if ($stringTest === false && $ignoreNonStrings === true) {
284 284
             return $dirty;
285 285
         }
286 286
 
Please login to merge, or discard this patch.
config/purifier.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -50,30 +50,30 @@  discard block
 block discarded – undo
50 50
                 ['header',  'Block', 'Flow', 'Common'],
51 51
                 ['footer',  'Block', 'Flow', 'Common'],
52 52
 				
53
-				// Content model actually excludes several tags, not modelled here
53
+                // Content model actually excludes several tags, not modelled here
54 54
                 ['address', 'Block', 'Flow', 'Common'],
55 55
                 ['hgroup', 'Block', 'Required: h1 | h2 | h3 | h4 | h5 | h6', 'Common'],
56 56
 				
57
-				// http://developers.whatwg.org/grouping-content.html
57
+                // http://developers.whatwg.org/grouping-content.html
58 58
                 ['figure', 'Block', 'Optional: (figcaption, Flow) | (Flow, figcaption) | Flow', 'Common'],
59 59
                 ['figcaption', 'Inline', 'Flow', 'Common'],
60 60
 				
61
-				// http://developers.whatwg.org/the-video-element.html#the-video-element
61
+                // http://developers.whatwg.org/the-video-element.html#the-video-element
62 62
                 ['video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', [
63 63
                     'src' => 'URI',
64
-					'type' => 'Text',
65
-					'width' => 'Length',
66
-					'height' => 'Length',
67
-					'poster' => 'URI',
68
-					'preload' => 'Enum#auto,metadata,none',
69
-					'controls' => 'Bool',
64
+                    'type' => 'Text',
65
+                    'width' => 'Length',
66
+                    'height' => 'Length',
67
+                    'poster' => 'URI',
68
+                    'preload' => 'Enum#auto,metadata,none',
69
+                    'controls' => 'Bool',
70 70
                 ]],
71 71
                 ['source', 'Block', 'Flow', 'Common', [
72
-					'src' => 'URI',
73
-					'type' => 'Text',
72
+                    'src' => 'URI',
73
+                    'type' => 'Text',
74 74
                 ]],
75 75
 
76
-				// http://developers.whatwg.org/text-level-semantics.html
76
+                // http://developers.whatwg.org/text-level-semantics.html
77 77
                 ['s',    'Inline', 'Inline', 'Common'],
78 78
                 ['var',  'Inline', 'Inline', 'Common'],
79 79
                 ['sub',  'Inline', 'Inline', 'Common'],
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 ['mark', 'Inline', 'Inline', 'Common'],
82 82
                 ['wbr',  'Inline', 'Empty', 'Core'],
83 83
 				
84
-				// http://developers.whatwg.org/edits.html
84
+                // http://developers.whatwg.org/edits.html
85 85
                 ['ins', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']],
86 86
                 ['del', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']],
87 87
             ],
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
             'elements' => [
45 45
                 // http://developers.whatwg.org/sections.html
46 46
                 ['section', 'Block', 'Flow', 'Common'],
47
-                ['nav',     'Block', 'Flow', 'Common'],
47
+                ['nav', 'Block', 'Flow', 'Common'],
48 48
                 ['article', 'Block', 'Flow', 'Common'],
49
-                ['aside',   'Block', 'Flow', 'Common'],
50
-                ['header',  'Block', 'Flow', 'Common'],
51
-                ['footer',  'Block', 'Flow', 'Common'],
49
+                ['aside', 'Block', 'Flow', 'Common'],
50
+                ['header', 'Block', 'Flow', 'Common'],
51
+                ['footer', 'Block', 'Flow', 'Common'],
52 52
 				
53 53
 				// Content model actually excludes several tags, not modelled here
54 54
                 ['address', 'Block', 'Flow', 'Common'],
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
                 ]],
75 75
 
76 76
 				// http://developers.whatwg.org/text-level-semantics.html
77
-                ['s',    'Inline', 'Inline', 'Common'],
78
-                ['var',  'Inline', 'Inline', 'Common'],
79
-                ['sub',  'Inline', 'Inline', 'Common'],
80
-                ['sup',  'Inline', 'Inline', 'Common'],
77
+                ['s', 'Inline', 'Inline', 'Common'],
78
+                ['var', 'Inline', 'Inline', 'Common'],
79
+                ['sub', 'Inline', 'Inline', 'Common'],
80
+                ['sup', 'Inline', 'Inline', 'Common'],
81 81
                 ['mark', 'Inline', 'Inline', 'Common'],
82
-                ['wbr',  'Inline', 'Empty', 'Core'],
82
+                ['wbr', 'Inline', 'Empty', 'Core'],
83 83
 				
84 84
 				// http://developers.whatwg.org/edits.html
85 85
                 ['ins', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']],
Please login to merge, or discard this patch.