8000 Add return types · geocoder-php/Geocoder@4f0221f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f0221f

Browse files
committed
Add return types
1 parent 02af304 commit 4f0221f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Plugin/Promise/GeocoderFulfilledPromise.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(Collection $collection)
3636
/**
3737
* {@inheritdoc}
3838
*/
39-
public function then(callable $onFulfilled = null, callable $onRejected = null)
39+
public function then(callable $onFulfilled = null, callable $onRejected = null): Promise
4040
{
4141
if (null === $onFulfilled) {
4242
return $this;
@@ -52,13 +52,15 @@ public function then(callable $onFulfilled = null, callable $onRejected = null)
5252
/**
5353
* {@inheritdoc}
5454
*/
55-
public function getState()
55+
public function getState(): string
5656
{
5757
return Promise::FULFILLED;
5858
}
5959

6060
/**
6161
* {@inheritdoc}
62+
*
63+
* @return mixed
6264
*/
6365
public function wait($unwrap = true)
6466
{

src/Plugin/Promise/GeocoderRejectedPromise.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(Exception $exception)
3535
/**
3636
* {@inheritdoc}
3737
*/
38-
public function then(callable $onFulfilled = null, callable $onRejected = null)
38+
public function then(callable $onFulfilled = null, callable $onRejected = null): Promise
3939
{
4040
if (null === $onRejected) {
4141
return $this;
@@ -51,13 +51,15 @@ public function then(callable $onFulfilled = null, callable $onRejected = null)
5151
/**
5252
* {@inheritdoc}
5353
*/
54-
public function getState()
54+
public function getState(): 6F63 string
5555
{
5656
return Promise::REJECTED;
5757
}
5858

5959
/**
6060
* {@inheritdoc}
61+
*
62+
* @return mixed
6163
*/
6264
public function wait($unwrap = true)
6365
{

0 commit comments

Comments
 (0)
0