@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace drupol\phpartition; |
6 | 6 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | protected function fillPartitions(Partitions $partitions, array $dataset, int $chunks): void |
71 | 71 | { |
72 | 72 | $partition = new Partition($dataset); |
73 | - $partition->uasort(function ($left, $right) { |
|
73 | + $partition->uasort(function($left, $right) { |
|
74 | 74 | return $left->getWeight() <=> $right->getWeight(); |
75 | 75 | }); |
76 | 76 | $dataset = $partition->getArrayCopy(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace drupol\phpartition; |
6 | 6 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | \uasort( |
52 | 52 | $copy, |
53 | - static function ($a, $b) use ($partitionItemFactory) { |
|
53 | + static function($a, $b) use ($partitionItemFactory) { |
|
54 | 54 | $left = $partitionItemFactory::create($a); |
55 | 55 | $right = $partitionItemFactory::create($b); |
56 | 56 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace drupol\phpartition; |
6 | 6 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $partitions = $this->getPartitionsFactory()::create($chunks); |
45 | 45 | |
46 | 46 | $datas = \array_map( |
47 | - function ($data) { |
|
47 | + function($data) { |
|
48 | 48 | return $this->toPartitionItem($data); |
49 | 49 | }, |
50 | 50 | \iterator_to_array($this->getDataset()) |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $this->fillPartitions($partitions, $datas, $chunks); |
54 | 54 | |
55 | 55 | return \array_map( |
56 | - static function (Partition $partition) { |
|
56 | + static function(Partition $partition) { |
|
57 | 57 | return \array_values($partition->exportArrayCopy()); |
58 | 58 | }, |
59 | 59 | $partitions->partitions() |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace drupol\phpartition; |
6 | 6 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | \usort( |
95 | 95 | $solutions, |
96 | - static function (array $x, array $y) { |
|
96 | + static function(array $x, array $y) { |
|
97 | 97 | return $x[0] <=> $y[0]; |
98 | 98 | } |
99 | 99 | ); |
@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function exportArrayCopy() |
19 | 19 | { |
20 | 20 | return \array_map( |
21 | - static function (Valuable $item) { |
|
21 | + static function(Valuable $item) { |
|
22 | 22 | return $item->getValue(); |
23 | 23 | }, |
24 | 24 | $this->getArrayCopy() |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace drupol\phpartition\Partitions; |
6 | 6 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function sort(callable $compareCallable = null) |
65 | 65 | { |
66 | 66 | if (null === $compareCallable) { |
67 | - $compareCallable = static function (Partition $item1, Partition $item2) { |
|
67 | + $compareCallable = static function(Partition $item1, Partition $item2) { |
|
68 | 68 | return $item1->getWeight() <=> $item2->getWeight(); |
69 | 69 | }; |
70 | 70 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace drupol\phpartition\Partitions; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
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 |