Skip to content

Commit e40aed5

Browse files
Started work on next version
1 parent fc035f2 commit e40aed5

Some content is hidden

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

88 files changed

+515
-519
lines changed

.github/SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Supported Versions
44

55
After each new major release, the previous release will be supported for no
6-
less than 2 years, unless explictly stated otherwise. This may mean that there
6+
less than 2 years, unless explicitly stated otherwise. This may mean that there
77
are multiple supported versions at any given time.
88

99
## Reporting a Vulnerability

.github/workflows/static.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
phpstan:
99
name: PHPStan
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111

1212
steps:
1313
- name: Checkout code
@@ -23,14 +23,14 @@ jobs:
2323
update: true
2424

2525
- name: Install Dependencies
26-
uses: nick-invision/retry@v2
26+
uses: nick-invision/retry@v3
2727
with:
2828
timeout_minutes: 5
2929
max_attempts: 5
3030
command: composer update --no-interaction --no-progress
3131

3232
- name: Install PHPStan
33-
uses: nick-invision/retry@v2
33+
uses: nick-invision/retry@v3
3434
with:
3535
timeout_minutes: 5
3636
max_attempts: 5
@@ -41,7 +41,7 @@ jobs:
4141

4242
psalm:
4343
name: Psalm
44-
runs-on: ubuntu-22.04
44+
runs-on: ubuntu-24.04
4545

4646
steps:
4747
- name: Checkout code
@@ -57,14 +57,14 @@ jobs:
5757
update: true
5858

5959
- name: Install Dependencies
60-
uses: nick-invision/retry@v2
60+
uses: nick-invision/retry@v3
6161
with:
6262
timeout_minutes: 5
6363
max_attempts: 5
6464
command: composer update --no-interaction --no-progress
6565

6666
- name: Install Psalm
67-
uses: nick-invision/retry@v2
67+
uses: nick-invision/retry@v3
6868
with:
6969
timeout_minutes: 5
7070
max_attempts: 5

.github/workflows/tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ on:
77
jobs:
88
tests:
99
name: PHP ${{ matrix.php }}
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111

1212
strategy:
1313
matrix:
14-
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
14+
php: ['8.1', '8.2', '8.3', '8.4']
1515

1616
steps:
1717
- name: Checkout Code
@@ -30,14 +30,14 @@ jobs:
3030
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3131

3232
- name: Install Dependencies
33-
uses: nick-invision/retry@v2
33+
uses: nick-invision/retry@v3
3434
with:
3535
timeout_minutes: 5
3636
max_attempts: 5
3737
command: composer update --no-interaction --no-progress
3838

3939
- name: Install PHPUnit
40-
uses: nick-invision/retry@v2
40+
uses: nick-invision/retry@v3
4141
with:
4242
timeout_minutes: 5
4343
max_attempts: 5

