Completed
Branch master (a31674)
by Radosław
02:21
created
src/macros/math/inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('inc', function ($number) {
6
+P::macro('inc', function($number) {
7 7
     return $number + 1;
8 8
 });
Please login to merge, or discard this patch.
src/macros/math/modulo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('modulo', function ($a, $b) {
6
+P::macro('modulo', function($a, $b) {
7 7
     return $a % $b;
8 8
 });
Please login to merge, or discard this patch.
src/macros/math/multiply.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('multiply', function ($a, $b) {
6
+P::macro('multiply', function($a, $b) {
7 7
     return $a * $b;
8 8
 });
Please login to merge, or discard this patch.
src/macros/math/subtract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('subtract', function ($a, $b) {
6
+P::macro('subtract', function($a, $b) {
7 7
     return $a - $b;
8 8
 });
Please login to merge, or discard this patch.
src/macros/math/add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('add', function ($a, $b) {
6
+P::macro('add', function($a, $b) {
7 7
     return $a + $b;
8 8
 });
Please login to merge, or discard this patch.
src/macros/math/mean.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('mean', function (array $numbers) {
6
+P::macro('mean', function(array $numbers) {
7 7
     return array_sum($numbers) / count($numbers);
8 8
 });
Please login to merge, or discard this patch.
src/macros/math/median.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('median', function (array $numbers) {
6
+P::macro('median', function(array $numbers) {
7 7
     sort($numbers, SORT_NUMERIC);
8 8
     $middle = count($numbers) / 2;
9 9
     $even = (0 === $middle % 2);
10 10
 
11
-    $offsets = $even ? [$middle - 1, 2] : [(int)floor($middle), 1];
11
+    $offsets = $even ? [$middle - 1, 2] : [(int) floor($middle), 1];
12 12
     $slice = array_slice($numbers, ...$offsets);
13 13
 
14 14
     return P::mean($slice);
Please login to merge, or discard this patch.
src/macros/math/divide.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('divide', function ($a, $b) {
6
+P::macro('divide', function($a, $b) {
7 7
     return $a / $b;
8 8
 });
Please login to merge, or discard this patch.
src/macros/type/is.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('is', function (string $type, $value): bool {
6
+P::macro('is', function(string $type, $value): bool {
7 7
     $typeOfValue = strtolower(gettype($value));
8 8
     $expectedType = strtolower($type);
9 9
 
Please login to merge, or discard this patch.