Skip to content

Commit 5d73ff5

Browse files
authored
Merge pull request #296 from php-opencloud/travis
Travis
2 parents 8bf49a8 + 68f1c35 commit 5d73ff5

Some content is hidden

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

79 files changed

+85
-689
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ language: php
22

33
sudo: false
44

5+
dist: bionic
6+
57
cache:
68
directories:
79
- $HOME/.composer/cache
810

911
matrix:
1012
include:
11-
- php: 7.0
1213
- php: 7.1
1314
- php: 7.2
15+
- php: 7.3
16+
- php: 7.4
1417
- php: nightly
1518
allow_failures:
1619
- php: nightly

src/BlockStorage/v2/Models/Snapshot.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
namespace OpenStack\BlockStorage\v2\Models;
66

77
use OpenStack\Common\Resource\Alias;
8-
use OpenStack\Common\Resource\OperatorResource;
98
use OpenStack\Common\Resource\Creatable;
109
use OpenStack\Common\Resource\Deletable;
1110
use OpenStack\Common\Resource\HasMetadata;
1211
use OpenStack\Common\Resource\HasWaiterTrait;
1312
use OpenStack\Common\Resource\Listable;
13+
use OpenStack\Common\Resource\OperatorResource;
1414
use OpenStack\Common\Resource\Retrievable;
1515
use OpenStack\Common\Resource\Updateable;
1616
use OpenStack\Common\Transport\Utils;
@@ -85,8 +85,6 @@ public function retrieve()
8585

