TreeExtension::loadConfiguration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 7
cts 7
cp 1
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Zenify
7
 * Copyright (c) 2012 Tomas Votruba (http://tomasvotruba.cz)
8
 */
9
10
namespace Zenify\DoctrineExtensionsTree\DI;
11
12
use Kdyby\Events\DI\EventsExtension;
13
use Nette\DI\CompilerExtension;
14
15
16
final class TreeExtension extends CompilerExtension
17
{
18
19 1
	public function loadConfiguration()
20
	{
21 1
		$builder = $this->getContainerBuilder();
22
23 1
		$builder->addDefinition($this->prefix('listener'))
24 1
			->setClass('Gedmo\Tree\TreeListener')
25 1
			->addSetup('setAnnotationReader', ['@Doctrine\Common\Annotations\Reader'])
26 1
			->addTag(EventsExtension::TAG_SUBSCRIBER);
27 1
	}
28
29
}
30