Model   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
dl 0
loc 32
eloc 10
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A test() 0 3 1
A __get() 0 3 1
A __isset() 0 3 1
A __construct() 0 4 1
A getOtherProperty() 0 3 1
1
<?php
2
3
namespace MathieuTu\Exporter\Tests\Fixtures;
4
5
use MathieuTu\Exporter\Exporter;
6
7
class Model
8
{
9
    use Exporter;
10
11
    private $attributes;
12
13
    private $otherProperty;
14
15
    public function __construct(array $attributes, $otherProperty = null)
16
    {
17
        $this->attributes = $attributes;
18
        $this->otherProperty = $otherProperty;
19
    }
20
21
    public function test($value): string
22
    {
23
        return 'test' . $value;
24
    }
25
26
    public function __get($name)
27
    {
28
        return $this->attributes[$name];
29
    }
30
31
    public function __isset($name): bool
32
    {
33
        return isset($this->attributes[$name]);
34
    }
35
36
    public function getOtherProperty()
37
    {
38
        return $this->otherProperty;
39
    }
40
}
41