Skip to content

Commit 7938338

Browse files
committed
Merge pull request #5 from trowski/revert
Revert to Awaitable
2 parents 06fd353 + e716aab commit 7938338

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"autoload": {
1010
"psr-4": {
11-
"Interop\\Async\\Awaitable\\": "src/"
11+
"Interop\\Async\\": "src/"
1212
}
1313
}
1414
}

src/Awaitable.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Interop\Async;
4+
5+
/**
6+
* Awaitable object representing the future value of an asynchronous operation.
7+
*/
8+
interface Awaitable
9+
{
10+
/**
11+
* Registers a callback to be invoked when the awaitable is resolved.
12+
*
13+
* @param callable(\Throwable|\Exception|null $exception, mixed $result) $onResolved
14+
*
15+
* @return void
16+
*/
17+
public function when(callable $onResolved);
18+
}

src/Whenable.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)