Completed
Push — master ( 882cbc...a9ee6a )
by
unknown
15:23
created

AttributionBasedCollectionDocument::getMeta()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace hiapi\jsonApi;
5
6
use WoohooLabs\Yin\JsonApi\Schema\Document\AbstractCollectionDocument;
7
use WoohooLabs\Yin\JsonApi\Schema\JsonApiObject;
8
use WoohooLabs\Yin\JsonApi\Schema\Link\DocumentLinks;
9
10
/**
11
 * Allows easy creation of JSON:API collection documents class.
12
 * `attributionClass` can be provided or it will be found automatically
13
 * by class name in the same directory, see `findAttributionClass`.
14
 *
15
 * @author Andrii Vasyliev <[email protected]>
16
 */
17
class AttributionBasedCollectionDocument extends AbstractCollectionDocument
18
{
19
    public function __construct(AttributionBasedResourceFinder $resourceFinder)
20
    {
21
        parent::__construct($resourceFinder->getResource(static::class));
22
    }
23
24
    public function getJsonApi(): ?JsonApiObject
25
    {
26
        return new JsonApiObject('1.1');
27
    }
28
29
    public function getMeta(): array
30
    {
31
        return [];
32
    }
33
34
    public function getLinks(): ?DocumentLinks
35
    {
36
        return null;
37
    }
38
}
39