AbstractCompilerExtensionPass::stopPropagation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SixtyEightPublishers\User\DI;
6
7
use ArrayObject;
8
use Nette\DI\CompilerExtension;
9
use SixtyEightPublishers\User\Common\Exception\StopPropagationException;
10
11
abstract class AbstractCompilerExtensionPass extends CompilerExtension implements CompilerExtensionPassInterface
12
{
13
	/** @var \Nette\DI\CompilerExtension|NULL */
14
	protected $parent;
15
16
	/** @var ArrayObject|NULL */
17
	protected $sharedData;
18
19
	/**
20
	 * {@inheritDoc}
21
	 */
22
	public function attach(CompilerExtension $extension, ArrayObject $sharedData): void
23
	{
24
		$this->parent = $extension;
25
		$this->sharedData = $sharedData;
26
		$this->initialization = $extension->getInitialization();
27
	}
28
29
	/**
30
	 * {@inheritDoc}
31
	 */
32
	public function startup(): void
33
	{
34
	}
35
36
	/**
37
	 * @return void
38
	 */
39
	protected function stopPropagation(): void
40
	{
41
		throw new StopPropagationException();
42
	}
43
}
44