-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored endpoints, api and test cases for better usability/stability
- Tests are now mockery free. - Add more tests for Laravel container
- Loading branch information
Showing
31 changed files
with
1,152 additions
and
583 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace WrkFlow\ApiSdkBuilder\Contracts; | ||
|
||
use Closure; | ||
use Psr\Http\Message\RequestInterface; | ||
use Psr\Http\Message\ResponseInterface; | ||
use Psr\Http\Message\StreamInterface; | ||
use WrkFlow\ApiSdkBuilder\Interfaces\ApiInterface; | ||
use WrkFlow\ApiSdkBuilder\Interfaces\HeadersInterface; | ||
use WrkFlow\ApiSdkBuilder\Interfaces\OptionsInterface; | ||
use WrkFlow\ApiSdkBuilder\Responses\AbstractResponse; | ||
|
||
/** | ||
* @phpstan-import-type IgnoreLoggersOnExceptionClosure from ApiInterface | ||
*/ | ||
interface SendRequestActionContract | ||
{ | ||
/** | ||
* @template TResponse of AbstractResponse | ||
* | ||
* @param array<int|string,HeadersInterface|string|string[]> $headers | ||
* @param class-string<TResponse> $responseClass | ||
* @param int|null $expectedResponseStatusCode Will raise and failed | ||
* exception if response | ||
* status code is different | ||
* @param IgnoreLoggersOnExceptionClosure $shouldIgnoreLoggersOnError | ||
* @return TResponse | ||
*/ | ||
public function execute( | ||
ApiInterface $api, | ||
RequestInterface $request, | ||
string $responseClass, | ||
OptionsInterface|StreamInterface|string|null $body = null, | ||
array $headers = [], | ||
?int $expectedResponseStatusCode = null, | ||
?ResponseInterface $fakedResponse = null, | ||
Closure $shouldIgnoreLoggersOnError = null | ||
): AbstractResponse; | ||
} |
Oops, something went wrong.