Skip to content

Commit 0fd9991

Browse files
Merge pull request #6 from nortoh/feature.php83-upgrade-for-symfony-console
Using updated janePHP
2 parents 07c160a + d36bf1c commit 0fd9991

File tree

729 files changed

+9632
-9627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

729 files changed

+9632
-9627
lines changed

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
},
1111
"require": {
1212
"php": ">=7.1",
13-
"jane-php/jane-php": "^7.0"
13+
"jane-php/jane-php": "dev-feature.php83-v2"
1414
},
1515
"require-dev": {
1616
"phpunit/phpunit": "^10.4",
1717
"friendsofphp/php-cs-fixer": "^2.9",
1818
"amphp/artax": "^3.0"
1919
},
20+
"repositories": [
21+
{
22+
"type": "vcs",
23+
"url": "https://github.com/nortoh/janephp"
24+
}
25+
],
2026
"suggest": {
2127
"amphp/artax": "To use the async api"
2228
},

src/Client.php

Lines changed: 302 additions & 302 deletions
Large diffs are not rendered by default.

src/Endpoint/BuildPrune.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
class BuildPrune extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint
66
{
77
use \Docker\API\Runtime\Client\EndpointTrait;
8-
public function getMethod() : string
8+
public function getMethod(): string
99
{
1010
return 'POST';
1111
}
12-
public function getUri() : string
12+
public function getUri(): string
1313
{
1414
return '/build/prune';
1515
}
16-
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
16+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
1717
{
18-
return array(array(), null);
18+
return [[], null];
1919
}
20-
public function getExtraHeaders() : array
20+
public function getExtraHeaders(): array
2121
{
22-
return array('Accept' => array('application/json'));
22+
return ['Accept' => ['application/json']];
2323
}
2424
/**
2525
* {@inheritdoc}
@@ -33,14 +33,14 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
3333
$status = $response->getStatusCode();
3434
$body = (string) $response->getBody();
3535
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
36-
return $serializer->deserialize($body, 'Docker\\API\\Model\\BuildPrunePostResponse200', 'json');
36+
return $serializer->deserialize($body, 'Docker\API\Model\BuildPrunePostResponse200', 'json');
3737
}
3838
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
39-
throw new \Docker\API\Exception\BuildPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
39+
throw new \Docker\API\Exception\BuildPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
4040
}
4141
}
42-
public function getAuthenticationScopes() : array
42+
public function getAuthenticationScopes(): array
4343
{
44-
return array();
44+
return [];
4545
}
46-
}
46+
}

src/Endpoint/ConfigCreate.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@
55
class ConfigCreate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint
66
{
77
/**
8+
*
89
*
9-
*
10-
* @param null|\Docker\API\Model\ConfigsCreatePostBody $requestBody
10+
* @param null|\Docker\API\Model\ConfigsCreatePostBody $requestBody
1111
*/
1212
public function __construct(?\Docker\API\Model\ConfigsCreatePostBody $requestBody = null)
1313
{
1414
$this->body = $requestBody;
1515
}
1616
use \Docker\API\Runtime\Client\EndpointTrait;
17-
public function getMethod() : string
17+
public function getMethod(): string
1818
{
1919
return 'POST';
2020
}
21-
public function getUri() : string
21+
public function getUri(): string
2222
{
2323
return '/configs/create';
2424
}
25-
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
25+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
2626
{
2727
if ($this->body instanceof \Docker\API\Model\ConfigsCreatePostBody) {
28-
return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json'));
28+
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
2929
}
30-
return array(array(), null);
30+
return [[], null];
3131
}
32-
public function getExtraHeaders() : array
32+
public function getExtraHeaders(): array
3333
{
34-
return array('Accept' => array('application/json'));
34+
return ['Accept' => ['application/json']];
3535
}
3636
/**
3737
* {@inheritdoc}
@@ -47,20 +47,20 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
4747
$status = $response->getStatusCode();
4848
$body = (string) $response->getBody();
4949
if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) {
50-
return $serializer->deserialize($body, 'Docker\\API\\Model\\IdResponse', 'json');
50+
return $serializer->deserialize($body, 'Docker\API\Model\IdResponse', 'json');
5151
}
5252
if (is_null($contentType) === false && (409 === $status && mb_strpos($contentType, 'application/json') !== false)) {
53-
throw new \Docker\API\Exception\ConfigCreateConflictException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
53+
throw new \Docker\API\Exception\ConfigCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5454
}
5555
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
56-
throw new \Docker\API\Exception\ConfigCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
56+
throw new \Docker\API\Exception\ConfigCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5757
}
5858
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
59-
throw new \Docker\API\Exception\ConfigCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
59+
throw new \Docker\API\Exception\ConfigCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
6060
}
6161
}
62-
public function getAuthenticationScopes() : array
62+
public function getAuthenticationScopes(): array
6363
{
64-
return array();
64+
return [];
6565
}
66-
}
66+
}

src/Endpoint/ConfigDelete.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ConfigDelete extends \Docker\API\Runtime\Client\BaseEndpoint implements \D
66
{
77
protected $id;
88
/**
9-
*
9+
*
1010
*
1111
* @param string $id ID of the config
1212
*/
@@ -15,21 +15,21 @@ public function __construct(string $id)
1515
$this->id = $id;
1616
}
1717
use \Docker\API\Runtime\Client\EndpointTrait;
18-
public function getMethod() : string
18+
public function getMethod(): string
1919
{
2020
return 'DELETE';
2121
}
22-
public function getUri() : string
22+
public function getUri(): string
2323
{
24-
return str_replace(array('{id}'), array($this->id), '/configs/{id}');
24+
return str_replace(['{id}'], [$this->id], '/configs/{id}');
2525
}
26-
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
26+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
2727
{
28-
return array(array(), null);
28+
return [[], null];
2929
}
30-
public function getExtraHeaders() : array
30+
public function getExtraHeaders(): array
3131
{
32-
return array('Accept' => array('application/json'));
32+
return ['Accept' => ['application/json']];
3333
}
3434
/**
3535
* {@inheritdoc}
@@ -47,17 +47,17 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
4747
if (204 === $status) {
4848
}
4949
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
50-
throw new \Docker\API\Exception\ConfigDeleteNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
50+
throw new \Docker\API\Exception\ConfigDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5151
}
5252
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
53-
throw new \Docker\API\Exception\ConfigDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
53+
throw new \Docker\API\Exception\ConfigDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5454
}
5555
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
56-
throw new \Docker\API\Exception\ConfigDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
56+
throw new \Docker\API\Exception\ConfigDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5757
}
5858
}
59-
public function getAuthenticationScopes() : array
59+
public function getAuthenticationScopes(): array
6060
{
61-
return array();
61+
return [];
6262
}
63-
}
63+
}

src/Endpoint/ConfigInspect.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ConfigInspect extends \Docker\API\Runtime\Client\BaseEndpoint implements \
66
{
77
protected $id;
88
/**
9-
*
9+
*
1010
*
1111
* @param string $id ID of the config
1212
*/
@@ -15,21 +15,21 @@ public function __construct(string $id)
1515
$this->id = $id;
1616
}
1717
use \Docker\API\Runtime\Client\EndpointTrait;
18-
public function getMethod() : string
18+
public function getMethod(): string
1919
{
2020
return 'GET';
2121
}
22-
public function getUri() : string
22+
public function getUri(): string
2323
{
24-
return str_replace(array('{id}'), array($this->id), '/configs/{id}');
24+
return str_replace(['{id}'], [$this->id], '/configs/{id}');
2525
}
26-
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
26+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
2727
{
28-
return array(array(), null);
28+
return [[], null];
2929
}
30-
public function getExtraHeaders() : array
30+
public function getExtraHeaders(): array
3131
{
32-
return array('Accept' => array('application/json'));
32+
return ['Accept' => ['application/json']];
3333
}
3434
/**
3535
* {@inheritdoc}
@@ -45,20 +45,20 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
4545
$status = $response->getStatusCode();
4646
$body = (string) $response->getBody();
4747
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
48-
return $serializer->deserialize($body, 'Docker\\API\\Model\\Config', 'json');
48+
return $serializer->deserialize($body, 'Docker\API\Model\Config', 'json');
4949
}
5050
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
51-
throw new \Docker\API\Exception\ConfigInspectNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
51+
throw new \Docker\API\Exception\ConfigInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5252
}
5353
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
54-
throw new \Docker\API\Exception\ConfigInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
54+
throw new \Docker\API\Exception\ConfigInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5555
}
5656
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
57-
throw new \Docker\API\Exception\ConfigInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
57+
throw new \Docker\API\Exception\ConfigInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
5858
}
5959
}
60-
public function getAuthenticationScopes() : array
60+
public function getAuthenticationScopes(): array
6161
{
62-
return array();
62+
return [];
6363
}
64-
}
64+
}

src/Endpoint/ConfigList.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,46 @@
55
class ConfigList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint
66
{
77
/**
8-
*
8+
*
99
*
1010
* @param array $queryParameters {
1111
* @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters:
12-
12+
1313
- `id=<config id>`
1414
- `label=<key> or label=<key>=value`
1515
- `name=<config name>`
1616
- `names=<config name>`
17-
17+
1818
* }
1919
*/
20-
public function __construct(array $queryParameters = array())
20+
public function __construct(array $queryParameters = [])
2121
{
2222
$this->queryParameters = $queryParameters;
2323
}
2424
use \Docker\API\Runtime\Client\EndpointTrait;
25-
public function getMethod() : string
25+
public function getMethod(): string
2626
{
2727
return 'GET';
2828
}
29-
public function getUri() : string
29+
public function getUri(): string
3030
{
3131
return '/configs';
3232
}
33-
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array
33+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
3434
{
35-
return array(array(), null);
35+
return [[], null];
3636
}
37-
public function getExtraHeaders() : array
37+
public function getExtraHeaders(): array
3838
{
39-
return array('Accept' => array('application/json'));
39+
return ['Accept' => ['application/json']];
4040
}
41-
protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver
41+
protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
4242
{
4343
$optionsResolver = parent::getQueryOptionsResolver();
44-
$optionsResolver->setDefined(array('filters'));
45-
$optionsResolver->setRequired(array());
46-
$optionsResolver->setDefaults(array());
47-
$optionsResolver->addAllowedTypes('filters', array('string'));
44+
$optionsResolver->setDefined(['filters']);
45+
$optionsResolver->setRequired([]);
46+
$optionsResolver->setDefaults([]);
47+
$optionsResolver->addAllowedTypes('filters', ['string']);
4848
return $optionsResolver;
4949
}
5050
/**
@@ -60,17 +60,17 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
6060
$status = $response->getStatusCode();
6161
$body = (string) $response->getBody();
6262
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
63-
return $serializer->deserialize($body, 'Docker\\API\\Model\\Config[]', 'json');
63+
return $serializer->deserialize($body, 'Docker\API\Model\Config[]', 'json');
6464
}
6565
if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
66-
throw new \Docker\API\Exception\ConfigListInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
66+
throw new \Docker\API\Exception\ConfigListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
6767
}
6868
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
69-
throw new \Docker\API\Exception\ConfigListServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response);
69+
throw new \Docker\API\Exception\ConfigListServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response);
7070
}
7171
}
72-
public function getAuthenticationScopes() : array
72+
public function getAuthenticationScopes(): array
7373
{
74-
return array();
74+
return [];
7575
}
76-
}
76+
}

0 commit comments

Comments
 (0)