Story   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 26
c 0
b 0
f 0
wmc 1
lcom 0
cbo 4
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFilters() 0 18 1
1
<?php
2
3
namespace Chadicus\Marvel\Api\Entities;
4
5
/**
6
 * Represents a Marvel API Story Entity
7
 *
8
 * @property-read integer $id The unique ID of the story resource.
9
 * @property-read string $title The story title.
10
 * @property-read string $description A short description of the story.
11
 * @property-read string $resourceURI The canonical URL identifier for this resource.
12
 * @property-read string $type The story type e.g. interior story, cover, text story.
13
 * @property-read DateTime $modified The date the resource was most recently modified.
14
 * @property-read Image $thumbnail The representative image for this story.
15
 * @property-read ResourceList $comics A resource list containing comics in which this story takes place.
16
 * @property-read ResourceList $series A resource list containing series in which this story appears.
17
 * @property-read ResourceList $events A resource list of the events in which this story appears.
18
 * @property-read ResourceList $characters A resource list of characters which appear in this story.
19
 * @property-read ResourceList $creators A resource list of creators who worked on this story.
20
 * @property-read Summary $originalissue A summary representation of the issue in which this story was originally
21
 *                                       published.
22
 */
23
class Story extends AbstractEntity
24
{
25
    /**
26
     * @see AbstractEntity::getFilters()
27
     *
28
     * @return array
29
     */
30
    final protected function getFilters() : array
31
    {
32
        return [
33
            'id' => [['int', true]],
34
            'title' => [['string', true, 0]],
35
            'description' => [['string', true, 0]],
36
            'resourceURI' => [['string', true, 0]],
37
            'type' => [['string', true, 0]],
38
            'modified' => [['date']],
39
            'thumbnail' => ['default' => new Image(), ['image']],
40
            'comics' => ['default' => new ResourceList(), ['resource-list']],
41
            'series' => ['default' => new ResourceList(), ['resource-list']],
42
            'events' => ['default' => new ResourceList(), ['resource-list']],
43
            'characters' => ['default' => new ResourceList(), ['resource-list']],
44
            'creators' => ['default' => new ResourceList(), ['resource-list']],
45
            'originalissue' => ['default' => new Summary(), ['summary']],
46
        ];
47
    }
48
}
49