.php-cs-fixer.cache

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"8.3.17","version":"3.70.0","indent":" ","lineEnding":"\n","rules":{"phpdoc_to_param_type":true,"phpdoc_to_property_type":true,"phpdoc_to_return_type":true,"php_unit_data_provider_static":{"force":true},"php_unit_assert_new_names":true,"php_unit_expectation":{"target":"8.4"},"php_unit_namespaced":{"target":"6.0"},"php_unit_dedicate_assert":{"target":"5.6"},"php_unit_mock":{"target":"5.5"},"php_unit_no_expectation_annotation":{"target":"4.3"},"php_unit_dedicate_assert_internal_type":{"target":"7.5"}},"hashes":{"tests\/Entity\/VpcTest.php":"2df0d49414e552a93d7425834982c411","tests\/Entity\/AppTest.php":"0dca74029136d32f86ce9f45ce9bbed5","tests\/Entity\/AppInstanceSizeTest.php":"c9c47c511e1f757a5a94513cff5925b9","tests\/Entity\/ReservedIpTest.php":"3db4351f3702aa233712bca30d35fa07","tests\/Entity\/AppDeploymentTest.php":"53bcae6301d5f273652ffd3152da466f","tests\/Entity\/AppTierTest.php":"f7143533e80dff1dec69f506c060992a","tests\/Entity\/AppDeploymentLogTest.php":"067ce2c0d74bab443b03b2cff3e9345b","tests\/Entity\/AppRegionTest.php":"9471a228b77c70105303c12fbf7e6305","tests\/DropletEntityTest.php":"f9af22e5fa6f533a81379c2958394507","tests\/ProjectResourceEntityTest.php":"261f2ee1af469b87ccd5c15e79d38dbf","tests\/Api\/VpcTest.php":"e1f88d2dbdae800d0c356b899e57f19a","tests\/ResponseMediatorTest.php":"220b52c7b78160f0642abb9f579cac47","tests\/CdnEndpointEntityTest.php":"37eee58220ef9f76672c8b6851d1893a","tests\/IntegrationTest.php":"430864aefe1513347fd41e52e7ac2a42","tests\/ClientTest.php":"2958bb0b469d6c8e88828d49716a025f","src\/HttpClient\/Util\/JsonObject.php":"71d264d41cc32d45e2084911b29e203b","src\/HttpClient\/Util\/QueryStringBuilder.php":"da231766419a7f7c047730054d358570","src\/HttpClient\/Builder.php":"16094258831e6fdaaa6117706e57d119","src\/HttpClient\/Plugin\/Authentication.php":"7da14fbf1096cd6854875c764c069538","src\/HttpClient\/Plugin\/ExceptionThrower.php":"05d58e2650663b3f5f61f91e91ea4aa7","src\/HttpClient\/Plugin\/History.php":"a960215fd58afba70a73bfb80a440f0b","src\/HttpClient\/Message\/ResponseMediator.php":"063d904565c58055a15ac19556b08b08","src\/Entity\/Team.php":"0fb2e5a9ce721ad014f215c51ef05a14","src\/Entity\/Domain.php":"5cc82e920db6dbaacce34a1a5d2175eb","src\/Entity\/CdnEndpoint.php":"3276a42edb1244db984e573e36a79af8","src\/Entity\/AbstractEntity.php":"29fe72d9b10f205c2af84efb61397298","src\/Entity\/AppTier.php":"4768cbaa0e3fa988776eceaaacd65fa9","src\/Entity\/ForwardingRule.php":"86109a4ae7096e1e527b1acc0784a457","src\/Entity\/FirewallRuleInbound.php":"e03957da36d6fb41ad6124b2a6a43014","src\/Entity\/Region.php":"bb3eb15f2d73a617c101a19f30dc0e2d","src\/Entity\/DatabaseRule.php":"456875fe3fc96f9fdee4ed15a0002433","src\/Entity\/DatabaseMysqlSettings.php":"b9300529a29036b0fb725b351cc1564e","src\/Entity\/Size.php":"d2e02b42123fb3d155bd74922e29b1a1","src\/Entity\/MonitoringMetric.php":"cb358fe3f0a7ab6a82b95340d321193c","src\/Entity\/App.php":"7b8226c3fc35b4c62ce72d61aac9f320","src\/Entity\/Volume.php":"b08c30627aafe44430104ed22fadfb29","src\/Entity\/Certificate.php":"eaca635ba1108bfeebe1d8641314fb92","src\/Entity\/Key.php":"1a0a583335332e162ba95bca64bc67e6","src\/Entity\/Droplet.php":"4da6aa276ee17dd3d26a659a7f854713","src\/Entity\/Action.php":"4ce2c91b8e15a7d701ae208b05a42d5f","src\/Entity\/DatabaseConnection.php":"d3809b3a0814a0ac137d68b9ad46a794","src\/Entity\/AppRegion.php":"f7946c21347ebedf4c4e0dbb7f9e5f8a","src\/Entity\/Firewall.php":"4041cb6bca3f68ce4ff6a854c872f95b","src\/Entity\/DatabaseUser.php":"5f50878205774114b59dc57f0ba8a118","src\/Entity\/DatabasePool.php":"cce63cba9fda758f70127b5b02b2d914","src\/Entity\/Snapshot.php":"e0fe4d48e59722ec2d5ca0abce48af0b","src\/Entity\/ReservedIp.php":"04a7eafccc6636b267fa96a25f2450fd","src\/Entity\/Database.php":"96216a96cc786272e07027e70194b371","src\/Entity\/FloatingIp.php":"b2c1d22e4384240b91a874161c0e590d","src\/Entity\/Tag.php":"3fe106cd8c81983a75d14f8027cc734e","src\/Entity\/Account.php":"93e82df0c32e29bf939844de553c0b11","src\/Entity\/Meta.php":"c67c83a0a9f8ab88d53c07077087df73","src\/Entity\/AppDeployment.php":"0c52df554d158159986d35726c3d8db7","src\/Entity\/FirewallLocations.php":"cb4de4ec0c3bd78a5949d2d8dd535438","src\/Entity\/MonitoringAlert.php":"8dd01a7ac4315c6f369a4dc9d02ec6bb","src\/Entity\/DatabaseMaintenanceWindow.php":"df797a6ab53ac7da4e3caee75d38145d","src\/Entity\/FirewallRuleOutbound.php":"7f10bb52a0b9647f24eb28ea4391465a","src\/Entity\/FirewallRule.php":"63dbbed3eb6dcae6899bcaab3e8786bd","src\/Entity\/DatabaseBackup.php":"02c8f3fbc565049a658bc753c2617e15","src\/Entity\/StickySession.php":"1d0550afcb20369639aab1424084a304","src\/Entity\/DatabaseCluster.php":"f07d799c62cc3b9bdc555e8794130e07","src\/Entity\/AppInstanceSize.php":"da26a303e06449f394e9a2f8ccd9ecc9","src\/Entity\/LoadBalancer.php":"bc3f76c11762741ab5fb700d477e2be4","src\/Entity\/NextBackupWindow.php":"90d6b55317de653daf7c06386005a395","src\/Entity\/ProjectResource.php":"48ebc1ae43115fd2b1a03c6c58d1d83e","src\/Entity\/RateLimit.php":"72b24ccc2b23693b29e9fdc35b02902b","src\/Entity\/AppDeploymentLog.php":"6c68f73318f3228080cf5a476f8c77c8","src\/Entity\/Network.php":"ae474a51391e996ea606f1d884306475","src\/Entity\/DatabaseReplica.php":"1c9e4257c4ccec7e7c65f88291c708e4","src\/Entity\/DomainRecord.php":"ccb38be9bda6b62c134c51a05d3ab096","src\/Entity\/Vpc.php":"2dedb97eefcf7f2824a99fe41d6dd471","src\/Entity\/Image.php":"e7fb4a631f78978f7ce47cc1ffbea915","src\/Entity\/HealthCheck.php":"b93f8bcbd3776977938f8764479cb24a","src\/Entity\/Kernel.php":"998e9540c21751ac5b5c6e3434d61944","src\/Api\/Domain.php":"92abf3f85ac8495b3a9a96911f1c6ad3","src\/Api\/CdnEndpoint.php":"c0c1ae3be3380f7e22c6b1c57bb4ff84","src\/Api\/Region.php":"2eaa378e2a0832e2051cddf0ed82e1e8","src\/Api\/Size.php":"3d70937a1c025e5ee65cc7162f0e776c","src\/Api\/App.php":"6f97b4d1779fa390c99cc869e1fe2294","src\/Api\/Volume.php":"6e319742e691137dab98f7dba4c81cc4","src\/Api\/Certificate.php":"573c1c16dd37cc447f2fe0b7607caffc","src\/Api\/Key.php":"3bb52929a86bad9241ff781bd830f347","src\/Api\/Droplet.php":"ed044085be062630d3a1e72725705acb","src\/Api\/Action.php":"4bfbf229d5a864655723d94215bd297c","src\/Api\/Firewall.php":"37dc7c8dbfbd36c1a4d8150624cb8ac0","src\/Api\/Snapshot.php":"825d28a5056d9f178733cc61104ee99f","src\/Api\/ReservedIp.php":"b62b6b53a4c2d23102cdd14e9e9b4e27","src\/Api\/Database.php":"ab05a43019b9c6384226211aa9430524","src\/Api\/FloatingIp.php":"673bff1c79866c21495461b5aef584c0","src\/Api\/Tag.php":"27288bd4d29a411ebed9be548ba840a0","src\/Api\/Account.php":"f3b3f27c320c20570e8d3203f06ea893","src\/Api\/AbstractApi.php":"ca5bb28d4aafac4605086c8c96e70c1b","src\/Api\/Monitoring.php":"5ca29f535eceb052b85fc92e9537fe2a","src\/Api\/LoadBalancer.php":"82abeab9e871743743c1729c18ca91ce","src\/Api\/ProjectResource.php":"0b96d4e1cf87696276520ec81327855b","src\/Api\/DomainRecord.php":"9c8187952945f5e720822c4d747b9f55","src\/Api\/Vpc.php":"ac351f7d4086d8cf48bf90501ed23a4f","src\/Api\/Image.php":"51497690f9283586776e96efa5cfc2b3","src\/ResultPagerInterface.php":"6974cc50e495e3724f86b94b91494362","src\/Exception\/ErrorException.php":"bf50239c745894fbff5ee878eb16a218","src\/Exception\/InvalidRecordException.php":"9324f5fc152f7d9618fb84cef962a0c0","src\/Exception\/ResourceNotFoundException.php":"58bbeb52ed5e28c6cf86b16523ed8e44","src\/Exception\/ExceptionInterface.php":"f784294395590486028077b080d188f1","src\/Exception\/ValidationFailedException.php":"3bdc2df81b76cfc13cd1d49edd08f666","src\/Exception\/RuntimeException.php":"77092c3207430dc7dce3211bf52389c6","src\/Exception\/ApiLimitExceededException.php":"c892b05cd68ec4e2c57ee26f15c4958b","src\/Exception\/InvalidArgumentException.php":"e013642b820249a08a5224e46895ac30","src\/Exception\/DiscoveryFailedException.php":"0d8793e6ee2fd74cb8e3d176681d47d2","src\/Client.php":"3c2077d6bed13601c23d9364dbe31157","src\/ResultPager.php":"356cd1f6d60849cdee38a869c6c64534"}}

