@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function __construct() |
63 | 63 | { |
64 | - $this->validatorSchema = \GuzzleHttp\json_decode((string)file_get_contents(__DIR__ . '/ServiceJsonSchema.json'), false); |
|
64 | + $this->validatorSchema = \GuzzleHttp\json_decode((string) file_get_contents(__DIR__ . '/ServiceJsonSchema.json'), false); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -130,13 +130,12 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function jsonSerialize(): array |
132 | 132 | { |
133 | - $labelMap = function (CommentedItem $commentedItem): array { |
|
133 | + $labelMap = function(CommentedItem $commentedItem): array { |
|
134 | 134 | return null === $commentedItem->getComment() ? |
135 | - ['value' => $commentedItem->getItem()] : |
|
136 | - ['value' => $commentedItem->getItem(), 'comment' => $commentedItem->getComment()]; |
|
135 | + ['value' => $commentedItem->getItem()] : ['value' => $commentedItem->getItem(), 'comment' => $commentedItem->getComment()]; |
|
137 | 136 | }; |
138 | 137 | |
139 | - $jsonSerializeMap = function (\JsonSerializable $obj): array { |
|
138 | + $jsonSerializeMap = function(\JsonSerializable $obj): array { |
|
140 | 139 | return $obj->jsonSerialize(); |
141 | 140 | }; |
142 | 141 | |
@@ -171,13 +170,13 @@ discard block |
||
171 | 170 | 'requests' => array_filter([ |
172 | 171 | 'memory' => $this->requestMemory, |
173 | 172 | 'cpu' => $this->requestCpu, |
174 | - ], function ($v) { |
|
173 | + ], function($v) { |
|
175 | 174 | return null !== $v; |
176 | 175 | }), |
177 | 176 | 'limits' => array_filter([ |
178 | 177 | 'memory' => $this->limitMemory, |
179 | 178 | 'cpu' => $this->limitCpu, |
180 | - ], function ($v) { |
|
179 | + ], function($v) { |
|
181 | 180 | return null !== $v; |
182 | 181 | }), |
183 | 182 | ]); |
@@ -416,7 +415,7 @@ discard block |
||
416 | 415 | 'source' => $source, |
417 | 416 | 'target' => $target, |
418 | 417 | 'comment' => $comment, |
419 | - ], function ($v) { |
|
418 | + ], function($v) { |
|
420 | 419 | return null !== $v; |
421 | 420 | }); |
422 | 421 | } |
@@ -590,7 +589,7 @@ discard block |
||
590 | 589 | |
591 | 590 | private function removeVolumesByType(string $type): void |
592 | 591 | { |
593 | - $filterFunction = function (Volume $vol) use ($type) { |
|
592 | + $filterFunction = function(Volume $vol) use ($type) { |
|
594 | 593 | return $vol->getType() !== $type; |
595 | 594 | }; |
596 | 595 | $this->volumes = array_values(array_filter($this->volumes, $filterFunction)); |
@@ -613,7 +612,7 @@ discard block |
||
613 | 612 | |
614 | 613 | public function removeVolumesBySource(string $source): void |
615 | 614 | { |
616 | - $filterFunction = function (Volume $vol) use ($source) { |
|
615 | + $filterFunction = function(Volume $vol) use ($source) { |
|
617 | 616 | return $vol->getSource() !== $source; |
618 | 617 | }; |
619 | 618 | $this->volumes = array_values(array_filter($this->volumes, $filterFunction)); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 'readOnly' => $this->readOnly, |
58 | 58 | 'comment' => $this->comment, |
59 | 59 | 'requestStorage' => $this->requestStorage, |
60 | - ], function ($v) { |
|
60 | + ], function($v) { |
|
61 | 61 | return null !== $v; |
62 | 62 | }); |
63 | 63 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | 'target' => $this->target, |
50 | 50 | 'readOnly' => $this->readOnly, |
51 | 51 | 'comment' => $this->comment |
52 | - ], function ($v) { |
|
52 | + ], function($v) { |
|
53 | 53 | return null !== $v; |
54 | 54 | }); |
55 | 55 | } |