Passed
Push — master ( 16fa17...196500 )
by Alexander
05:25
created
src/Validators/LoaderValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         /** @uses ActiveRecord::find() */
80 80
         $query = $this->getQuery()->andWhere([$this->operator, $this->targetAttribute, $value]);
81 81
 
82
-        $closure = function ($value, $attribute) {
82
+        $closure = function($value, $attribute) {
83 83
             $this->{$attribute} = $value;
84 84
             return $value;
85 85
         };
Please login to merge, or discard this patch.
src/Validators/ConstRangeValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function getClosure(): \Closure
52 52
     {
53
-        return function ($model, $attribute) {
53
+        return function($model, $attribute) {
54 54
             $prefix = $this->prefix ?? strtoupper($attribute) . '_';
55 55
             $class = $this->targetClass ?? get_class($model);
56 56
 
Please login to merge, or discard this patch.
src/Validators/FileValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function filterFiles(Model $model, string $attribute)
48 48
     {
49
-        return $model->{$attribute} = array_values(array_filter((array)$model->{$attribute}, function ($file) {
49
+        return $model->{$attribute} = array_values(array_filter((array)$model->{$attribute}, function($file) {
50 50
             return $file instanceof UploadedFile && $file->error != UPLOAD_ERR_NO_FILE;
51 51
         }));
52 52
     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         return array_reduce(
109 109
             $files,
110
-            function (bool $carry, UploadedFile $file) use ($model, $attribute) {
110
+            function(bool $carry, UploadedFile $file) use ($model, $attribute) {
111 111
                 if (!$carry) {
112 112
                     return false;
113 113
                 }
Please login to merge, or discard this patch.
src/Helpers/TransactionHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     public static function forEach (callable $closure, array $array, ...$args)
46 46
     {
47 47
         return array_map(
48
-            function ($item) use ($closure, $args) {
48
+            function($item) use ($closure, $args) {
49 49
                 return static::within($closure, $item, ...$args);
50 50
             },
51 51
             $array
Please login to merge, or discard this patch.
src/Helpers/AttributesFilterHelper.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
     public static function apply(array $attributes, array $filters) :array
23 23
     {
24 24
         foreach ($filters as $attribute => $filter) {
25
-            if (!array_key_exists($attribute, $attributes)) continue;
25
+            if (!array_key_exists($attribute, $attributes)) {
26
+                continue;
27
+            }
26 28
 
27 29
             $attributes[$attribute] = $filter($attributes[$attribute]);
28 30
         }
Please login to merge, or discard this patch.
src/Helpers/QueryHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public static function sqlCall(string $sqlMethod, ...$params): Expression
19 19
     {
20
-        $expressions = implode(', ', array_map(function ($expression) {
20
+        $expressions = implode(', ', array_map(function($expression) {
21 21
             return "({$expression})";
22 22
         }, (array)$params));
23 23
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -30,6 +30,7 @@
 block discarded – undo
30 30
      * Only for PostgreSQL
31 31
      *
32 32
      * @param array ...$params
33
+     * @param string $params
33 34
      * @return Expression
34 35
      */
35 36
     public static function coalesce(...$params): Expression
Please login to merge, or discard this patch.
tests/Mocks/TimestampTestMock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         return [
32 32
             'flexibleTimestamp' => [
33 33
                 'class' => FlexibleTimestampBehavior::class,
34
-                'attributes' => ['timestamp', 'date1', 'date2',],
34
+                'attributes' => ['timestamp', 'date1', 'date2', ],
35 35
                 'format' => $this->format,
36 36
             ],
37 37
         ];
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function rules()
44 44
     {
45 45
         return [
46
-            [['timestamp', 'date1', 'date2',], 'date', 'format' => 'php:Y-m-d',],
46
+            [['timestamp', 'date1', 'date2', ], 'date', 'format' => 'php:Y-m-d', ],
47 47
         ];
48 48
     }
49 49
 }
50 50
\ No newline at end of file
Please login to merge, or discard this patch.
tests/Mocks/NumberTestMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function rules()
34 34
     {
35 35
         return [
36
-            ['phone', 'string',],
36
+            ['phone', 'string', ],
37 37
         ];
38 38
     }
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
src/Behaviors/BooleanBehavior.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
             return $value;
77 77
         }
78 78
 
79
-        if (!in_array($this->returnType, [static::RETURN_TYPE_BOOL, static::RETURN_TYPE_INT,])) {
79
+        if (!in_array($this->returnType, [static::RETURN_TYPE_BOOL, static::RETURN_TYPE_INT, ])) {
80 80
             throw new InvalidConfigException("Invalid return type {$this->returnType}");
81 81
         }
82 82
         return $this->returnType === static::RETURN_TYPE_BOOL ? $value : (int)$value;
Please login to merge, or discard this patch.