AbstractEntity   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __get() 0 6 2
1
<?php declare(strict_types=1);
2
3
namespace OfxParser\Entities;
4
5
abstract class AbstractEntity
6
{
7
    /**
8
     * Allow functions to be called as properties
9
     * to unify the API
10
     *
11
     * @param string $name
12
     * @return mixed|bool
13
     */
14
    public function __get(string $name)
15
    {
16
        if (method_exists($this, lcfirst($name))) {
17
            return $this->{$name}();
18
        }
19
        return false;
20
    }
21
}
22