Passed
Pull Request — master (#2)
by Pol
04:33
created
src/Partition/PartitionItemFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition\Partition;
6 6
 
Please login to merge, or discard this patch.
src/Partitioner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition;
6 6
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     final public function export(int $chunks = 1)
43 43
     {
44 44
         return \array_map(
45
-            static function (Partition $partition) {
45
+            static function(Partition $partition) {
46 46
                 return \array_values($partition->exportArrayCopy());
47 47
             },
48 48
             $this
Please login to merge, or discard this patch.
src/Utils/Statistics.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition\Utils;
6 6
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $mean = self::meanPartition($partition);
32 32
 
33 33
         $sumSquareDiff = \array_sum(\array_map(
34
-            static function ($sum) use ($mean) {
34
+            static function($sum) use ($mean) {
35 35
                 return ($sum - $mean) ** 2;
36 36
             },
37 37
             $partition->getArrayCopy()
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $partition = new Partition(
50 50
             \array_map(
51
-                static function (Partition $partition) {
51
+                static function(Partition $partition) {
52 52
                     return $partition->getWeight();
53 53
                 },
54 54
                 $partitions->partitions()
Please login to merge, or discard this patch.
src/Combinations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition;
6 6
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     protected function fillPartitions(Partitions $partitions, Partition $dataset, int $chunks): void
67 67
     {
68 68
         $partition = new Partition($dataset);
69
-        $partition->uasort(function ($left, $right) {
69
+        $partition->uasort(function($left, $right) {
70 70
             return $left->getWeight() <=> $right->getWeight();
71 71
         });
72 72
         $dataset = $partition->getArrayCopy();
Please login to merge, or discard this patch.
src/GreedyAltAlt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition;
6 6
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         // Greedy needs a dataset sorted DESC.
36 36
         $dataset->uasort(
37
-            static function (PartitionItem $left, PartitionItem $right) {
37
+            static function(PartitionItem $left, PartitionItem $right) {
38 38
                 return $left->getWeight() <=> $right->getWeight();
39 39
             }
40 40
         );
Please login to merge, or discard this patch.
src/Greedy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         // Greedy needs a dataset sorted DESC.
24 24
         $dataset->uasort(
25
-            static function (PartitionItem $left, PartitionItem $right) {
25
+            static function(PartitionItem $left, PartitionItem $right) {
26 26
                 return $right->getWeight() <=> $left->getWeight();
27 27
             }
28 28
         );
Please login to merge, or discard this patch.
src/GreedyAlt.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition;
6 6
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         // Greedy needs a dataset sorted DESC.
36 36
         $dataset->uasort(
37
-            static function (PartitionItem $left, PartitionItem $right) {
37
+            static function(PartitionItem $left, PartitionItem $right) {
38 38
                 return $right->getWeight() <=> $left->getWeight();
39 39
             }
40 40
         );
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $partitionWeightMinusBest = $partition->getWeight() - $best;
88 88
 
89 89
         $solutions = \array_map(
90
-            static function (PartitionItem $item) use ($partitionWeightMinusBest) {
90
+            static function(PartitionItem $item) use ($partitionWeightMinusBest) {
91 91
                 return \abs($partitionWeightMinusBest + $item->getWeight());
92 92
             },
93 93
             \iterator_to_array($dataset)
Please login to merge, or discard this patch.
src/Contract/Partition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition\Contract;
6 6
 
Please login to merge, or discard this patch.
src/GreedyAltAltAlt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace drupol\phpartition;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         // Greedy needs a dataset sorted DESC.
24 24
         $dataset->uasort(
25
-            static function (PartitionItem $left, PartitionItem $right) {
25
+            static function(PartitionItem $left, PartitionItem $right) {
26 26
                 return $right->getWeight() <=> $left->getWeight();
27 27
             }
28 28
         );
Please login to merge, or discard this patch.