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

WithMethodInjection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A reactOn() 0 4 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