@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function __construct() |
| 66 | 66 | { |
| 67 | - $this->validatorSchema = \GuzzleHttp\json_decode((string)file_get_contents(__DIR__ . '/ServiceJsonSchema.json'), false); |
|
| 67 | + $this->validatorSchema = \GuzzleHttp\json_decode((string) file_get_contents(__DIR__ . '/ServiceJsonSchema.json'), false); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | if (!empty($r = $resources['requests'])) { |
| 111 | 111 | $service->requestMemory = $r['memory'] ?? null; |
| 112 | 112 | $service->requestCpu = $r['cpu'] ?? null; |
| 113 | - $service->requestStorage= $r['storage'] ?? null; |
|
| 113 | + $service->requestStorage = $r['storage'] ?? null; |
|
| 114 | 114 | } |
| 115 | 115 | if (!empty($l = $resources['limits'])) { |
| 116 | 116 | $service->limitMemory = $l['memory'] ?? null; |
@@ -131,13 +131,12 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function jsonSerialize(): array |
| 133 | 133 | { |
| 134 | - $labelMap = function (CommentedItem $commentedItem): array { |
|
| 134 | + $labelMap = function(CommentedItem $commentedItem): array { |
|
| 135 | 135 | return null === $commentedItem->getComment() ? |
| 136 | - ['value' => $commentedItem->getItem()] : |
|
| 137 | - ['value' => $commentedItem->getItem(), 'comment' => $commentedItem->getComment()]; |
|
| 136 | + ['value' => $commentedItem->getItem()] : ['value' => $commentedItem->getItem(), 'comment' => $commentedItem->getComment()]; |
|
| 138 | 137 | }; |
| 139 | 138 | |
| 140 | - $jsonSerializeMap = function (\JsonSerializable $obj): array { |
|
| 139 | + $jsonSerializeMap = function(\JsonSerializable $obj): array { |
|
| 141 | 140 | return $obj->jsonSerialize(); |
| 142 | 141 | }; |
| 143 | 142 | |
@@ -430,7 +429,7 @@ discard block |
||
| 430 | 429 | 'source' => $source, |
| 431 | 430 | 'target' => $target, |
| 432 | 431 | 'comment' => $comment, |
| 433 | - ], function ($v) { |
|
| 432 | + ], function($v) { |
|
| 434 | 433 | return null !== $v; |
| 435 | 434 | }); |
| 436 | 435 | } |
@@ -581,7 +580,7 @@ discard block |
||
| 581 | 580 | |
| 582 | 581 | private function removeVolumesByType(string $type): void |
| 583 | 582 | { |
| 584 | - $filterFunction = function (Volume $vol) use ($type) { |
|
| 583 | + $filterFunction = function(Volume $vol) use ($type) { |
|
| 585 | 584 | return $vol->getType() !== $type; |
| 586 | 585 | }; |
| 587 | 586 | $this->volumes = array_values(array_filter($this->volumes, $filterFunction)); |
@@ -604,7 +603,7 @@ discard block |
||
| 604 | 603 | |
| 605 | 604 | public function removeVolumesBySource(string $source): void |
| 606 | 605 | { |
| 607 | - $filterFunction = function (Volume $vol) use ($source) { |
|
| 606 | + $filterFunction = function(Volume $vol) use ($source) { |
|
| 608 | 607 | return $vol->getSource() !== $source; |
| 609 | 608 | }; |
| 610 | 609 | $this->volumes = array_values(array_filter($this->volumes, $filterFunction)); |