Passed
Push — master ( 22651e...d2ef54 )
by Andrey
07:31
created
traits/ThumbnailTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @return mixed
28 28
      */
29
-    public function getDefaultThumbImage(array $options = [])
29
+    public function getDefaultThumbImage(array $options = [ ])
30 30
     {
31 31
         $thumbnailModel = $this->getThumbnailModel();
32 32
 
33
-        if (null === $thumbnailModel){
33
+        if (null === $thumbnailModel) {
34 34
             return null;
35 35
         }
36 36
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
             return null;
41 41
         }
42 42
 
43
-        if (empty($options['alt'])) {
44
-            $options['alt'] = $thumbnailModel->alt;
43
+        if (empty($options[ 'alt' ])) {
44
+            $options[ 'alt' ] = $thumbnailModel->alt;
45 45
         }
46 46
 
47 47
         return Html::img($url, $options);
Please login to merge, or discard this patch.
models/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 'exist',
138 138
                 'skipOnError' => true,
139 139
                 'targetClass' => Position::class,
140
-                'targetAttribute' => ['position_id' => 'id']
140
+                'targetAttribute' => [ 'position_id' => 'id' ]
141 141
             ],
142 142
         ];
143 143
     }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      */
308 308
     public function getFullName(): string
309 309
     {
310
-        return $this->first_name . ' ' . $this->last_name;
310
+        return $this->first_name.' '.$this->last_name;
311 311
     }
312 312
 
313 313
     /**
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
      */
433 433
     public function moveOrder(int $order): void
434 434
     {
435
-        if ($order == $this->order){
435
+        if ($order == $this->order) {
436 436
             return;
437 437
         }
438 438
 
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
             ])
444 444
             ->one();
445 445
         $future->detachBehavior('mediafile');
446
-        $future->order = $order > $this->order ? $order-1 : $order+1;
446
+        $future->order = $order > $this->order ? $order - 1 : $order + 1;
447 447
         $future->save();
448 448
 
449 449
         $this->detachBehavior('mediafile');
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
      */
459 459
     public function beforeSave($insert)
460 460
     {
461
-        if ($this->isNewRecord){
461
+        if ($this->isNewRecord) {
462 462
             $this->order = $this->maxOrder == null ? 1 : $this->maxOrder + 1;
463 463
         }
464 464
 
Please login to merge, or discard this patch.
models/Product.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * @var array
48 48
      */
49
-    public $albums = [];
49
+    public $albums = [ ];
50 50
 
51 51
     /**
52 52
      * Initialize.
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
                 'exist',
109 109
                 'skipOnError' => true,
110 110
                 'targetClass' => Page::class,
111
-                'targetAttribute' => ['pageId' => 'id']
111
+                'targetAttribute' => [ 'pageId' => 'id' ]
112 112
             ],
113 113
             [
114 114
                 UploadModelInterface::FILE_TYPE_THUMB,
115
-                function($attribute){
116
-                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){
115
+                function($attribute) {
116
+                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) {
117 117
                         $this->addError($attribute, 'Tumbnail content must be a numeric or string.');
118 118
                     }
119 119
                 },
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             [
132 132
                 'albums',
133 133
                 'each',
134
-                'rule' => ['integer'],
134
+                'rule' => [ 'integer' ],
135 135
             ],
136 136
         ];
137 137
     }
Please login to merge, or discard this patch.
models/Page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * @var array
43 43
      */
44
-    public $albums = [];
44
+    public $albums = [ ];
45 45
 
46 46
     /**
47 47
      * @var int
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
             ],
102 102
             [
103 103
                 UploadModelInterface::FILE_TYPE_THUMB,
104
-                function($attribute){
105
-                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})){
104
+                function($attribute) {
105
+                    if (!is_numeric($this->{$attribute}) && !is_string($this->{$attribute})) {
106 106
                         $this->addError($attribute, 'Tumbnail content must be a numeric or string.');
107 107
                     }
108 108
                 },
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             [
112 112
                 'albums',
113 113
                 'each',
114
-                'rule' => ['integer'],
114
+                'rule' => [ 'integer' ],
115 115
             ],
116 116
         ];
117 117
     }
Please login to merge, or discard this patch.