@@ -48,6 +48,9 @@ |
||
| 48 | 48 | ; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + /** |
|
| 52 | + * @param string $prefix |
|
| 53 | + */ |
|
| 51 | 54 | private function buildMethods(ResponseInterface $response, $prefix): array |
| 52 | 55 | { |
| 53 | 56 | $this->crawler->addHtmlContent($response->getBody()->getContents()); |
@@ -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 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | return $this->client |
| 43 | 43 | ->sendAsyncRequest($this->messageFactory->createRequest('GET', $url)) |
| 44 | - ->then(function (ResponseInterface $response) use ($prefix) { |
|
| 44 | + ->then(function(ResponseInterface $response) use ($prefix) { |
|
| 45 | 45 | return $this->buildMethods($response, $prefix); |
| 46 | 46 | }) |
| 47 | 47 | ->wait() |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | private function buildMethods(ResponseInterface $response, $prefix): array |
| 52 | 52 | { |
| 53 | 53 | $this->crawler->addHtmlContent($response->getBody()->getContents()); |
| 54 | - $links = $this->crawler->filter('li a[href^="' . $prefix . '"]')->each(function (Crawler $node) { |
|
| 54 | + $links = $this->crawler->filter('li a[href^="' . $prefix . '"]')->each(function(Crawler $node) { |
|
| 55 | 55 | return $node->attr('href'); |
| 56 | 56 | }); |
| 57 | 57 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if ($argumentsRootNode->getNode(0)->nodeName === 'ul') { |
| 90 | 90 | $names = []; |
| 91 | 91 | |
| 92 | - return $argumentsRootNode->filter('li')->each(function (Crawler $argument) use (&$names) { |
|
| 92 | + return $argumentsRootNode->filter('li')->each(function(Crawler $argument) use (&$names) { |
|
| 93 | 93 | $description = $argument->filter('code')->first()->getNode(0)->nextSibling->textContent; |
| 94 | 94 | $name = CaseFormatter::dashToCamel($argument->filter('code')->first()->text()); |
| 95 | 95 | if (!isset($names[$name])) { |
@@ -49,16 +49,25 @@ |
||
| 49 | 49 | return $this->getApi($method)->primary; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param \ReflectionMethod $method |
|
| 54 | + */ |
|
| 52 | 55 | public function isApi($method): bool |
| 53 | 56 | { |
| 54 | 57 | return (bool) $this->getApi($method); |
| 55 | 58 | } |
| 56 | 59 | |
| 60 | + /** |
|
| 61 | + * @param \ReflectionMethod $method |
|
| 62 | + */ |
|
| 57 | 63 | public function getDescription($method): string |
| 58 | 64 | { |
| 59 | 65 | return $this->docBlockFactory->create($this->getMethod($method))->getSummary(); |
| 60 | 66 | } |
| 61 | 67 | |
| 68 | + /** |
|
| 69 | + * @param \ReflectionMethod $method |
|
| 70 | + */ |
|
| 62 | 71 | public function getName($method): string |
| 63 | 72 | { |
| 64 | 73 | $reflection = $this->getMethod($method); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -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 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | private function createCode(Api\Api $api, $name, \ReflectionMethod $method): \Closure |
| 123 | 123 | { |
| 124 | - return function (InputInterface $input, OutputInterface $output) use ($name, $method, $api) { |
|
| 124 | + return function(InputInterface $input, OutputInterface $output) use ($name, $method, $api) { |
|
| 125 | 125 | $fn = $method->getClosure($api); |
| 126 | 126 | |
| 127 | 127 | $options = $this->caseTransformArray($input->getOptions()); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | private function caseTransformArray(array $values): array |
| 152 | 152 | { |
| 153 | - return array_combine(array_map(function ($name) { |
|
| 153 | + return array_combine(array_map(function($name) { |
|
| 154 | 154 | return CaseFormatter::dashToCamel($name); |
| 155 | 155 | }, array_keys($values)), array_values($values)); |
| 156 | 156 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |