Completed
Push — master ( 84255c...a7d7e4 )
by Thomas
14:38
created

KernelTargetEvent::getTarget()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace keeko\core\events;
3
4
use keeko\core\kernel\KernelTargetInterface;
5
use Symfony\Component\EventDispatcher\Event;
6
7
class KernelTargetEvent extends Event {
8
	
9
	const BEFORE_RUN = 'core.kernel.before_run';
10
	const AFTER_RUN = 'core.kernel.after_run';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
11
12
	/** @var KernelInterface */
13
	private $target;
14
	
15
	public function __construct(KernelTargetInterface $target) {
16
		$this->target = $target;
0 ignored issues
show
Documentation Bug introduced by
It seems like $target of type object<keeko\core\kernel\KernelTargetInterface> is incompatible with the declared type object<keeko\core\events\KernelInterface> of property $target.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
17
	}
18
	
19
	/**
20
	 * Returns the executed target
21
	 *
22
	 * @return KernelTargetInterface
23
	 */
24
	public function getTarget() {
25
		return $this->target;
26
	}
27
}