Skip to content

Commit aabd6cc

Browse files
Added more types
1 parent dd9b08d commit aabd6cc

Some content is hidden

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

41 files changed

+407
-407
lines changed

src/Api/AbstractApi.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function getAsResponse(string $uri, array $params = [], array $headers
8080
*
8181
* @return mixed
8282
*/
83-
protected function get(string $uri, array $params = [], array $headers = [])
83+
protected function get(string $uri, array $params = [], array $headers = []): mixed
8484
{
8585
$response = $this->getAsResponse($uri, $params, $headers);
8686

@@ -95,7 +95,7 @@ protected function get(string $uri, array $params = [], array $headers = [])
9595
*
9696
* @return mixed
9797
*/
98-
protected function post(string $uri, array $params = [], array $headers = [], array $files = [], array $uriParams = [])
98+
protected function post(string $uri, array $params = [], array $headers = [], array $files = [], array $uriParams = []): mixed
9999
{
100100
if (0 < \count($files)) {
101101
$builder = $this->createMultipartStreamBuilder($params, $files);
@@ -121,7 +121,7 @@ protected function post(string $uri, array $params = [], array $headers = [], ar
121121
*
122122
* @return mixed
123123
*/
124-
protected function put(string $uri, array $params = [], array $headers = [], array $files = [])
124+
protected function put(string $uri, array $params = [], array $headers = [], array $files = []): mixed
125125
{
126126
if (0 < \count($files)) {
127127
$builder = $this->createMultipartStreamBuilder($params, $files);
@@ -147,7 +147,7 @@ protected function put(string $uri, array $params = [], array $headers = [], arr
147147
*
148148
* @return mixed
149149
*/
150-
protected function patch(string $uri, array $params = [], array $headers = [], array $files = [])
150+
protected function patch(string $uri, array $params = [], array $headers = [], array $files = []): mixed
151151
{
152152
if (0 < \count($files)) {
153153
$builder = $this->createMultipartStreamBuilder($params, $files);
@@ -172,7 +172,7 @@ protected function patch(string $uri, array $params = [], array $headers = [], a
172172
*
173173
* @return mixed
174174
*/
175-
protected function putFile(string $uri, string $file, array $headers = [], array $uriParams = [])
175+
protected function putFile(string $uri, string $file, array $headers = [], array $uriParams = []): mixed
176176
{
177177
$resource = self::tryFopen($file, 'r');
178178
$body = $this->client->getStreamFactory()->createStreamFromResource($resource);
@@ -192,7 +192,7 @@ protected function putFile(string $uri, string $file, array $headers = [], array
192192
*
193193
* @return mixed
194194
*/
195-
protected function delete(string $uri, array $params = [], array $headers = [])
195+
protected function delete(string $uri, array $params = [], array $headers = []): mixed
196196
{
197197
$body = self::prepareJsonBody($params);
198198

src/Api/DeployKeys.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DeployKeys extends AbstractApi
1919
/**
2020
* @return mixed
2121
*/
22-
public function all(array $parameters = [])
22+
public function all(array $parameters = []): mixed
2323
{
2424
$resolver = $this->createOptionsResolver();
2525

src/Api/Deployments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Deployments extends AbstractApi
3030
*
3131
* @return mixed
3232
*/
33-
public function all(int|string $project_id, array $parameters = [])
33+
public function all(int|string $project_id, array $parameters = []): mixed
3434
{
3535
$resolver = $this->createOptionsResolver();
3636
$resolver->setDefined('order_by')
@@ -51,7 +51,7 @@ public function all(int|string $project_id, array $parameters = [])
5151
/**
5252
* @return mixed
5353
*/
54-
public function show(int|string $project_id, int $deployment_id)
54+
public function show(int|string $project_id, int $deployment_id): mixed
5555
{
5656
return $this->get($this->getProjectPath($project_id, 'deployments/'.$deployment_id));
5757
}

src/Api/Environments.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Environments extends AbstractApi
2121
/**
2222
* @return mixed
2323
*/
24-
public function all(int|string $project_id, array $parameters = [])
24+
public function all(int|string $project_id, array $parameters = []): mixed
2525
{
2626
$resolver = $this->createOptionsResolver();
2727
$resolver->setDefined('name')
@@ -45,7 +45,7 @@ public function all(int|string $project_id, array $parameters = [])
4545
*
4646
* @return mixed
4747
*/
48-
public function create(int|string $project_id, array $parameters = [])
48+
public function create(int|string $project_id, array $parameters = []): mixed
4949
{
5050
$resolver = new OptionsResolver();
5151
$resolver->setDefined('name')
@@ -62,23 +62,23 @@ public function create(int|string $project_id, array $parameters = [])
6262
/**
6363
* @return mixed
6464
*/
65-
public function remove(int|string $project_id, int $environment_id)
65+
public function remove(int|string $project_id, int $environment_id): mixed
6666
{
6767
return $this->delete($this->getProjectPath($project_id, 'environments/'.$environment_id));
6868
}
6969

7070
/**
7171
* @return mixed
7272
*/
73-
public function stop(int|string $project_id, int $environment_id)
73+
public function stop(int|string $project_id, int $environment_id): mixed
7474
{
7575
return $this->post($this->getProjectPath($project_id, 'environments/'.self::encodePath($environment_id).'/stop'));
7676
}
7777

7878
/**
7979
* @return mixed
8080
*/
81-
public function show(int|string $project_id, int $environment_id)
81+
public function show(int|string $project_id, int $environment_id): mixed
8282
{
8383
return $this->get($this->getProjectPath($project_id, 'environments/'.self::encodePath($environment_id)));
8484
}

src/Api/Events.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Events extends AbstractApi
3131
*
3232
* @return mixed
3333
*/
34-
public function all(array $parameters = [])
34+
public function all(array $parameters = []): mixed
3535
{
3636
$resolver = $this->createOptionsResolver();
3737
$datetimeNormalizer = function (Options $resolver, \DateTimeInterface $value): string {

0 commit comments

Comments
 (0)