Test Failed
Push — master ( 4486b3...16bdc1 )
by SignpostMarv
02:20
created

DateCreatedModified::GetDateModified()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
* @author SignpostMarv
4
*/
5
declare(strict_types=1);
6
7
namespace SignpostMarv\DaftObject\SchemaOrg\DaftObjectTraits;
8
9
use SignpostMarv\DaftObject\SchemaOrg\DataTypes\Date;
10
use SignpostMarv\DaftObject\SchemaOrg\DataTypes\DateTime;
11
12
trait DateCreatedModified
13
{
14
    use DaftObjectTrait;
15
16
    /**
17
    * @return array<int, Date|DateTime>
18
    */
19
    public function GetDateCreated() : array
20
    {
21
        /**
22
        * @var array<int, Date|DateTime>
23
        */
24
        $out = $this->ExpectRetrievedValueIsArray('dateCreated');
0 ignored issues
show
Bug introduced by
It seems like ExpectRetrievedValueIsArray() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
        /** @scrutinizer ignore-call */ 
25
        $out = $this->ExpectRetrievedValueIsArray('dateCreated');
Loading history...
25
26
        return $out;
27
    }
28
29
    /**
30
    * @param array<int, Date|DateTime> $value
31
    */
32
    public function SetDateCreated(array $value) : void
33
    {
34
        $this->NudgePropertyValue('dateCreated', $value);
35
    }
36
37
    /**
38
    * @return array<int, Date|DateTime>
39
    */
40
    public function GetDateModified() : array
41
    {
42
        /**
43
        * @var array<int, Date|DateTime>
44
        */
45
        $out = $this->ExpectRetrievedValueIsArray('dateModified');
46
47
        return $out;
48
    }
49
50
    /**
51
    * @param array<int, Date|DateTime> $value
52
    */
53
    public function SetDateModified(array $value) : void
54
    {
55
        $this->NudgePropertyValue('dateModified', $value);
56
    }
57
}
58