Passed
Pull Request — master (#10)
by Alice
02:01
created

TestListener   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A onNewThread() 0 2 1
A getEventMapping() 0 4 1
1
<?php
2
3
namespace Wonderland\Thread\Tests\Implementation;
4
5
use Wonderland\Thread\Event\PoolEvent;
6
use Wonderland\Thread\Mediator\Listener\AbstractListener;
7
8
class TestListener extends AbstractListener
9
{
10
11
	/**
12
	 * @return array
13
	 */
14
	public function getEventMapping(): array
15
	{
16
		return [
17
			PoolEvent::POOL_NEW_THREAD => 'onNewThread'
18
		];
19
	}
20
21
	/**
22
	 * @param PoolEvent $event
23
	 */
24
	public function onNewThread(PoolEvent $event)
0 ignored issues
show
Unused Code introduced by
The parameter $event is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
	public function onNewThread(/** @scrutinizer ignore-unused */ PoolEvent $event)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
	{
26
27
	}
28
29
}
30