Completed
Push — master ( 8a2426...50f973 )
by MeWebStudio - Muharrem
10s
created
src/Purifier.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
      */
59 59
     private function setUp()
60 60
     {
61
-        if (!$this->config->has('purifier')) {
62
-            if (!$this->config->has('mews.purifier')) {
61
+        if ( ! $this->config->has('purifier')) {
62
+            if ( ! $this->config->has('mews.purifier')) {
63 63
                 throw new Exception('Configuration parameters not loaded!');
64 64
             }
65 65
             $this->config->set('purifier', $this->config->get('mews.purifier'));
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $config = HTMLPurifier_Config::createDefault();
72 72
 
73 73
         // Allow configuration to be modified
74
-        if (!$this->config->get('purifier.finalize')) {
74
+        if ( ! $this->config->get('purifier.finalize')) {
75 75
             $config->autoFinalize = false;
76 76
         }
77 77
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
         $cachePath = $this->config->get('purifier.cachePath');
90 90
 
91 91
         if ($cachePath) {
92
-            if (!$this->files->isDirectory($cachePath)) {
93
-                $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755) );
92
+            if ( ! $this->files->isDirectory($cachePath)) {
93
+                $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755));
94 94
             }
95 95
         }
96 96
     }
@@ -110,19 +110,19 @@  discard block
 block discarded – undo
110 110
      */
111 111
     protected function getConfig($config = null)
112 112
     {
113
-        $default_config = [];
114
-        $default_config['Core.Encoding']        = $this->config->get('purifier.encoding');
115
-        $default_config['Cache.SerializerPath'] = $this->config->get('purifier.cachePath');
116
-        $default_config['Cache.SerializerPermissions'] = $this->config->get('purifier.cacheFileMode', 0755 );
113
+        $default_config = [ ];
114
+        $default_config[ 'Core.Encoding' ]        = $this->config->get('purifier.encoding');
115
+        $default_config[ 'Cache.SerializerPath' ] = $this->config->get('purifier.cachePath');
116
+        $default_config[ 'Cache.SerializerPermissions' ] = $this->config->get('purifier.cacheFileMode', 0755);
117 117
 
118
-        if (!$config) {
118
+        if ( ! $config) {
119 119
             $config = $this->config->get('purifier.settings.default');
120 120
         } elseif (is_string($config)) {
121
-            $config = $this->config->get('purifier.settings.' . $config);
121
+            $config = $this->config->get('purifier.settings.'.$config);
122 122
         }
123 123
 
124
-        if (!is_array($config)) {
125
-            $config = [];
124
+        if ( ! is_array($config)) {
125
+            $config = [ ];
126 126
         }
127 127
 
128 128
         $config = $default_config + $config;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public function clean($dirty, $config = null)
139 139
     {
140 140
         if (is_array($dirty)) {
141
-            return array_map(function ($item) use ($config) {
141
+            return array_map(function($item) use ($config) {
142 142
                 return $this->clean($item, $config);
143 143
             }, $dirty);
144 144
         } else {
Please login to merge, or discard this patch.