Passed
Push — master ( 117a3e...a62afd )
by Evgenii
05:42
created
src/components/FileListWidget.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function init()
32 32
     {
33
-        if (empty($this->files))
34
-            return null;
33
+        if (empty($this->files)) {
34
+                    return null;
35
+        }
35 36
         Yii::$app->getModule('files')->registerTranslations();
36 37
         if (empty($this->lightboxKey)) {
37 38
             $this->lightboxKey = $this->files[0]->field . '-' . $this->files[0]->object_id;
@@ -50,8 +51,9 @@  discard block
 block discarded – undo
50 51
 
51 52
         $this->getView()->registerJs("yiiDownloadAllLink = '" . Url::toRoute('files/default/zip') . "'", View::POS_BEGIN, 'yiiDownloadAllLink');
52 53
 
53
-        if ($this->passFirst && sizeof($this->files) > 0)
54
-            $this->files = array_slice($this->files, 1);
54
+        if ($this->passFirst && sizeof($this->files) > 0) {
55
+                    $this->files = array_slice($this->files, 1);
56
+        }
55 57
 
56 58
 
57 59
         return $this->render('fileListWidget', [
Please login to merge, or discard this patch.
src/components/FileInputWidget.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@
 block discarded – undo
37 37
         $this->registerTranslations();
38 38
         $this->block_id = rand(9999999, 999999999);
39 39
 
40
-        if (!$this->uploadButtonText)
41
-            $this->uploadButtonText = Yii::t('files', 'Upload');
40
+        if (!$this->uploadButtonText) {
41
+                    $this->uploadButtonText = Yii::t('files', 'Upload');
42
+        }
42 43
 
43 44
         $this->ratio = $this->model->getBehavior('files')->attributes[$this->attribute]['ratio'] ?? null;
44 45
 
Please login to merge, or discard this patch.