1- <?php declare (strict_types=1 );
1+ <?php
2+
3+ declare (strict_types=1 );
24
35namespace OpenStack \BlockStorage \v2 ;
46
@@ -8,7 +10,7 @@ class Api extends AbstractApi
810{
911 public function __construct ()
1012 {
11- $ this ->params = new Params ;
13+ $ this ->params = new Params () ;
1214 }
1315
1416 public function postVolumes (): array
@@ -37,9 +39,9 @@ public function getVolumes(): array
3739 'method ' => 'GET ' ,
3840 'path ' => 'volumes ' ,
3941 'params ' => [
40- 'limit ' => $ this ->params ->limit (),
41- 'marker ' => $ this ->params ->marker (),
42- 'sort ' => $ this ->params ->sort (),
42+ 'limit ' => $ this ->params ->limit (),
43+ 'marker ' => $ this ->params ->marker (),
44+ 'sort ' => $ this ->params ->sort (),
4345 'allTenants ' => $ this ->params ->allTenants (),
4446 ],
4547 ];
@@ -62,11 +64,11 @@ public function getVolumesDetail(): array
6264 public function getVolume (): array
6365 {
6466 return [
65- 'method ' => 'GET ' ,
66- 'path ' => 'volumes/{id} ' ,
67- 'params ' => [
68- 'id ' => $ this ->params ->idPath ()
69- ]
67+ 'method ' => 'GET ' ,
68+ 'path ' => 'volumes/{id} ' ,
69+ 'params ' => [
70+ 'id ' => $ this ->params ->idPath (),
71+ ],
7072 ];
7173 }
7274
@@ -139,10 +141,10 @@ public function postTypes(): array
139141 public function putType (): array
140142 {
141143 return [
142- 'method ' => 'PUT ' ,
143- 'path ' => 'types/{id} ' ,
144+ 'method ' => 'PUT ' ,
145+ 'path ' => 'types/{id} ' ,
144146 'jsonKey ' => 'volume_type ' ,
145- 'params ' => [
147+ 'params ' => [
146148 'id ' => $ this ->params ->idPath (),
147149 'name ' => $ this ->params ->name ('volume type ' ),
148150 'specs ' => $ this ->params ->typeSpecs (),
@@ -171,10 +173,10 @@ public function deleteType(): array
171173 public function postSnapshots (): array
172174 {
173175 return [
174- 'method ' => 'POST ' ,
175- 'path ' => 'snapshots ' ,
176+ 'method ' => 'POST ' ,
177+ 'path ' => 'snapshots ' ,
176178 'jsonKey ' => 'snapshot ' ,
177- 'params ' => [
179+ 'params ' => [
178180 'volumeId ' => $ this ->params ->volId (),
179181 'force ' => $ this ->params ->force (),
180182 'name ' => $ this ->params ->snapshotName (),
@@ -218,10 +220,10 @@ public function getSnapshot(): array
218220 public function putSnapshot (): array
219221 {
220222 return [
221- 'method ' => 'PUT ' ,
222- 'path ' => 'snapshots/{id} ' ,
223+ 'method ' => 'PUT ' ,
224+ 'path ' => 'snapshots/{id} ' ,
223225 'jsonKey ' => 'snapshot ' ,
224- 'params ' => [
226+ 'params ' => [
225227 'id ' => $ this ->params ->idPath (),
226228 'name ' => $ this ->params ->snapshotName (),
227229 'description ' => $ this ->params ->desc (),
@@ -265,8 +267,8 @@ public function getQuotaSet(): array
265267 'method ' => 'GET ' ,
266268 'path ' => 'os-quota-sets/{tenantId} ' ,
267269 'params ' => [
268- 'tenantId ' => $ this ->params ->idPath ('quota-sets ' )
269- ]
270+ 'tenantId ' => $ this ->params ->idPath ('quota-sets ' ),
271+ ],
270272 ];
271273 }
272274
@@ -277,8 +279,8 @@ public function deleteQuotaSet(): array
277279 'path ' => 'os-quota-sets/{tenantId} ' ,
278280 'jsonKey ' => 'quota_set ' ,
279281 'params ' => [
280- 'tenantId ' => $ this ->params ->idPath ('quota-sets ' )
281- ]
282+ 'tenantId ' => $ this ->params ->idPath ('quota-sets ' ),
283+ ],
282284 ];
283285 }
284286
@@ -299,7 +301,7 @@ public function putQuotaSet(): array
299301 'snapshotsIscsi ' => $ this ->params ->quotaSetSnapshotsIscsi (),
300302 'volumes ' => $ this ->params ->quotaSetVolumes (),
301303 'volumesIscsi ' => $ this ->params ->quotaSetVolumesIscsi (),
302- ]
304+ ],
303305 ];
304306 }
305307}
0 commit comments