Completed
Push — master ( 60fc22...165a83 )
by Peter
04:31
created

MatcherConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/**
4
 * This software package is licensed under AGPL, Commercial license.
5
 *
6
 * @package maslosoft/addendum
7
 * @licence AGPL, Commercial
8
 * @copyright Copyright (c) Piotr Masełkowski <[email protected]> (Meta container, further improvements, bugfixes)
9
 * @copyright Copyright (c) Maslosoft (Meta container, further improvements, bugfixes)
10
 * @copyright Copyright (c) Jan Suchal (Original version, builder, parser)
11
 * @link http://maslosoft.com/addendum/ - maslosoft addendum
12
 * @link https://code.google.com/p/addendum/ - original addendum project
13
 */
14
15
namespace Maslosoft\Addendum\Collections;
16
17
use Maslosoft\Addendum\Addendum;
18
use Maslosoft\Addendum\Exceptions\ConfigurationException;
19
use Maslosoft\Addendum\Reflection\ReflectionAnnotatedClass;
20
use Maslosoft\Addendum\Reflection\ReflectionAnnotatedMethod;
21
use Maslosoft\Addendum\Reflection\ReflectionAnnotatedProperty;
22
23
/**
24
 * MatcherConfig
25
 *
26
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
27
 */
28
class MatcherConfig
29
{
30
31 55
	public function __construct($config)
32
	{
33 55
		assert(isset($config['addendum']), new ConfigurationException('Matcher plugins require `addendum`'));
34 55
		assert(isset($config['reflection']), new ConfigurationException('Matcher plugins require `reflection`'));
35 55
		$this->addendum = $config['addendum'];
36 55
		$this->reflection = $config['reflection'];
37 55
	}
38
39
	/**
40
	 * Addendum instance
41
	 * @var Addendum
42
	 */
43
	public $addendum = null;
44
45
	/**
46
	 *
47
	 * @var ReflectionAnnotatedClass|ReflectionAnnotatedMethod|ReflectionAnnotatedProperty
48
	 */
49
	public $reflection = null;
50
51
}
52