Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
VennDev authored Jul 11, 2023
1 parent c353567 commit f2dbbc9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/vennv/vapm/InternetRequestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ final class InternetRequestResult implements InternetRequestResultInterface

private int $code;

/**
* @param string[][] $headers
* @param string $body
* @param int $code
*/
public function __construct(array $headers, string $body, int $code)
{
$this->headers = $headers;
Expand Down
12 changes: 9 additions & 3 deletions src/vennv/vapm/Promise.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,18 @@ public function useCallbacks(): void
}
}

call_user_func($this->callbackFinally);
if (is_callable($this->callbackFinally))
{
call_user_func($this->callbackFinally);
}
}
elseif ($this->isRejected())
{
call_user_func($this->callbackReject, $result);
call_user_func($this->callbackFinally);
if (is_callable($this->callbackReject) && is_callable($this->callbackFinally))
{
call_user_func($this->callbackReject, $result);
call_user_func($this->callbackFinally);
}
}
}

Expand Down

0 comments on commit f2dbbc9

Please sign in to comment.