Completed
Push — master ( d9db52...7b2c57 )
by Maksim
16s queued 11s
created
src/Exceptions/NotSupportedMultiUnitField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct($field, $code = 0, Throwable $previous = null)
10 10
     {
11
-        parent::__construct('Requested field "'.$field.'" is not multi-unit field', $code, $previous);
11
+        parent::__construct('Requested field "' . $field . '" is not multi-unit field', $code, $previous);
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
src/MultiUnitModelsServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         if ($this->app->runningInConsole()) {
21 21
             if (!str_contains($this->app->version(), 'Lumen')) {
22 22
                 $this->publishes([
23
-                    __DIR__.'/../config/multi-units.php' => config_path('multi-units.php'),
23
+                    __DIR__ . '/../config/multi-units.php' => config_path('multi-units.php'),
24 24
                 ], 'config');
25 25
             }
26 26
         }
@@ -50,6 +50,6 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function register()
52 52
     {
53
-        $this->mergeConfigFrom(__DIR__.'/../config/multi-units.php', 'multi-units');
53
+        $this->mergeConfigFrom(__DIR__ . '/../config/multi-units.php', 'multi-units');
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/Exceptions/NotSupportedMultiUnitFieldUnit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct($field, $unit, $code = 0, Throwable $previous = null)
10 10
     {
11
-        parent::__construct('Requested field "'.$field.'" doesn\'t support '.$unit, $code, $previous);
11
+        parent::__construct('Requested field "' . $field . '" doesn\'t support ' . $unit, $code, $previous);
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
src/Traits/MultiUnitSupport.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     private function getUnitConversionDataColumns()
20 20
     {
21 21
         return array_map(function ($column) {
22
-            return $column.$this->getUnitConversionDataPostfix();
22
+            return $column . $this->getUnitConversionDataPostfix();
23 23
         }, array_keys($this->getMultiUnitColumns()));
24 24
     }
25 25
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
              */
33 33
             foreach ($model->getMultiUnitColumns() as $unitBasedColumn => $options) {
34 34
                 if (isset($model->attributes[$unitBasedColumn])) {
35
-                    $model->{$unitBasedColumn.$model->getUnitConversionDataPostfix()} = json_encode(
35
+                    $model->{$unitBasedColumn . $model->getUnitConversionDataPostfix()} = json_encode(
36 36
                         $model->calculateMultiUnitConversionData(
37 37
                             $model->attributes[$unitBasedColumn],
38 38
                             $model->getMultiUnitFieldUnit($unitBasedColumn),
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                     $unitBasedColumn,
57 57
                     $newValue
58 58
                 );
59
-                $model->{$unitBasedColumn.$model->getUnitConversionDataPostfix()} = json_encode(
59
+                $model->{$unitBasedColumn . $model->getUnitConversionDataPostfix()} = json_encode(
60 60
                     $model->calculateMultiUnitConversionData(
61 61
                         $newValue,
62 62
                         $model->getMultiUnitFieldUnit($unitBasedColumn),
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function getMultiUnitExistingConversionData($field)
97 97
     {
98
-        return json_decode($this->{$field.$this->getUnitConversionDataPostfix()} ?? null);
98
+        return json_decode($this->{$field . $this->getUnitConversionDataPostfix()} ?? null);
99 99
     }
100 100
 
101 101
     /**
Please login to merge, or discard this patch.