Completed
Push — master ( d9eccd...24b0e8 )
by Toby
201:07 queued 136:01
created

EmptyCollection::fields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of JSON-API.
5
 *
6
 * (c) Toby Zerner <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tobscure\JsonApi;
13
14
class EmptyCollection implements ElementInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function getResources()
20
    {
21
        return [];
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function toArray()
28
    {
29
        return $this->toIdentifier();
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function toIdentifier()
36
    {
37
        return [];
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function with($relationships)
44
    {
45
        return $this;
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function fields($fields)
52
    {
53
        return $this;
54
    }
55
}
56