Composer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 27
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A GetComposer() 0 12 1
A SetComposer() 0 3 1
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\Organization;
10
use SignpostMarv\DaftObject\SchemaOrg\Person;
11
use SignpostMarv\DaftObject\SchemaOrg\TypeUtilities;
12
13
trait Composer
14
{
15
    use DaftObjectTrait;
16
17
    /**
18
    * @return array<int, Organization|Person>
19
    */
20 151
    public function GetComposer() : array
21
    {
22
        /**
23
        * @var array<int, Organization|Person>
24
        */
25 151
        $out = TypeUtilities::ExpectRetrievedValueIsArray(
26 151
            'composer',
27 151
            $this->RetrievePropertyValueFromData('composer'),
28 151
            static::class
29
        );
30
31 151
        return $out;
32
    }
33
34
    /**
35
    * @param array<int, Organization|Person> $value
36
    */
37 3
    public function SetComposer(array $value) : void
38
    {
39 3
        $this->NudgePropertyValue('composer', $value);
40 3
    }
41
}
42