Completed
Push — master ( ac571e...b4d025 )
by Peter
02:07
created

SourceMagic   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 4
c 4
b 0
f 0
lcom 0
cbo 0
dl 0
loc 27
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __get() 0 4 1
A _get() 0 4 1
A __call() 0 4 1
A _call() 0 4 1
method() 0 1 ?
property() 0 1 ?
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL, Commercial` license[s].
5
 *
6
 * @package maslosoft/zamm
7
 * @license AGPL, Commercial
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 *
11
 */
12
13
namespace Maslosoft\Zamm\Traits;
14
15
use Maslosoft\Zamm\Interfaces\SourceAccessorInterface;
16
17
/**
18
 * GetSet
19
 * @see SourceAccessorInterface
20
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
21
 */
22
trait SourceMagic
23
{
24
25
	public function __get($name)
26
	{
27
		return $this->_get($name);
28
	}
29
30
	protected function _get($name)
31
	{
32
		return $this->property($name);
33
	}
34
35
	public function __call($name, $arguments)
36
	{
37
		return $this->_call($name);
38
	}
39
40
	public function _call($name)
41
	{
42
		return $this->method($name);
43
	}
44
45
	abstract public function method($name);
46
47
	abstract public function property($name);
48
}
49