Capsuleer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPortrait() 0 13 2
A setPrivate() 0 4 1
1
<?php
2
namespace Perry\Representation\Eve\v2;
3
4
use \Perry\Representation\Reference as Reference;
5
use \Perry\Representation\Uri as Uri;
6
use \Perry\Representation\Base as Base;
7
8
class Capsuleer extends Base
9
{
10
    public $portrait;
11
12
    public $private;
13
14
    // by Warringer\Types\Dict
15
    public function setPortrait($portrait)
16
    {
17
        // by Warringer\Types\Dict
18
        $converters = [];
19
        $converters['pattern'] = function ($value) { return $value; };
20
21
        $func = function ($value) use($converters) {
22
            $return = new \ArrayObject($value, \ArrayObject::ARRAY_AS_PROPS);
23
            $return['pattern'] = isset($value->{'pattern'}) ? $converters['pattern']($value->{'pattern'}) : null;
24
            return $return;
25
        };
26
        $this->portrait = $func($portrait);
27
    }
28
29
    // by Warringer\Types\Reference
30
    public function setPrivate($private)
31
    {
32
        $this->private = new Reference($private);
33
    }
34
35
}
36