Date::getFilters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
namespace Chadicus\Marvel\Api\Entities;
3
4
/**
5
 * Represents a Date entity type within the Marvel API.
6
 *
7
 * @property-read string $type A description of the date (e.g. onsale date, FOC date).
8
 * @property-read \DateTime $date The date.
9
 */
10 View Code Duplication
class Date extends AbstractEntity
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    /**
13
     * @see AbstractEntity::getFilters()
14
     *
15
     * @return array
16
     */
17
    final protected function getFilters() : array
18
    {
19
        return [
20
            'type' => ['default' => null, ['string', true]],
21
            'date' => ['default' => null, ['date', true]],
22
        ];
23
    }
24
}
25