Passed
Push — master ( fda7ec...4fe9af )
by Enjoys
02:22
created
src/Rule/Upload.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -144,14 +144,14 @@  discard block
 block discarded – undo
144 144
 
145 145
         $parsed = $this->parseRuleOpts($ruleOpts);
146 146
 
147
-        $threshold_size = (int)$parsed['param'];
147
+        $threshold_size = (int) $parsed['param'];
148 148
         $message = $parsed['message'];
149 149
 
150 150
         if (is_null($message)) {
151
-            $message = 'Размер файла (' . Binary::bytes((int)$value->getSize())->format(null, " ") . ')'
151
+            $message = 'Размер файла (' . Binary::bytes((int) $value->getSize())->format(null, " ") . ')'
152 152
                 . ' превышает допустимый размер: ' . Binary::bytes($threshold_size)->format(null, " ");
153 153
         }
154
-        $this->setMessage((string)$message);
154
+        $this->setMessage((string) $message);
155 155
 
156 156
         if ($value->getSize() > $threshold_size) {
157 157
             $element->setRuleError($this->getMessage());
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
         $expected_extensions = \array_map('trim', \explode(",", $parsed['param']));
179 179
         $message = $parsed['message'];
180 180
 
181
-        $extension = pathinfo((string)$value->getClientFilename(), PATHINFO_EXTENSION);
181
+        $extension = pathinfo((string) $value->getClientFilename(), PATHINFO_EXTENSION);
182 182
 
183 183
         if (is_null($message)) {
184 184
             $message = 'Загрузка файлов с расширением .' . $extension . ' запрещена';
185 185
         }
186
-        $this->setMessage((string)$message);
186
+        $this->setMessage((string) $message);
187 187
 
188 188
         if (!in_array($extension, $expected_extensions)) {
189 189
             $element->setRuleError($this->getMessage());
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     private function parseRuleOpts($opts): array
201 201
     {
202 202
         if (!is_array($opts)) {
203
-            $opts = (array)$opts;
203
+            $opts = (array) $opts;
204 204
             $opts[1] = null;
205 205
         }
206 206
         list($param, $message) = $opts;
Please login to merge, or discard this patch.