SomeEventSubscriber   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 4 1
A methodName() 0 4 1
1
<?php
2
3
namespace Symnedi\EventDispatcher\Tests\DI\EventDispatcherExtensionSource;
4
5
use Exception;
6
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
7
8
9
final class SomeEventSubscriber implements EventSubscriberInterface
10
{
11
12
	/**
13
	 * {@inheritdoc}
14
	 */
15
	public static function getSubscribedEvents()
16
	{
17
		return ['subscriber.event' => 'methodName'];
18
	}
19
20
21
	public function methodName()
22
	{
23
		throw new Exception('Event was dispatched in subscriber.');
24
	}
25
26
}
27