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

Weight::GetWeight()   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\Intangible\StructuredValue\QuantitativeValue;
10
11
trait Weight
12
{
13
    use DaftObjectTrait;
14
15
    /**
16
    * @return array<int, QuantitativeValue>
17
    */
18
    public function GetWeight() : array
19
    {
20
        /**
21
        * @var array<int, QuantitativeValue>
22
        */
23
        $out = $this->ExpectRetrievedValueIsArray('weight');
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

23
        /** @scrutinizer ignore-call */ 
24
        $out = $this->ExpectRetrievedValueIsArray('weight');
Loading history...
24
25
        return $out;
26
    }
27
28
    /**
29
    * @param array<int, QuantitativeValue> $value
30
    */
31
    public function SetWeight(array $value) : void
32
    {
33
        $this->NudgePropertyValue('weight', $value);
34
    }
35
}
36