Test Failed
Pull Request — master (#141)
by Jordan
06:39
created
src/Samsara/Fermat/Core/Numbers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      * @return ImmutableDecimal|MutableDecimal|NumberInterface|ImmutableDecimal[]|MutableDecimal[]|NumberInterface[]
115 115
      * @throws IntegrityConstraint
116 116
      */
117
-    public static function makeOrDont(string|object $type, mixed $value, ?int $scale = null, NumberBase $base = NumberBase::Ten)
117
+    public static function makeOrDont(string | object $type, mixed $value, ?int $scale = null, NumberBase $base = NumberBase::Ten)
118 118
     {
119 119
 
120 120
         if (is_object($value)) {
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             }
237 237
 
238 238
             if ($scale > 100) {
239
-                $pi = self::make(self::IMMUTABLE, ConstantProvider::makePi($scale+2), $scale + 2);
239
+                $pi = self::make(self::IMMUTABLE, ConstantProvider::makePi($scale+2), $scale+2);
240 240
                 /** @var ImmutableDecimal */
241 241
                 return $pi->multiply(2)->truncateToScale($scale);
242 242
             }
Please login to merge, or discard this patch.
Fermat/LinearAlgebra/Types/Base/Interfaces/Groups/VectorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function subtract(VectorInterface $vector): VectorInterface;
14 14
 
15
-    public function multiply(int|float|string|NumberInterface|VectorInterface $value): NumberInterface|VectorInterface;
15
+    public function multiply(int | float | string | NumberInterface | VectorInterface $value): NumberInterface | VectorInterface;
16 16
 
17 17
     public function multiplyScalar(NumberInterface $number): VectorInterface;
18 18
 
Please login to merge, or discard this patch.
src/Samsara/Fermat/LinearAlgebra/Types/Traits/Matrix/ShapeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     public function rotate(bool $clockwise = true): MatrixInterface
95 95
     {
96
-        $tempData =  $clockwise ? $this->rows :  $this->columns;
96
+        $tempData = $clockwise ? $this->rows : $this->columns;
97 97
         $mode = $clockwise ? self::MODE_COLUMNS_INPUT : self::MODE_ROWS_INPUT;
98 98
 
99 99
         $tempData = array_reverse($tempData);
Please login to merge, or discard this patch.
src/Samsara/Fermat/Expressions/Values/Algebra/PolynomialFunction.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public static function createFromFoil(array $group1, array $group2): PolynomialFunction
174 174
     {
175
-        $group1exp = count($group1) - 1;
176
-        $group2exp = count($group2) - 1;
175
+        $group1exp = count($group1)-1;
176
+        $group2exp = count($group2)-1;
177 177
 
178 178
         /** @var ImmutableDecimal[] $finalCoefs */
179 179
         $finalCoefs = [];
@@ -198,16 +198,16 @@  discard block
 block discarded – undo
198 198
          * @var ImmutableDecimal $value1
199 199
          */
200 200
         foreach ($largerGroup as $key1 => $value1) {
201
-            $largerKey = $largerExp - $key1;
201
+            $largerKey = $largerExp-$key1;
202 202
 
203 203
             /**
204 204
              * @var int             $key2
205 205
              * @var ImmutableDecimal $value2
206 206
              */
207 207
             foreach ($smallerGroup as $key2 => $value2) {
208
-                $smallerKey = $smallerExp - $key2;
208
+                $smallerKey = $smallerExp-$key2;
209 209
                 $newVal = $value1->multiply($value2);
210
-                $newExp = $largerKey + $smallerKey;
210
+                $newExp = $largerKey+$smallerKey;
211 211
 
212 212
                 if (isset($finalCoefs[$newExp])) {
213 213
                     $finalCoefs[$newExp] = $finalCoefs[$newExp]->add($newVal);
Please login to merge, or discard this patch.
src/Samsara/Fermat/Complex/Types/ComplexNumber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 {
29 29
 
30 30
     /** @var ImmutableDecimal|ImmutableFraction */
31
-    protected ImmutableDecimal|ImmutableFraction $realPart;
31
+    protected ImmutableDecimal | ImmutableFraction $realPart;
32 32
     /** @var ImmutableDecimal|ImmutableFraction */
33
-    protected ImmutableDecimal|ImmutableFraction $imaginaryPart;
33
+    protected ImmutableDecimal | ImmutableFraction $imaginaryPart;
34 34
     /** @var int */
35 35
     protected int $scale;
36 36
     protected CartesianCoordinate $cachedCartesian;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         return false;
131 131
     }
132 132
 
133
-    public function asReal(): ImmutableDecimal|ImmutableFraction
133
+    public function asReal(): ImmutableDecimal | ImmutableFraction
134 134
     {
135 135
         return (new ImmutableDecimal($this->getAsBaseTenRealNumber(), $this->getScale()))->setMode($this->getMode());
136 136
     }
Please login to merge, or discard this patch.
src/Samsara/Fermat/Complex/Types/Traits/ArithmeticComplexTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         ] = $this->translateToParts($this, $num, 1);
152 152
 
153 153
         if ($num->isComplex()) {
154
-            $intScale = $scale + 2;
154
+            $intScale = $scale+2;
155 155
             $denominator = $thatRealPart->roundToScale($intScale)->pow(2)->add($thatImaginaryPart->asReal()->roundToScale($intScale)->pow(2));
156 156
 
157 157
             $partA = $thisRealPart->roundToScale($intScale)->multiply($thatRealPart->roundToScale($intScale))
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         if ($num->isReal() && $num->isNatural() && $num->isPositive()) {
203 203
             $newValue = clone $this;
204 204
 
205
-            for ($i=0;$num->isGreaterThan($i);$i++) {
205
+            for ($i = 0;$num->isGreaterThan($i);$i++) {
206 206
                 $newValue = $newValue->multiply($this);
207 207
             }
208 208
 
Please login to merge, or discard this patch.
src/Samsara/Fermat/Coordinates/Values/PolarCoordinate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     public function asCartesian(?int $scale = null): CartesianCoordinate
45 45
     {
46 46
         $scale = $scale ?? 10;
47
-        $intScale = $scale + 2;
47
+        $intScale = $scale+2;
48 48
 
49 49
         if (is_null($this->cachedCartesian)) {
50 50
             $x = $this->getAxis('rho')->multiply($this->getAxis('theta')->cos($intScale))->roundToScale($scale);
Please login to merge, or discard this patch.
src/Samsara/Fermat/Coordinates/Values/CartesianCoordinate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public function getDistanceFromOrigin(?int $scale = null): ImmutableDecimal
77 77
     {
78 78
         $scale = $scale ?? 10;
79
-        $intScale = $scale + 2;
79
+        $intScale = $scale+2;
80 80
 
81 81
         $x = 0;
82 82
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function distanceTo(CoordinateInterface $coordinate, ?int $scale = null): ImmutableDecimal
106 106
     {
107 107
         $scale = $scale ?? 10;
108
-        $intScale = $scale + 2;
108
+        $intScale = $scale+2;
109 109
 
110 110
         if (!($coordinate instanceof CartesianCoordinate)) {
111 111
             $coordinate = $coordinate->asCartesian();
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     public function asPolar(?int $scale = null): PolarCoordinate
228 228
     {
229 229
         $scale = $scale ?? 10;
230
-        $intScale = $scale + 3;
230
+        $intScale = $scale+3;
231 231
 
232 232
         if ($this->numberOfDimensions() !== 2) {
233 233
             throw new IncompatibleObjectState(
Please login to merge, or discard this patch.
src/Samsara/Fermat/Core/Types/Fraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
     /**
241 241
      * @return ImmutableDecimal|ImmutableFraction
242 242
      */
243
-    public function asReal(): ImmutableDecimal|ImmutableFraction
243
+    public function asReal(): ImmutableDecimal | ImmutableFraction
244 244
     {
245 245
         return (new ImmutableFraction($this->getNumerator()->getAsBaseTenRealNumber(), $this->getDenominator()->getAsBaseTenRealNumber()))->setMode($this->getMode());
246 246
     }
Please login to merge, or discard this patch.