.stubs/Http/Promise/Promise.phpstub

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface Promise
4343
*
4444
* @return Promise<T> a new resolved promise with value of the executed callback (onFulfilled / onRejected)
4545
*/
46-
public function then(callable $onFulfilled = null, callable $onRejected = null);
46+
public function then(?callable $onFulfilled = null, ?callable $onRejected = null);
4747

4848
/**
4949
* Returns the state of the promise, one of PENDING, FULFILLED or REJECTED.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2016 Antoine Kirk <[email protected]>
4-
Copyright (c) 2014-2023 Graham Campbell <[email protected]>
4+
Copyright (c) 2014-2025 Graham Campbell <[email protected]>
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,20 @@ Check out the [change log](CHANGELOG.md), [releases](https://github.com/DigitalO
1717

1818
## Installation
1919

20-
This version supports [PHP](https://php.net) 7.4-8.3. To get started, simply require the project using [Composer](https://getcomposer.org). You will also need to install packages that "provide" [`psr/http-client-implementation`](https://packagist.org/providers/psr/http-client-implementation) and [`psr/http-factory-implementation`](https://packagist.org/providers/psr/http-factory-implementation).
20+
This version supports [PHP](https://php.net) 8.1-8.4. To get started, simply require the project using [Composer](https://getcomposer.org). You will also need to install packages that "provide" [`psr/http-client-implementation`](https://packagist.org/providers/psr/http-client-implementation) and [`psr/http-factory-implementation`](https://packagist.org/providers/psr/http-factory-implementation).
2121

2222
### Standard Installation
2323

2424
```bash
25-
$ composer require "toin0u/digitalocean-v2:^4.9" \
26-
"guzzlehttp/guzzle:^7.8" "http-interop/http-factory-guzzle:^1.2"
25+
$ composer require "toin0u/digitalocean-v2:^5.0" "guzzlehttp/guzzle:^7.9.2"
2726
```
2827

2928
### Framework Integration
3029

3130
#### Laravel:
3231

3332
```bash
34-
$ composer require "graham-campbell/digitalocean:^10.3"
33+
$ composer require "graham-campbell/digitalocean:^11.0"
3534
```
3635

3736
We are decoupled from any HTTP messaging client by using [PSR-7](https://www.php-fig.org/psr/psr-7/), [PSR-17](https://www.php-fig.org/psr/psr-17/), [PSR-18](https://www.php-fig.org/psr/psr-18/), and [HTTPlug](https://httplug.io/). You can visit [HTTPlug for library users](https://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages. The framework integration [graham-campbell/gitlab](https://github.com/GrahamCampbell/Laravel-GitLab) is by [Graham Campbell](https://github.com/GrahamCampbell) and [dunglas/digital-ocean-bundle](https://github.com/dunglas/DunglasDigitalOceanBundle) is by [Kévin Dunglas](https://github.com/dunglas).

composer.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,16 @@
2323
"require": {
2424
"php": "^7.4.15 || ^8.0.2",
2525
"ext-json": "*",
26-
"php-http/client-common": "^2.7.1",
27-
"php-http/discovery": "^1.19.2",
28-
"php-http/httplug": "^2.4",
26+
"php-http/client-common": "^2.7.2",
27+
"php-http/discovery": "^1.20.0",
28+
"php-http/httplug": "^2.4.1",
2929
"psr/http-client-implementation": "^1.0",
3030
"psr/http-factory-implementation": "^1.0",
31-
"psr/http-message": "^1.1 || ^2.0",
32-
"symfony/polyfill-php80": "^1.26"
31+
"psr/http-message": "^1.1 || ^2.0"
3332
},
3433
"require-dev": {
3534
"bamarni/composer-bin-plugin": "^1.8.2",
36-
"guzzlehttp/guzzle": "^7.8",
37-
"http-interop/http-factory-guzzle": "^1.2"
35+
"guzzlehttp/guzzle": "^7.9.2"
3836
},
3937
"autoload": {
4038
"psr-4": {

src/Api/AbstractApi.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ abstract class AbstractApi
3939
*
4040
* @var Client
4141
*/
42-
private $client;
42+
private Client $client;
4343

