Total Complexity | 9 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class Model_Base { |
||
12 | |||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $_extra_args; |
||
17 | |||
18 | /** |
||
19 | * Model_Base constructor. |
||
20 | * |
||
21 | * @param array $args |
||
22 | */ |
||
23 | 10 | public function __construct( $args = array() ) { |
|
24 | |||
25 | 10 | $args = wp_parse_args( $args ); |
|
26 | |||
27 | 10 | foreach ( $args as $key => $value ) { |
|
28 | |||
29 | 9 | $this->set( $key, $value ); |
|
30 | |||
31 | } |
||
32 | |||
33 | 10 | } |
|
34 | |||
35 | /** |
||
36 | * @param string $property |
||
37 | * @param mixed $value |
||
38 | */ |
||
39 | 3 | public function set( $property, $value ) { |
|
50 | |||
51 | 3 | } |
|
52 | |||
53 | /** |
||
54 | * @param string $method_name |
||
55 | * @param array $args |
||
56 | * |
||
57 | * @return mixed|null |
||
58 | */ |
||
59 | 16 | public function __call( $method_name, $args ) { |
|
81 |