Completed
Pull Request — master (#2)
by Pol
04:12
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/GreedyAlt.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
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         // Greedy needs a dataset sorted DESC.
21 21
         $dataset->uasort(
22
-            static function ($left, $right) {
22
+            static function($left, $right) {
23 23
                 return $right->getWeight() <=> $left->getWeight();
24 24
             }
25 25
         );
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
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $partitionItemFactory = $this->getPartitionItemFactory();
21 21
 
22 22
         // Greedy needs a dataset sorted DESC.
23
-        $dataset->uasort(static function ($a, $b) use ($partitionItemFactory) {
23
+        $dataset->uasort(static function($a, $b) use ($partitionItemFactory) {
24 24
             $left = $partitionItemFactory::create($a);
25 25
             $right = $partitionItemFactory::create($b);
26 26
 
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
         $partitionItemFactory = $this->getPartitionItemFactory();
23 23
 
24 24
         // Greedy needs a dataset sorted DESC.
25
-        $dataset->uasort(static function ($a, $b) use ($partitionItemFactory) {
25
+        $dataset->uasort(static function($a, $b) use ($partitionItemFactory) {
26 26
             $left = $partitionItemFactory::create($a);
27 27
             $right = $partitionItemFactory::create($b);
28 28
 
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.