4444
/**
4545
* The per page parameter.
4646
*
4747
* @var int|null
4848
*/
49-
private $perPage;
49+
private ?int $perPage;
5050

5151
/**
5252
* The page parameter.
5353
*
5454
* @var int|null
5555
*/
56-
private $page;
56+
private ?int $page;
5757

5858
/**
5959
* Create a new API instance.

src/Api/Account.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Account extends AbstractApi
2828
*
2929
* @return AccountEntity
3030
*/
31-
public function getUserInformation()
31+
public function getUserInformation(): AccountEntity
3232
{
3333
$account = $this->get('account');
3434

src/Api/Action.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Action extends AbstractApi
2828
*
2929
* @return ActionEntity[]
3030
*/
31-
public function getAll()
31+
public function getAll(): array
3232
{
3333
$actions = $this->get('actions');
3434

@@ -44,7 +44,7 @@ public function getAll()
4444
*
4545
* @return ActionEntity
4646
*/
47-
public function getById(int $id)
47+
public function getById(int $id): ActionEntity
4848
{
4949
$action = $this->get(\sprintf('actions/%d', $id));
5050

src/Api/App.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class App extends AbstractApi
3333
*
3434
* @return AppEntity[]
3535
*/
36-
public function getAll()
36+
public function getAll(): array
3737
{
3838
$apps = $this->get('apps');
3939

@@ -49,7 +49,7 @@ public function getAll()
4949
*
5050
* @return AppEntity
5151
*/
52-
public function getByID(string $appID)
52+
public function getByID(string $appID): AppEntity
5353
{
5454
$app = $this->get(\sprintf('apps/%s', $appID));
5555

@@ -63,7 +63,7 @@ public function getByID(string $appID)
6363
*
6464
* @return AppEntity
6565
*/
66-
public function create(array $spec)
66+
public function create(array $spec): AppEntity
6767
{
6868
$app = $this->post('apps', [
6969
'spec' => $spec,
@@ -80,7 +80,7 @@ public function create(array $spec)
8080
*
8181
* @return AppEntity
8282
*/
83-
public function update(string $appID, array $spec)
83+
public function update(string $appID, array $spec): AppEntity
8484
{
8585
$result = $this->put(\sprintf('apps/%s', $appID), [
8686
'spec' => $spec,
@@ -108,7 +108,7 @@ public function remove(string $appID): void
108108
*
109109
* @return AppDeploymentEntity[]
110110
*/
111-
public function getAppDeployments(string $appID)
111+
public function getAppDeployments(string $appID): array
112112
{
113113
$deployments = $this->get(\sprintf('apps/%s/deployments', $appID));
114114

@@ -124,7 +124,7 @@ public function getAppDeployments(string $appID)
124124
*
125125
* @return AppDeploymentEntity
126126
*/
127-
public function getAppDeployment(string $appID, string $deploymentID)
127+
public function getAppDeployment(string $appID, string $deploymentID): AppDeploymentEntity
128128
{
129129
$deployment = $this->get(\sprintf('apps/%s/deployments/%s', $appID, $deploymentID));
130130

@@ -139,7 +139,7 @@ public function getAppDeployment(string $appID, string $deploymentID)
139139
*
140140
* @return AppDeploymentEntity
141141
*/
142-
public function createAppDeployment(string $appID, $force_build = true)
142+
public function createAppDeployment(string $appID, bool $force_build = true): AppDeploymentEntity
143143
{
144144
$deployment = $this->post(\sprintf('apps/%s/deployments', $appID), [
145145
'force_build' => $force_build,
@@ -156,7 +156,7 @@ public function createAppDeployment(string $appID, $force_build = true)
156156
*
157157
* @return AppDeploymentEntity
158158
*/
159-
public function cancelAppDeployment(string $appID, string $deploymentID)
159+
public function cancelAppDeployment(string $appID, string $deploymentID): AppDeploymentEntity
160160
{
161161
$deployment = $this->post(\sprintf('apps/%s/deployments/%s/cancel', $appID, $deploymentID));
162162

@@ -172,7 +172,7 @@ public function cancelAppDeployment(string $appID, string $deploymentID)
172172
*
173173
* @return AppDeploymentLogEntity
174174
*/
175-
public function getDeploymentLogs(string $appID, string $deploymentID, string $componentName)
175+
public function getDeploymentLogs(string $appID, string $deploymentID, string $componentName): AppDeploymentLogEntity
176176
{
177177
$logs = $this->get(\sprintf('apps/%s/deployments/%s/components/%s/logs', $appID, $deploymentID, $componentName));
178178

@@ -187,7 +187,7 @@ public function getDeploymentLogs(string $appID, string $deploymentID, string $c
187187
*
188188
* @return AppDeploymentLogEntity
189189
*/
190-
public function getAggregateDeploymentLogs(string $appID, string $deploymentID)
190+
public function getAggregateDeploymentLogs(string $appID, string $deploymentID): AppDeploymentLogEntity
191191
{
192192
$logs = $this->get(\sprintf('apps/%s/deployments/%s/logs', $appID, $deploymentID));
193193

@@ -199,7 +199,7 @@ public function getAggregateDeploymentLogs(string $appID, string $deploymentID)
199199
*
200200
* @return AppRegionEntity[]
201201
*/
202-
public function getRegions()
202+
public function getRegions(): array
203203
{
204204
$regions = $this->get('apps/regions');
205205

@@ -213,7 +213,7 @@ public function getRegions()
213213
*
214214
* @return AppTierEntity[]
215215
*/
216-
public function getTiers()
216+
public function getTiers(): array
217217
{
218218
$tiers = $this->get('apps/tiers');
219219

@@ -229,7 +229,7 @@ public function getTiers()
229229
*
230230
* @return AppTierEntity
231231
*/
232-
public function getTierBySlug(string $slug)
232+
public function getTierBySlug(string $slug): AppTierEntity
233233
{
234234
$tier = $this->get(\sprintf('apps/tiers/%s', $slug));
235235

@@ -241,7 +241,7 @@ public function getTierBySlug(string $slug)
241241
*
242242
* @return AppInstanceSizeEntity[]
243243
*/
244-
public function getInstanceSizes()
244+
public function getInstanceSizes(): array
245245
{
246246
$instance_sizes = $this->get('apps/tiers/instance_sizes');
247247

@@ -257,7 +257,7 @@ public function getInstanceSizes()
257257
*
258258
* @return AppInstanceSizeEntity
259259
*/
260-
public function getInstanceSizeBySlug(string $slug)
260+
public function getInstanceSizeBySlug(string $slug): AppInstanceSizeEntity
261261
{
262262
$instance_size = $this->get(\sprintf('apps/tiers/instance_sizes/%s', $slug));
263263

0 commit comments

Comments
 (0)