Completed
Push — master ( 8048d4...881261 )
by Peter
01:59
created

WithMethodInjection::reactOn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
namespace Maslosoft\SignalsExamples;
10
11
use Maslosoft\Addendum\Interfaces\AnnotatedInterface;
12
use Maslosoft\SignalsExamples\Signals\ConstructorInjected;
13
use Maslosoft\SignalsExamples\Signals\MethodInjected;
14
15
/**
16
 * Model with method injection
17
 *
18
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
19
 */
20
class WithMethodInjection implements AnnotatedInterface
21
{
22
23
	/**
24
	 * @SlotFor(MethodInjected)
25
	 * @param MethodInjected $signal
26
	 */
27
	public function reactOn(MethodInjected $signal)
28
	{
29
		$signal->emitted = true;
30
	}
31
32
}
33