File tree 3 files changed +5
-7
lines changed
3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 5
5
namespace Sysix \LexOffice \Clients \Traits ;
6
6
7
7
use Psr \Http \Message \ResponseInterface ;
8
- use stdClass ;
9
8
use Sysix \LexOffice \Clients \File ;
10
9
use Sysix \LexOffice \Utils ;
11
10
Original file line number Diff line number Diff line change 5
5
namespace Sysix \LexOffice ;
6
6
7
7
use Psr \Http \Message \ResponseInterface ;
8
- use stdClass ;
9
8
10
9
abstract class PaginationClient extends BaseClient
11
10
{
@@ -58,7 +57,7 @@ public function getAll(): ResponseInterface
58
57
$ result === null || !is_object ($ result ) ||
59
58
!property_exists ($ result , 'totalPages ' ) || $ result ->totalPages == 1 ||
60
59
!property_exists ($ result , 'content ' )
61
- ) {
60
+ ) {
62
61
return $ response ;
63
62
}
64
63
@@ -73,8 +72,8 @@ public function getAll(): ResponseInterface
73
72
$ resultPage = Utils::getJsonFromResponse ($ responsePage );
74
73
75
74
if (
76
- $ resultPage === null ||
77
- !is_object ($ resultPage ) ||
75
+ $ resultPage === null ||
76
+ !is_object ($ resultPage ) ||
78
77
!property_exists ($ resultPage , 'content ' ) ||
79
78
!is_array ($ resultPage ->content ) ||
80
79
!is_array ($ result ->content )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public function testGetJsonFromResponseWithValidHeader(): void
36
36
], (string ) json_encode ([
37
37
'test ' => true
38
38
]));
39
-
39
+
40
40
/** @var object $json */
41
41
$ json = Utils::getJsonFromResponse ($ response );
42
42
@@ -63,7 +63,7 @@ public function testGetJsonFromResponseWithValidCharsetHeader(): void
63
63
64
64
public function testJsonDecodeValid (): void
65
65
{
66
-
66
+
67
67
/** @var object $json */
68
68
$ json = Utils::jsonDecode ('{"content":"test","object":{"content":"test2"}} ' );
69
69
You can’t perform that action at this time.
0 commit comments