diff --git a/src/Page.php b/src/Page.php index e59a1656..37377ae0 100644 --- a/src/Page.php +++ b/src/Page.php @@ -2,14 +2,18 @@ namespace UKFast\SDK; +use Closure; use GuzzleHttp\Psr7\Request; use UKFast\SDK\Client; use UKFast\SDK\Exception\InvalidJsonException; +/** + * @template T of Entity + */ class Page { /** - * @var array + * @var array */ protected $items; @@ -24,7 +28,7 @@ class Page protected $request; /** - * @var \Closure|null + * @var Closure|null */ protected $serializer; @@ -41,7 +45,7 @@ public function __construct($items, $meta, $request) } /** - * @return array + * @return array */ public function getItems() { @@ -51,8 +55,8 @@ public function getItems() /** * Setter for page items * - * @param array $items - * @return \UKFast\SDK\Page + * @param array $items + * @return array */ public function setItems($items) { @@ -64,8 +68,8 @@ public function setItems($items) * Sets a mapping function to serialize each * item in a new page with * - * @param \Closure $callback - * @return \UKFast\SDK\Page + * @param Closure $callback + * @return Page */ public function serializeWith($callback) { @@ -78,7 +82,7 @@ public function serializeWith($callback) * Applies a callback to each item in the page * and returns the resulting array * - * @param \Closure $callback + * @param Closure $callback * @return array */ public function map($callback) @@ -95,8 +99,8 @@ public function map($callback) * Sets client to use when making requests * to other pages * - * @param \UKFast\SDK\Client $client - * @return \UKFast\SDK\Page + * @param Client $client + * @return Page */ public function setClient(Client $client) { @@ -176,7 +180,7 @@ public function pageNumber() * Gets a page by number * * @param int $number - * @return \UKFast\SDK\Page + * @return Page * @throws \GuzzleHttp\Exception\GuzzleException * @throws \UKFast\SDK\Exception\InvalidJsonException */ @@ -192,7 +196,7 @@ public function getPage($number) } /** - * @return \UKFast\SDK\Page|false + * @return Page|false */ public function getNextPage() { @@ -205,7 +209,7 @@ public function getNextPage() } /** - * @return \UKFast\SDK\Page|false + * @return Page|false */ public function getPreviousPage() { @@ -218,7 +222,7 @@ public function getPreviousPage() } /** - * @return \UKFast\SDK\Page + * @return Page */ public function getFirstPage() { @@ -227,7 +231,7 @@ public function getFirstPage() } /** - * @return \UKFast\SDK\Page + * @return Page */ public function getLastPage() { @@ -241,7 +245,7 @@ public function getLastPage() * * @param Response $response * @param string|\Psr\Http\Message\UriInterface $uri - * @return \UKFast\SDK\Page + * @return Page * @throws \UKFast\SDK\Exception\InvalidJsonException */ private function constructNewPage($response, $uri) diff --git a/src/Traits/PageItems.php b/src/Traits/PageItems.php index 4b8a652e..975f0878 100644 --- a/src/Traits/PageItems.php +++ b/src/Traits/PageItems.php @@ -2,9 +2,13 @@ namespace UKFast\SDK\Traits; +use UKFast\SDK\Entity; use UKFast\SDK\Page; use UKFast\SDK\SelfResponse; +/** + * @template T of Entity + */ trait PageItems { /** @@ -19,6 +23,7 @@ public function getEntityMap() /** * Return an entity model * @param $data + * @return T */ abstract public function loadEntity($data); @@ -28,7 +33,7 @@ abstract public function loadEntity($data); * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page */ public function getPage($page = 1, $perPage = 15, $filters = []) { @@ -49,7 +54,7 @@ public function getPage($page = 1, $perPage = 15, $filters = []) * Get an array of all items from all pages * * @param array $filters - * @return array + * @return array */ public function getAll($filters = []) { @@ -79,7 +84,7 @@ public function getAll($filters = []) /** * Get a single item from the collection * @param $id - * @return mixed + * @return T */ public function getById($id) { @@ -101,7 +106,7 @@ public function deleteById($id) /** * Create a new item for the collection - * @param $entity + * @param T $entity * @return SelfResponse */ public function createEntity($entity) @@ -121,7 +126,7 @@ public function createEntity($entity) /** * Update an existing item in the collection - * @param $entity + * @param T $entity * @return SelfResponse */ public function updateEntity($entity) diff --git a/src/eCloud/AffinityRuleClient.php b/src/eCloud/AffinityRuleClient.php index 6eb247dd..37e0921a 100644 --- a/src/eCloud/AffinityRuleClient.php +++ b/src/eCloud/AffinityRuleClient.php @@ -9,6 +9,7 @@ class AffinityRuleClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/affinity-rules'; diff --git a/src/eCloud/AffinityRuleMemberClient.php b/src/eCloud/AffinityRuleMemberClient.php index 2dd459f2..011f81de 100644 --- a/src/eCloud/AffinityRuleMemberClient.php +++ b/src/eCloud/AffinityRuleMemberClient.php @@ -8,6 +8,7 @@ class AffinityRuleMemberClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/affinity-rule-members'; diff --git a/src/eCloud/ApplianceClient.php b/src/eCloud/ApplianceClient.php index 37dbdd72..cb36800f 100644 --- a/src/eCloud/ApplianceClient.php +++ b/src/eCloud/ApplianceClient.php @@ -24,7 +24,7 @@ class ApplianceClient extends Client * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page * @throws \GuzzleHttp\Exception\GuzzleException */ public function getPage($page = 1, $perPage = 15, $filters = []) diff --git a/src/eCloud/AvailabilityZoneClient.php b/src/eCloud/AvailabilityZoneClient.php index 91ddc48d..03765949 100644 --- a/src/eCloud/AvailabilityZoneClient.php +++ b/src/eCloud/AvailabilityZoneClient.php @@ -12,6 +12,7 @@ class AvailabilityZoneClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/availability-zones'; diff --git a/src/eCloud/BillingHistoryClient.php b/src/eCloud/BillingHistoryClient.php index d4dcc119..719ab2a8 100644 --- a/src/eCloud/BillingHistoryClient.php +++ b/src/eCloud/BillingHistoryClient.php @@ -8,6 +8,7 @@ class BillingHistoryClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/billing-history'; diff --git a/src/eCloud/BillingMetricClient.php b/src/eCloud/BillingMetricClient.php index 28ba496f..598ddc53 100644 --- a/src/eCloud/BillingMetricClient.php +++ b/src/eCloud/BillingMetricClient.php @@ -8,6 +8,7 @@ class BillingMetricClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/billing-metrics'; diff --git a/src/eCloud/Client.php b/src/eCloud/Client.php index 2f3ac136..39baf0d0 100644 --- a/src/eCloud/Client.php +++ b/src/eCloud/Client.php @@ -13,7 +13,7 @@ class Client extends BaseClient */ /** - * @return BaseClient + * @return DatastoreClient */ public function datastores() { @@ -21,7 +21,7 @@ public function datastores() } /** - * @return BaseClient + * @return FirewallClient */ public function firewalls() { @@ -29,7 +29,7 @@ public function firewalls() } /** - * @return BaseClient + * @return HostClient */ public function hosts() { @@ -37,7 +37,7 @@ public function hosts() } /** - * @return BaseClient + * @return PodClient */ public function pods() { @@ -45,7 +45,7 @@ public function pods() } /** - * @return BaseClient + * @return SiteClient */ public function sites() { @@ -53,7 +53,7 @@ public function sites() } /** - * @return BaseClient + * @return SolutionClient */ public function solutions() { @@ -69,7 +69,7 @@ public function templates() } /** - * @return BaseClient + * @return VirtualMachineClient */ public function virtualMachines() { @@ -77,7 +77,7 @@ public function virtualMachines() } /** - * @return BaseClient + * @return IopsClient */ public function iops() { @@ -85,7 +85,7 @@ public function iops() } /** - * @return BaseClient + * @return IpAddressesClient */ public function ipAddresses() { @@ -93,7 +93,7 @@ public function ipAddresses() } /** - * @return BaseClient + * @return ApplianceClient */ public function appliances() { @@ -105,7 +105,7 @@ public function appliances() */ /** - * @return BaseClient + * @return RegionClient */ public function regions() { @@ -113,7 +113,7 @@ public function regions() } /** - * @return BaseClient + * @return AvailabilityZoneClient */ public function availabilityZones() { @@ -121,7 +121,7 @@ public function availabilityZones() } /** - * @return BaseClient + * @return VpcClient */ public function vpcs() { @@ -129,15 +129,17 @@ public function vpcs() } /** - * @return BaseClient + * @return ImageClient */ public function images() { + (new ImageClient($this->httpClient))->auth($this->token)->getPage()->getItems()[0]->documentationUri; + (new ImageClient($this->httpClient))->auth($this->token)->getAll()[0]->documentationUri; return (new ImageClient($this->httpClient))->auth($this->token); } /** - * @return BaseClient + * @return InstanceClient */ public function instances() { @@ -145,7 +147,7 @@ public function instances() } /** - * @return BaseClient + * @return VolumeClient */ public function volumes() { @@ -153,7 +155,7 @@ public function volumes() } /** - * @return BaseClient + * @return FloatingIpClient */ public function floatingIps() { @@ -161,7 +163,7 @@ public function floatingIps() } /** - * @return BaseClient + * @return RouterClient */ public function routers() { @@ -169,7 +171,7 @@ public function routers() } /** - * @return BaseClient + * @return RouterThroughputClient */ public function routerThroughputs() { @@ -177,7 +179,7 @@ public function routerThroughputs() } /** - * @return BaseClient + * @return FirewallPolicyClient */ public function firewallPolicies() { @@ -185,7 +187,7 @@ public function firewallPolicies() } /** - * @return BaseClient + * @return FirewallRuleClient */ public function firewallRules() { @@ -193,7 +195,7 @@ public function firewallRules() } /** - * @return BaseClient + * @return FirewallRulePortClient */ public function firewallRulePorts() { @@ -201,7 +203,7 @@ public function firewallRulePorts() } /** - * @return BaseClient + * @return MonitoringGatewaySpecificationClient */ public function monitoringGatewaySpecifications() { @@ -209,7 +211,7 @@ public function monitoringGatewaySpecifications() } /** - * @return BaseClient + * @return MonitoringGatewayClient */ public function monitoringGateways() { @@ -217,7 +219,7 @@ public function monitoringGateways() } /** - * @return BaseClient + * @return NetworkClient */ public function networks() { @@ -225,7 +227,7 @@ public function networks() } /** - * @return BaseClient + * @return NetworkPolicyClient */ public function networkPolicies() { @@ -233,7 +235,7 @@ public function networkPolicies() } /** - * @return BaseClient + * @return NetworkRuleClient */ public function networkRules() { @@ -241,7 +243,7 @@ public function networkRules() } /** - * @return BaseClient + * @return NetworkRulePortClient */ public function networkRulePorts() { @@ -249,7 +251,7 @@ public function networkRulePorts() } /** - * @return BaseClient + * @return BillingMetricClient */ public function billingMetrics() { @@ -257,7 +259,7 @@ public function billingMetrics() } /** - * @return BaseClient + * @return DiscountPlanClient */ public function discountPlans() { @@ -265,7 +267,7 @@ public function discountPlans() } /** - * @return BaseClient + * @return HostGroupClient */ public function hostGroups() { @@ -273,7 +275,7 @@ public function hostGroups() } /** - * @return BaseClient + * @return HostSpecClient */ public function hostSpecs() { @@ -281,7 +283,7 @@ public function hostSpecs() } /** - * @return BaseClient + * @return DedicatedHostClient */ public function dedicatedHosts() { @@ -289,7 +291,7 @@ public function dedicatedHosts() } /** - * @return BaseClient + * @return VpnSessionClient */ public function vpnSessions() { @@ -297,7 +299,7 @@ public function vpnSessions() } /** - * @return BaseClient + * @return VpnServiceClient */ public function vpnServices() { @@ -305,7 +307,7 @@ public function vpnServices() } /** - * @return BaseClient + * @return VpnEndpointClient */ public function vpnEndpoints() { @@ -313,7 +315,7 @@ public function vpnEndpoints() } /** - * @return BaseClient + * @return VpnProfileGroupClient */ public function vpnProfileGroups() { @@ -321,7 +323,7 @@ public function vpnProfileGroups() } /** - * @return BaseClient + * @return VolumeGroupClient */ public function volumeGroups() { @@ -329,7 +331,7 @@ public function volumeGroups() } /** - * @return BaseClient + * @return LoadBalancerSpecClient */ public function loadBalancerSpecs() { @@ -337,7 +339,7 @@ public function loadBalancerSpecs() } /** - * @return BaseClient + * @return LoadBalancerClient */ public function loadBalancers() { @@ -345,7 +347,7 @@ public function loadBalancers() } /** - * @return BaseClient + * @return TaskClient */ public function tasks() { @@ -353,7 +355,7 @@ public function tasks() } /** - * @return BaseClient + * @return VipClient */ public function vips() { @@ -361,7 +363,7 @@ public function vips() } /** - * @return BaseClient + * @return NicClient */ public function nics() { @@ -369,7 +371,7 @@ public function nics() } /** - * @return BaseClient + * @return AffinityRuleClient */ public function affinityRules() { @@ -377,7 +379,7 @@ public function affinityRules() } /** - * @return BaseClient + * @return AffinityRuleMemberClient */ public function affinityRuleMembers() { @@ -385,7 +387,7 @@ public function affinityRuleMembers() } /** - * @return BaseClient + * @return ResourceTierClient */ public function resourceTiers() { @@ -393,7 +395,7 @@ public function resourceTiers() } /** - * @return BaseClient + * @return SoftwareClient */ public function software() { @@ -401,7 +403,7 @@ public function software() } /** - * @return BaseClient + * @return VpnGatewaySpecificationClient */ public function vpnGatewaySpecifications() { @@ -409,7 +411,7 @@ public function vpnGatewaySpecifications() } /** - * @return BaseClient + * @return VpnGatewayClient */ public function vpnGateways() { @@ -417,7 +419,7 @@ public function vpnGateways() } /** - * @return BaseClient + * @return VpnGatewayUserClient */ public function vpnGatewayUsers() { @@ -425,7 +427,7 @@ public function vpnGatewayUsers() } /** - * @return BaseClient + * @return BillingHistoryClient */ public function billingHistory() { @@ -433,7 +435,7 @@ public function billingHistory() } /** - * @return BaseClient + * @return InstanceSoftwareClient */ public function instanceSoftware() { diff --git a/src/eCloud/DatastoreClient.php b/src/eCloud/DatastoreClient.php index e9c87a7f..ebedb052 100644 --- a/src/eCloud/DatastoreClient.php +++ b/src/eCloud/DatastoreClient.php @@ -15,7 +15,7 @@ class DatastoreClient extends Client implements ClientEntityInterface * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page * @throws \GuzzleHttp\Exception\GuzzleException */ public function getPage($page = 1, $perPage = 15, $filters = []) diff --git a/src/eCloud/DedicatedHostClient.php b/src/eCloud/DedicatedHostClient.php index 3e7a7966..cfa7548b 100644 --- a/src/eCloud/DedicatedHostClient.php +++ b/src/eCloud/DedicatedHostClient.php @@ -8,6 +8,7 @@ class DedicatedHostClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/hosts'; diff --git a/src/eCloud/DiscountPlanClient.php b/src/eCloud/DiscountPlanClient.php index 9efb7567..419fbf5b 100644 --- a/src/eCloud/DiscountPlanClient.php +++ b/src/eCloud/DiscountPlanClient.php @@ -8,6 +8,7 @@ class DiscountPlanClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/discount-plans'; diff --git a/src/eCloud/FirewallClient.php b/src/eCloud/FirewallClient.php index 28327c6e..f04eacbb 100644 --- a/src/eCloud/FirewallClient.php +++ b/src/eCloud/FirewallClient.php @@ -14,7 +14,7 @@ class FirewallClient extends Client * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page * @throws \GuzzleHttp\Exception\GuzzleException */ public function getPage($page = 1, $perPage = 15, $filters = []) diff --git a/src/eCloud/FirewallPolicyClient.php b/src/eCloud/FirewallPolicyClient.php index 2aaef26d..baab6af0 100644 --- a/src/eCloud/FirewallPolicyClient.php +++ b/src/eCloud/FirewallPolicyClient.php @@ -8,6 +8,7 @@ class FirewallPolicyClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/firewall-policies'; diff --git a/src/eCloud/FirewallRuleClient.php b/src/eCloud/FirewallRuleClient.php index 88676ab2..3c11ee28 100644 --- a/src/eCloud/FirewallRuleClient.php +++ b/src/eCloud/FirewallRuleClient.php @@ -8,6 +8,7 @@ class FirewallRuleClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/firewall-rules'; diff --git a/src/eCloud/FirewallRulePortClient.php b/src/eCloud/FirewallRulePortClient.php index a301229a..e8f3a86c 100644 --- a/src/eCloud/FirewallRulePortClient.php +++ b/src/eCloud/FirewallRulePortClient.php @@ -8,6 +8,7 @@ class FirewallRulePortClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/firewall-rule-ports'; diff --git a/src/eCloud/FloatingIpClient.php b/src/eCloud/FloatingIpClient.php index 28630079..7c8aef27 100644 --- a/src/eCloud/FloatingIpClient.php +++ b/src/eCloud/FloatingIpClient.php @@ -8,6 +8,7 @@ class FloatingIpClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/floating-ips'; diff --git a/src/eCloud/HostClient.php b/src/eCloud/HostClient.php index 50ace7d7..db2911d2 100644 --- a/src/eCloud/HostClient.php +++ b/src/eCloud/HostClient.php @@ -15,7 +15,7 @@ class HostClient extends Client implements ClientEntityInterface * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page * @throws \GuzzleHttp\Exception\GuzzleException */ public function getPage($page = 1, $perPage = 15, $filters = []) diff --git a/src/eCloud/HostGroupClient.php b/src/eCloud/HostGroupClient.php index 9d67afed..f4d134fd 100644 --- a/src/eCloud/HostGroupClient.php +++ b/src/eCloud/HostGroupClient.php @@ -8,6 +8,7 @@ class HostGroupClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/host-groups'; diff --git a/src/eCloud/HostSpecClient.php b/src/eCloud/HostSpecClient.php index f20d5398..74ec13a5 100644 --- a/src/eCloud/HostSpecClient.php +++ b/src/eCloud/HostSpecClient.php @@ -8,6 +8,7 @@ class HostSpecClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/host-specs'; diff --git a/src/eCloud/ImageClient.php b/src/eCloud/ImageClient.php index 628890c6..b0420679 100644 --- a/src/eCloud/ImageClient.php +++ b/src/eCloud/ImageClient.php @@ -10,6 +10,7 @@ class ImageClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/images'; diff --git a/src/eCloud/InstanceClient.php b/src/eCloud/InstanceClient.php index 26187ec6..23a6bf01 100644 --- a/src/eCloud/InstanceClient.php +++ b/src/eCloud/InstanceClient.php @@ -9,6 +9,7 @@ class InstanceClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/instances'; diff --git a/src/eCloud/InstanceSoftwareClient.php b/src/eCloud/InstanceSoftwareClient.php index 136f05d1..dda6c0a6 100644 --- a/src/eCloud/InstanceSoftwareClient.php +++ b/src/eCloud/InstanceSoftwareClient.php @@ -8,6 +8,7 @@ class InstanceSoftwareClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/instance-software'; diff --git a/src/eCloud/IopsClient.php b/src/eCloud/IopsClient.php index 6a8e66ac..737f9ebd 100644 --- a/src/eCloud/IopsClient.php +++ b/src/eCloud/IopsClient.php @@ -14,7 +14,7 @@ class IopsClient extends Client implements ClientEntityInterface * @param int $page Page number * @param int $perPage Number of items to return per page * @param array $filters Filter to apply - * @return int|Page + * @return Page */ public function getPage($page = 1, $perPage = 15, $filters = []) { diff --git a/src/eCloud/IpAddressesClient.php b/src/eCloud/IpAddressesClient.php index c3b4c9bc..37bbd87d 100644 --- a/src/eCloud/IpAddressesClient.php +++ b/src/eCloud/IpAddressesClient.php @@ -9,6 +9,7 @@ class IpAddressesClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; private $collectionPath = "v2/ip-addresses"; diff --git a/src/eCloud/LoadBalancerClient.php b/src/eCloud/LoadBalancerClient.php index c629f461..8c19ba29 100644 --- a/src/eCloud/LoadBalancerClient.php +++ b/src/eCloud/LoadBalancerClient.php @@ -8,6 +8,7 @@ class LoadBalancerClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/load-balancers'; diff --git a/src/eCloud/LoadBalancerSpecClient.php b/src/eCloud/LoadBalancerSpecClient.php index 4d7731da..9adee733 100644 --- a/src/eCloud/LoadBalancerSpecClient.php +++ b/src/eCloud/LoadBalancerSpecClient.php @@ -8,6 +8,7 @@ class LoadBalancerSpecClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/load-balancer-specs'; diff --git a/src/eCloud/MonitoringGatewayClient.php b/src/eCloud/MonitoringGatewayClient.php index 486a6c93..2fa75d5b 100644 --- a/src/eCloud/MonitoringGatewayClient.php +++ b/src/eCloud/MonitoringGatewayClient.php @@ -8,6 +8,7 @@ class MonitoringGatewayClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/monitoring-gateways'; diff --git a/src/eCloud/MonitoringGatewaySpecificationClient.php b/src/eCloud/MonitoringGatewaySpecificationClient.php index e88023f3..f162494d 100644 --- a/src/eCloud/MonitoringGatewaySpecificationClient.php +++ b/src/eCloud/MonitoringGatewaySpecificationClient.php @@ -8,6 +8,7 @@ class MonitoringGatewaySpecificationClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/monitoring-gateway-specifications'; diff --git a/src/eCloud/NetworkClient.php b/src/eCloud/NetworkClient.php index 09bd618a..6f6d9faf 100644 --- a/src/eCloud/NetworkClient.php +++ b/src/eCloud/NetworkClient.php @@ -8,6 +8,7 @@ class NetworkClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/networks'; diff --git a/src/eCloud/NetworkPolicyClient.php b/src/eCloud/NetworkPolicyClient.php index 4dd063d8..dea48c89 100644 --- a/src/eCloud/NetworkPolicyClient.php +++ b/src/eCloud/NetworkPolicyClient.php @@ -8,6 +8,7 @@ class NetworkPolicyClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/network-policies'; diff --git a/src/eCloud/NetworkRuleClient.php b/src/eCloud/NetworkRuleClient.php index c421d16a..ac518e6f 100644 --- a/src/eCloud/NetworkRuleClient.php +++ b/src/eCloud/NetworkRuleClient.php @@ -8,6 +8,7 @@ class NetworkRuleClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/network-rules'; diff --git a/src/eCloud/NetworkRulePortClient.php b/src/eCloud/NetworkRulePortClient.php index 1114571d..738e6689 100644 --- a/src/eCloud/NetworkRulePortClient.php +++ b/src/eCloud/NetworkRulePortClient.php @@ -8,6 +8,7 @@ class NetworkRulePortClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/network-rule-ports'; diff --git a/src/eCloud/NicClient.php b/src/eCloud/NicClient.php index e9d53bee..4143893e 100644 --- a/src/eCloud/NicClient.php +++ b/src/eCloud/NicClient.php @@ -8,6 +8,7 @@ class NicClient extends Client implements ClientEntityInterface { + /** @use PageItems */ use PageItems; protected $collectionPath = 'v2/nics'; diff --git a/src/eCloud/PodClient.php b/src/eCloud/PodClient.php index 6852f0a4..558aac85 100644 --- a/src/eCloud/PodClient.php +++ b/src/eCloud/PodClient.php @@ -23,7 +23,7 @@ class PodClient extends Client implements ClientEntityInterface * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page * @throws \GuzzleHttp\Exception\GuzzleException */ public function getPage($page = 1, $perPage = 15, $filters = []) @@ -56,7 +56,7 @@ public function getById($id) * @param int $page * @param int $perPage * @param array $filters - * @return Page + * @return Page