Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadamodassir authored Nov 10, 2024
1 parent 7f936ce commit 5bef71f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ or add it by hand to your `composer.json` file.
## Getting Started

```php
use Modassir\Promise\Promise;

(new Promise(function($resolve, $reject) {
$resolve('success');
$reject('An error accurred.');
Expand Down Expand Up @@ -61,6 +63,8 @@ or add it by hand to your `composer.json` file.
```

```php
use Modassir\Promise\Promise;

$promise = new Promise(function($resolve, $reject) {
$resolve('success');
$reject('An error accurred.');
Expand All @@ -74,7 +78,6 @@ $promise->then(function($res) {
// echo: strtoupper('Hello Worlds!');
});


$promise = new Promise(function($resolve, $reject) {
$resolve('success');
$reject('An error accurred.');
Expand Down

0 comments on commit 5bef71f

Please sign in to comment.