@@ -15,11 +15,11 @@ |
||
15 | 15 | public function getImageTagsOnDockerHub(string $image): array |
16 | 16 | { |
17 | 17 | $client = new Client(); |
18 | - $res = $client->request('GET', 'https://registry.hub.docker.com/v1/repositories/'.$image.'/tags'); |
|
18 | + $res = $client->request('GET', 'https://registry.hub.docker.com/v1/repositories/' . $image . '/tags'); |
|
19 | 19 | |
20 | 20 | $response = \GuzzleHttp\json_decode($res->getBody(), true); |
21 | 21 | |
22 | - $tags = \array_map(function (array $item) { |
|
22 | + $tags = \array_map(function(array $item) { |
|
23 | 23 | return $item['name']; |
24 | 24 | }, $response); |
25 | 25 |
@@ -7,6 +7,6 @@ |
||
7 | 7 | { |
8 | 8 | public static function cannotHandleEvent(string $eventName): self |
9 | 9 | { |
10 | - throw new self('Could not find an Aent that can handle events of type "'.$eventName.'"'); |
|
10 | + throw new self('Could not find an Aent that can handle events of type "' . $eventName . '"'); |
|
11 | 11 | } |
12 | 12 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public static function dispatchJson(string $event, $payload): void |
26 | 26 | { |
27 | 27 | if (\is_object($payload) && !$payload instanceof \JsonSerializable) { |
28 | - throw new \RuntimeException('Payload object should implement JsonSerializable. Got an instance of '.\get_class($payload)); |
|
28 | + throw new \RuntimeException('Payload object should implement JsonSerializable. Got an instance of ' . \get_class($payload)); |
|
29 | 29 | } |
30 | 30 | self::dispatch($event, \json_encode($payload)); |
31 | 31 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | */ |
82 | 82 | public function jsonSerialize(): array |
83 | 83 | { |
84 | - $jsonSerializeMap = function (\JsonSerializable $obj): array { |
|
84 | + $jsonSerializeMap = function(\JsonSerializable $obj): array { |
|
85 | 85 | return $obj->jsonSerialize(); |
86 | 86 | }; |
87 | 87 |
@@ -58,9 +58,9 @@ |
||
58 | 58 | */ |
59 | 59 | private function getAllEventNames(): array |
60 | 60 | { |
61 | - return array_map(function (EventCommand $event) { |
|
61 | + return array_map(function(EventCommand $event) { |
|
62 | 62 | return $event->getEventName(); |
63 | - }, \array_filter($this->getApplication()->all(), function (Command $command) { |
|
63 | + }, \array_filter($this->getApplication()->all(), function(Command $command) { |
|
64 | 64 | return $command instanceof EventCommand && !$command->isHidden(); |
65 | 65 | })); |
66 | 66 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $output->writeln('It seems that Aenthill does not know how or where to store this new service. You need to install a dedicated Aent for this.'); |
38 | 38 | $output->writeln('Most of the time, you want to put this service in a docker-compose.yml file. We have a pretty good Aent for this: <info>theaentmachine/aent-docker-compose</info>.'); |
39 | 39 | $question = new Question('Do you want me to add this Aent for you? (y/n) ', 'y'); |
40 | - $question->setValidator(function (string $value) { |
|
40 | + $question->setValidator(function(string $value) { |
|
41 | 41 | $value = \strtolower(trim($value)); |
42 | 42 | |
43 | 43 | if ($value !== 'y' && $value !== 'n') { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $output->writeln('It seems that Aenthill does not know how to bind your container to a domain name. You need to install a reverse proxy for this.'); |
87 | 87 | $output->writeln('Traefik is a good reverse proxy. We have an Aent to add Traefik to your project: <info>theaentmachine/aent-traefik</info>.'); |
88 | 88 | $question = new Question('Do you want me to add this Aent for you? (y/n) ', 'y'); |
89 | - $question->setValidator(function (string $value) { |
|
89 | + $question->setValidator(function(string $value) { |
|
90 | 90 | $value = \strtolower(trim($value)); |
91 | 91 | |
92 | 92 | if ($value !== 'y' && $value !== 'n') { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function filterBestTags(array $tags): array |
19 | 19 | { |
20 | 20 | // filter numeric versions only |
21 | - $versions = \array_filter($tags, function (string $tag) { |
|
21 | + $versions = \array_filter($tags, function(string $tag) { |
|
22 | 22 | return \preg_match('/^\d+(\.\d+)*$/', $tag); |
23 | 23 | }); |
24 | 24 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | foreach ($subtree as $key => $subsubtree) { |
74 | 74 | $values = $this->getMaxLeafs($subsubtree); |
75 | 75 | foreach ($values as $val) { |
76 | - $arr[] = $key.'.'.$val; |
|
76 | + $arr[] = $key . '.' . $val; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | return $arr; |