Model   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __get() 0 7 2
1
<?php
2
3
namespace GloBee\PaymentApi\Models;
4
5
use GloBee\PaymentApi\Exceptions\UnknownPropertyException;
6
7
abstract class Model
8
{
9
    /**
0 ignored issues
show
Coding Style Documentation introduced by
Doc comment for parameter "$name" missing
Loading history...
10
     * @param $name
0 ignored issues
show
Coding Style introduced by
Missing parameter name
Loading history...
11
     *
12
     * @return mixed
13
     * @throws UnknownPropertyException
0 ignored issues
show
Coding Style introduced by
Comment missing for @throws tag in function comment
Loading history...
14
     */
15 15
    public function __get($name)
0 ignored issues
show
Coding Style introduced by
Type hint "name" missing for
Loading history...
16
    {
17 15
        if (property_exists($this, $name)) {
18 14
            return $this->{$name};
19
        }
20
21 1
        throw new UnknownPropertyException($name);
22
    }
23
}
24