Test Failed
Push — master ( 131bb7...5af539 )
by Sergio
14:29
created
src/UploadFileBehavior.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -312,10 +312,9 @@  discard block
 block discarded – undo
312 312
         if(is_string($path)){
313 313
             $path = rtrim($path, '/') . '/';
314 314
             $dirPath = \Yii::getAlias($path);
315
-        }
316
-        elseif ($path instanceof Closure || (is_array($path) && is_callable($path))) {
315
+        } elseif ($path instanceof Closure || (is_array($path) && is_callable($path))) {
317 316
             $dirPath = $path($this->owner->attributes);
318
-        }else{
317
+        } else{
319 318
             throw new InvalidCallException('Param `path` mast be string instanceof Closure or callable method.');
320 319
         }
321 320
 
@@ -325,7 +324,7 @@  discard block
 block discarded – undo
325 324
     protected function getHendler($hendler, $tmp, $path){
326 325
         if ($hendler instanceof Closure || (is_array($hendler) && is_callable($hendler))) {
327 326
             $hendler($tmp, $path);
328
-        }elseif(is_array($hendler) && array_key_exists('type', $hendler) && array_key_exists('config', $hendler)){
327
+        } elseif(is_array($hendler) && array_key_exists('type', $hendler) && array_key_exists('config', $hendler)){
329 328
             if(!in_array($hendler['type'], self::supportedFileTypes()))
330 329
             {
331 330
                 throw new InvalidConfigException('File type not supported: ' . $hendler['type']);
@@ -341,7 +340,7 @@  discard block
 block discarded – undo
341 340
                 break;
342 341
             }
343 342
 
344
-        }else{
343
+        } else{
345 344
             throw new InvalidCallException('Param `hendler` mast be instanceof Closure ,callable method or array with allowed configs.');
346 345
         }
347 346
 
Please login to merge, or discard this patch.