Completed
Pull Request — master (#23)
by Roman
05:09
created
src/Helpers/TransactionHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
      * @param array ...$args
43 43
      * @return array
44 44
      */
45
-    public static function forEach(callable $closure, array $array, ...$args)
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/QueryHelper.php 1 patch
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.
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
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         return \array_reduce(
110 110
             $files,
111
-            function (bool $carry, UploadedFile $file) use ($model, $attribute) {
111
+            function(bool $carry, UploadedFile $file) use ($model, $attribute) {
112 112
                 if (!$carry) {
113 113
                     return false;
114 114
                 }
Please login to merge, or discard this patch.
src/Validators/ConstRangeValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getClosure(): \Closure
59 59
     {
60
-        return function ($model, $attribute) {
60
+        return function($model, $attribute) {
61 61
             $prefix = $this->prefix ?? \strtoupper($attribute) . '_';
62 62
             $class = $this->targetClass ?? \get_class($model);
63 63
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             return $constants;
107 107
         }
108 108
 
109
-        return \array_filter($constants, function (string $constant): bool {
109
+        return \array_filter($constants, function(string $constant): bool {
110 110
             return !\in_array($constant, $this->except);
111 111
         });
112 112
     }
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
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             return $value;
78 78
         }
79 79
 
80
-        if (!\in_array($this->returnType, [static::RETURN_TYPE_BOOL, static::RETURN_TYPE_INT,])) {
80
+        if (!\in_array($this->returnType, [static::RETURN_TYPE_BOOL, static::RETURN_TYPE_INT, ])) {
81 81
             throw new InvalidConfigException("Invalid return type {$this->returnType}");
82 82
         }
83 83
         return $this->returnType === static::RETURN_TYPE_BOOL ? $value : (int)$value;
Please login to merge, or discard this patch.
src/Behaviors/FlexibleTimestampBehavior.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@
 block discarded – undo
40 40
             $date = null;
41 41
             \preg_replace_callback_array(
42 42
                 [
43
-                    '/^\d{4}\-\d{2}\-\d{2}$/' => function ($match) use (&$date) {
43
+                    '/^\d{4}\-\d{2}\-\d{2}$/' => function($match) use (&$date) {
44 44
                         $date = Carbon::createFromFormat('Y-m-d', $match[0]);
45 45
                     },
46
-                    '/^\d{2}\.\d{2}\.\d{4}$/' => function ($match) use (&$date) {
46
+                    '/^\d{2}\.\d{2}\.\d{4}$/' => function($match) use (&$date) {
47 47
                         $date = Carbon::createFromFormat('d.m.Y', $match[0]);
48 48
                     },
49
-                    '/^\d{2}\.\d{2}\.\d{2}$/' => function ($match) use (&$date) {
49
+                    '/^\d{2}\.\d{2}\.\d{2}$/' => function($match) use (&$date) {
50 50
                         $date = Carbon::createFromFormat('d.m.y', $match[0]);
51 51
                     },
52
-                    '/^\d+$/' => function ($match) use (&$date) {
52
+                    '/^\d+$/' => function($match) use (&$date) {
53 53
                         $date = Carbon::createFromTimestamp($match[0]);
54 54
                     }
55 55
                 ],
Please login to merge, or discard this patch.