Conditions | 3 |
Paths | 4 |
Total Lines | 24 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function all($spaceKey = "", array $options = []) |
||
32 | { |
||
33 | |||
34 | if (!empty($spaceKey)) { |
||
35 | $options = $this->mergeQueryOptions($options, [ |
||
36 | "query" => [ |
||
37 | "spaceKey" => $spaceKey |
||
38 | ] |
||
39 | ]); |
||
40 | } |
||
41 | |||
42 | $all = $this->get('content', $options); |
||
43 | $contentCollection = $this->deserialize( |
||
44 | $all, |
||
45 | ContentCollection::class |
||
46 | ); |
||
47 | |||
48 | if(!$contentCollection instanceof ContentCollection){ |
||
49 | return null; |
||
50 | } |
||
51 | |||
52 | return $contentCollection; |
||
53 | |||
54 | } |
||
55 | |||
78 |