8686
/**
8787
* @param array $userOptions {@see \OpenStack\BlockStorage\v2\Api::postSnapshots}
88-
*
89-
* @return Creatable
9088
*/
9189
public function create(array $userOptions): Creatable
9290
{

src/BlockStorage/v2/Models/Volume.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
namespace OpenStack\BlockStorage\v2\Models;
66

77
use OpenStack\Common\Resource\Alias;
8-
use OpenStack\Common\Resource\OperatorResource;
98
use OpenStack\Common\Resource\Creatable;
109
use OpenStack\Common\Resource\Deletable;
1110
use OpenStack\Common\Resource\HasMetadata;
1211
use OpenStack\Common\Resource\HasWaiterTrait;
1312
use OpenStack\Common\Resource\Listable;
13+
use OpenStack\Common\Resource\OperatorResource;
1414
use OpenStack\Common\Resource\Retrievable;
1515
use OpenStack\Common\Resource\Updateable;
1616
use OpenStack\Common\Transport\Utils;
@@ -111,8 +111,6 @@ public function retrieve()
111111

112112
/**
113113
* @param array $userOptions {@see \OpenStack\BlockStorage\v2\Api::postVolumes}
114-
*
115-
* @return Creatable
116114
*/
117115
public function create(array $userOptions): Creatable
118116
{
@@ -162,8 +160,6 @@ public function parseMetadata(ResponseInterface $response): array
162160

163161
/**
164162
* Update the bootable status for a volume, mark it as a bootable volume.
165-
*
166-
* @param bool $bootable
167163
*/
168164
public function setBootable(bool $bootable = true)
169165
{
@@ -172,8 +168,6 @@ public function setBootable(bool $bootable = true)
172168

173169
/**
174170
* Sets the image metadata for a volume.
175-
*
176-
* @param array $metadata
177171
*/
178172
public function setImageMetadata(array $metadata)
179173
{

src/BlockStorage/v2/Models/VolumeType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace OpenStack\BlockStorage\v2\Models;
66

7-
use OpenStack\Common\Resource\OperatorResource;
87
use OpenStack\Common\Resource\Creatable;
98
use OpenStack\Common\Resource\Deletable;
109
use OpenStack\Common\Resource\Listable;
10+
use OpenStack\Common\Resource\OperatorResource;
1111
use OpenStack\Common\Resource\Updateable;
1212

1313
/**
@@ -26,8 +26,6 @@ class VolumeType extends OperatorResource implements Listable, Creatable, Update
2626

2727
/**
2828
* @param array $userOptions {@see \OpenStack\BlockStorage\v2\Api::postTypes}
29-
*
30-
* @return Creatable
3129
*/
3230
public function create(array $userOptions): Creatable
3331
{

src/BlockStorage/v2/Service.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class Service extends AbstractService
2020
* You must have enough volume storage quota remaining to create a volume of size requested.
2121
*
2222
* @param array $userOptions {@see Api::postVolumes}
23-
*
24-
* @return Volume
2523
*/
2624
public function createVolume(array $userOptions): Volume
2725
{
@@ -33,8 +31,6 @@ public function createVolume(array $userOptions): Volume
3331
*
3432
* @param bool $detail if set to TRUE, more information will be returned
3533
* @param array $userOptions {@see Api::getVolumes}
36-
*
37-
* @return \Generator
3834
*/
3935
public function listVolumes(bool $detail = false, array $userOptions = []): \Generator
4036
{
@@ -45,8 +41,6 @@ public function listVolumes(bool $detail = false, array $userOptions = []): \Gen
4541

4642
/**
4743
* @param string $volumeId the UUID of the volume being retrieved
48-
*
49-
* @return Volume
5044
*/
5145
public function getVolume(string $volumeId): Volume
5246
{
@@ -58,27 +52,17 @@ public function getVolume(string $volumeId): Volume
5852

5953
/**
6054
* @param array $userOptions {@see Api::postTypes}
61-
*
62-
* @return VolumeType
6355
*/
6456
public function createVolumeType(array $userOptions): VolumeType
6557
{
6658
return $this->model(VolumeType::class)->create($userOptions);
6759
}
6860

69-
/**
70-
* @return \Generator
71-
*/
7261
public function listVolumeTypes(): \Generator
7362
{
7463
return $this->model(VolumeType::class)->enumerate($this->api->getTypes(), []);
7564
}
7665

77-
/**
78-
* @param string $typeId
79-
*
80-
* @return VolumeType
81-
*/
8266
public function getVolumeType(string $typeId): VolumeType
8367
{
8468
$type = $this->model(VolumeType::class);
@@ -89,29 +73,19 @@ public function getVolumeType(string $typeId): VolumeType
8973

9074
/**
9175
* @param array $userOptions {@see Api::postSnapshots}
92-
*
93-
* @return Snapshot
9476
*/
9577
public function createSnapshot(array $userOptions): Snapshot
9678
{
9779
return $this->model(Snapshot::class)->create($userOptions);
9880
}
9981

100-
/**
101-
* @return \Generator
102-
*/
10382
public function listSnapshots(bool $detail = false, array $userOptions = []): \Generator
10483
{
10584
$def = (true === $detail) ? $this->api->getSnapshotsDetail() : $this->api->getSnapshots();
10685

10786
return $this->model(Snapshot::class)->enumerate($def, $userOptions);
10887
}
10988

110-
/**
111-
* @param string $snapshotId
112-
*
113-
* @return Snapshot
114-
*/
11589
public function getSnapshot(string $snapshotId): Snapshot
11690
{
11791
$snapshot = $this->model(Snapshot::class);
@@ -122,10 +96,6 @@ public function getSnapshot(string $snapshotId): Snapshot
12296

12397
/**
12498
* Shows A Quota for a tenant.
125-
*
126-
* @param string $tenantId
127-
*
128-
* @return QuotaSet
12999
*/
130100
public function getQuotaSet(string $tenantId): QuotaSet
131101
{

src/Common/Api/Operation.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ public function __construct(array $definition)
4444
$this->params = self::toParamArray($definition['params']);
4545
}
4646

47-
/**
48-
* @return string
49-
*/
5047
public function getPath(): string
5148
{
5249
return $this->path;
5350
}
5451

55-
/**
56-
* @return string
57-
*/
5852
public function getMethod(): string
5953
{
6054
return $this->method;
@@ -64,8 +58,6 @@ public function getMethod(): string
6458
* Indicates whether this operation supports a parameter.
6559
*
6660
* @param $key The name of a parameter
67-
*
68-
* @return bool
6961
*/
7062
public function hasParam(string $key): bool
7163
{
@@ -82,9 +74,6 @@ public function getParam(string $name)
8274
return isset($this->params[$name]) ? $this->params[$name] : null;
8375
}
8476

85-
/**
86-
* @return string
87-
*/
8877
public function getJsonKey(): string
8978
{
9079
return $this->jsonKey ?: '';
@@ -95,8 +84,6 @@ public function getJsonKey(): string
9584
* {@see Parameter} objects.
9685
*
9786
* @param array $data A generic data array
98-
*
99-
* @return array
10087
*/
10188
public static function toParamArray(array $data): array
10289
{

src/Common/Api/OperatorInterface.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public function __construct(ClientInterface $client, ApiInterface $api);
2828
*
2929
* @param array $definition The data that dictates how the operation works
3030
* @param array $userValues The user-defined values that populate the request
31-
*
32-
* @return \Psr\Http\Message\ResponseInterface
3331
*/
3432
public function execute(array $definition, array $userValues = []): ResponseInterface;
3533

@@ -38,8 +36,6 @@ public function execute(array $definition, array $userValues = []): ResponseInte
3836
*
3937
* @param array $definition The data that dictates how the operation works
4038
* @param array $userValues The user-defined values that populate the request
41-
*
42-
* @return \GuzzleHttp\Promise\PromiseInterface
4339
*/
4440
public function executeAsync(array $definition, array $userValues = []): PromiseInterface;
4541

@@ -48,17 +44,13 @@ public function executeAsync(array $definition, array $userValues = []): Promise
4844
* HTTP client is also injected into the object to allow it to communicate with the remote API.
4945
*
5046
* @param array $definition The data that dictates how the operation works
51-
*
52-
* @return Operation
5347
*/
5448
public function getOperation(array $definition): Operation;
5549

5650
/**
5751
* @param string $class the name of the model class
5852
* @param mixed $data either a {@see ResponseInterface} or data array that will populate the newly
5953
* created model class
60-
*
61-
* @return \OpenStack\Common\Resource\ResourceInterface
6254
*/
6355
public function model(string $class, $data = null): ResourceInterface;
6456
}

src/Common/Api/OperatorTrait.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace OpenStack\Common\Api;
66

7-
use GuzzleHttp\Promise\PromiseInterface;
8-
use function GuzzleHttp\uri_template;
97
use GuzzleHttp\ClientInterface;
108
use GuzzleHttp\Promise\Promise;
9+
use GuzzleHttp\Promise\PromiseInterface;
10+
use function GuzzleHttp\uri_template;
1111
use OpenStack\Common\Resource\ResourceInterface;
1212
use OpenStack\Common\Transport\RequestSerializer;
1313
use Psr\Http\Message\ResponseInterface;
@@ -99,10 +99,6 @@ public function getOperation(array $definition): Operation
9999
}
100100

101101
/**
102-
* @param Operation $operation
103-
* @param array $userValues
104-
* @param bool $async
105-
*
106102
* @return mixed
107103
*
108104
* @throws \Exception

0 commit comments

Comments
 (0)