update 2024-01-25 13:19:06
This commit is contained in:
parent
67794f035c
commit
ea1266fb92
@ -36,7 +36,7 @@ final class Response
|
|||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
* @throws \DomainException
|
* @throws \DomainException
|
||||||
**/
|
**/
|
||||||
public function get(JoomlaResponse $response, int $expectedCode = 200, $default = null)
|
public function get($response, int $expectedCode = 200, $default = null)
|
||||||
{
|
{
|
||||||
// Validate the response code.
|
// Validate the response code.
|
||||||
if ($response->code != $expectedCode)
|
if ($response->code != $expectedCode)
|
||||||
@ -60,7 +60,7 @@ final class Response
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
**/
|
**/
|
||||||
protected function getBody(JoomlaResponse $response, $default = null)
|
protected function getBody($response, $default = null)
|
||||||
{
|
{
|
||||||
$body = $response->body ?? null;
|
$body = $response->body ?? null;
|
||||||
// check that we have a body
|
// check that we have a body
|
||||||
@ -95,7 +95,7 @@ final class Response
|
|||||||
* @return string
|
* @return string
|
||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
**/
|
**/
|
||||||
protected function error(JoomlaResponse $response): string
|
protected function error($response): string
|
||||||
{
|
{
|
||||||
$body = $response->body ?? null;
|
$body = $response->body ?? null;
|
||||||
// do we have a json string
|
// do we have a json string
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
* @throws \DomainException
|
* @throws \DomainException
|
||||||
**/
|
**/
|
||||||
public function get(JoomlaResponse $response, int $expectedCode = 200, $default = null)
|
public function get($response, int $expectedCode = 200, $default = null)
|
||||||
{
|
{
|
||||||
// Validate the response code.
|
// Validate the response code.
|
||||||
if ($response->code != $expectedCode)
|
if ($response->code != $expectedCode)
|
||||||
@ -34,7 +34,7 @@
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
**/
|
**/
|
||||||
protected function getBody(JoomlaResponse $response, $default = null)
|
protected function getBody($response, $default = null)
|
||||||
{
|
{
|
||||||
$body = $response->body ?? null;
|
$body = $response->body ?? null;
|
||||||
// check that we have a body
|
// check that we have a body
|
||||||
@ -69,7 +69,7 @@
|
|||||||
* @return string
|
* @return string
|
||||||
* @since 2.0.1
|
* @since 2.0.1
|
||||||
**/
|
**/
|
||||||
protected function error(JoomlaResponse $response): string
|
protected function error($response): string
|
||||||
{
|
{
|
||||||
$body = $response->body ?? null;
|
$body = $response->body ?? null;
|
||||||
// do we have a json string
|
// do we have a json string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user