NamespacesSignal   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A addNamespace() 0 4 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 https://maslosoft.com/addendum/ - maslosoft addendum
12
 * @link https://code.google.com/p/addendum/ - original addendum project
13
 */
14
15
namespace Maslosoft\Addendum\Signals;
16
17
use Maslosoft\Addendum\Addendum;
18
use Maslosoft\Signals\Interfaces\SignalInterface;
19
20
/**
21
 * NamespacesSignal
22
 *
23
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
24
 */
25
class NamespacesSignal implements SignalInterface
26
{
27
28
	/**
29
	 * Addendum instance
30
	 * @var Addendum
31
	 */
32
	private $addendum;
33
34
	public function __construct(Addendum $addendum)
35
	{
36
		$this->addendum = $addendum;
37
	}
38
39
	/**
40
	 * Add annotation namespace
41
	 * @param string $namespace
42
	 */
43
	public function addNamespace($namespace)
44
	{
45
		$this->addendum->addNamespace($namespace);
46
	}
47
48
}
49