IdentityNotFoundEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 36
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getIdentityReference() 0 4 1
A getNamespace() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SixtyEightPublishers\User\DoctrineIdentity\Event;
6
7
use Symfony\Contracts\EventDispatcher\Event;
8
use SixtyEightPublishers\User\DoctrineIdentity\IdentityReference;
9
10
final class IdentityNotFoundEvent extends Event
11
{
12
	public const NAME = '68publishers.doctrine_identity.identity_not_found';
13
14
	/** @var \SixtyEightPublishers\User\DoctrineIdentity\IdentityReference  */
15
	private $identityReference;
16
17
	/** @var string|NULL  */
18
	private $namespace;
19
20
	/**
21
	 * @param \SixtyEightPublishers\User\DoctrineIdentity\IdentityReference $identityReference
22
	 * @param string|NULL                                                   $namespace
23
	 */
24
	public function __construct(IdentityReference $identityReference, ?string $namespace)
25
	{
26
		$this->identityReference = $identityReference;
27
		$this->namespace = $namespace;
28
	}
29
30
	/**
31
	 * @return \SixtyEightPublishers\User\DoctrineIdentity\IdentityReference
32
	 */
33
	public function getIdentityReference(): IdentityReference
34
	{
35
		return $this->identityReference;
36
	}
37
38
	/**
39
	 * @return NULL|string
40
	 */
41
	public function getNamespace(): ?string
42
	{
43
		return $this->namespace;
44
	}
45
}
46