Passed
Pull Request — master (#257)
by Бабичев
45:31 queued 14:54
created
src/Simple/BrickMath.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function add($first, $second, ?int $scale = null): string
23 23
     {
24
-        return (string) BigDecimal::of($first)
24
+        return (string)BigDecimal::of($first)
25 25
             ->plus(BigDecimal::of($second))
26 26
             ->toScale($this->scale($scale), RoundingMode::DOWN);
27 27
     }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function sub($first, $second, ?int $scale = null): string
33 33
     {
34
-        return (string) BigDecimal::of($first)
34
+        return (string)BigDecimal::of($first)
35 35
             ->minus(BigDecimal::of($second))
36 36
             ->toScale($this->scale($scale), RoundingMode::DOWN);
37 37
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function div($first, $second, ?int $scale = null): string
43 43
     {
44
-        return (string) BigDecimal::of($first)
44
+        return (string)BigDecimal::of($first)
45 45
             ->dividedBy(BigDecimal::of($second), $this->scale($scale), RoundingMode::DOWN);
46 46
     }
47 47
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function mul($first, $second, ?int $scale = null): string
52 52
     {
53
-        return (string) BigDecimal::of($first)
53
+        return (string)BigDecimal::of($first)
54 54
             ->multipliedBy(BigDecimal::of($second))
55 55
             ->toScale($this->scale($scale), RoundingMode::DOWN);
56 56
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function pow($first, $second, ?int $scale = null): string
62 62
     {
63
-        return (string) BigDecimal::of($first)
63
+        return (string)BigDecimal::of($first)
64 64
             ->power($second)
65 65
             ->toScale($this->scale($scale), RoundingMode::DOWN);
66 66
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function ceil($number): string
72 72
     {
73
-        return (string) BigDecimal::of($number)
73
+        return (string)BigDecimal::of($number)
74 74
             ->dividedBy(BigDecimal::one(), 0, RoundingMode::CEILING);
75 75
     }
76 76
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function floor($number): string
81 81
     {
82
-        return (string) BigDecimal::of($number)
82
+        return (string)BigDecimal::of($number)
83 83
             ->dividedBy(BigDecimal::one(), 0, RoundingMode::FLOOR);
84 84
     }
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function round($number, int $precision = 0): string
90 90
     {
91
-        return (string) BigDecimal::of($number)
91
+        return (string)BigDecimal::of($number)
92 92
             ->dividedBy(BigDecimal::one(), $precision, RoundingMode::HALF_UP);
93 93
     }
94 94
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function abs($number): string
100 100
     {
101
-        return (string) BigDecimal::of($number)->abs();
101
+        return (string)BigDecimal::of($number)->abs();
102 102
     }
103 103
 
104 104
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     protected function scale(?int $scale = null): int
117 117
     {
118 118
         if ($this->scale === null) {
119
-            $this->scale = (int) config('wallet.math.scale', 64);
119
+            $this->scale = (int)config('wallet.math.scale', 64);
120 120
         }
121 121
 
122 122
         return $scale ?? $this->scale;
Please login to merge, or discard this patch.
src/Services/WalletService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
          */
113 113
         $wallet = $object;
114 114
 
115
-        if (! ($object instanceof WalletModel)) {
115
+        if (!($object instanceof WalletModel)) {
116 116
             /**
117 117
              * @var HasWallet $object
118 118
              */
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             $wallet->balance = $balance;
141 141
 
142 142
             return app(Storable::class)->setBalance($wallet, $balance) &&
143
-                (! $math->compare($whatIs, $balance) || $wallet->save());
143
+                (!$math->compare($whatIs, $balance) || $wallet->save());
144 144
         });
145 145
     }
146 146
 
Please login to merge, or discard this patch.