Total Complexity | 7 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | class ODataExpandedResult |
||
17 | { |
||
18 | /** |
||
19 | * Term. |
||
20 | * |
||
21 | * @var ODataContainerBase|null |
||
22 | */ |
||
23 | private $data; |
||
24 | |||
25 | /** |
||
26 | * ODataExpandedResult constructor. |
||
27 | * |
||
28 | * @param ODataEntry|null $entry |
||
29 | * @param ODataFeed|null $feed |
||
30 | */ |
||
31 | public function __construct(ODataContainerBase $data = null) |
||
32 | { |
||
33 | $this->data = $data; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return ODataEntry|null |
||
38 | */ |
||
39 | public function getEntry(): ?ODataEntry |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param ODataEntry|null $entry |
||
46 | * @return ODataExpandedResult |
||
47 | */ |
||
48 | public function setEntry(?ODataEntry $entry): ODataExpandedResult |
||
49 | { |
||
50 | $this->entry = $entry; |
||
|
|||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return ODataFeed|null |
||
56 | */ |
||
57 | public function getFeed(): ?ODataFeed |
||
58 | { |
||
59 | return $this->data instanceof ODataFeed ? $this->data : null; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param ODataFeed|null $feed |
||
64 | * @return ODataExpandedResult |
||
65 | */ |
||
66 | public function setFeed(?ODataFeed $feed): ODataExpandedResult |
||
70 | } |
||
71 | } |
||
72 |