RunsWorkflow::setWorkflow()   A
last analyzed

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 namespace Cerbero\Workflow;
2
3
/**
4
 * Trait to set the workflow.
5
 *
6
 * @author	Andrea Marco Sartori
7
 */
8
trait RunsWorkflow {
9
10
	/**
11
	 * @author	Andrea Marco Sartori
12
	 * @var		Cerbero\Workflow\Workflow	$workflow	Workflows hub.
13
	 */
14
	protected $workflow;
15
16
	/**
17
	 * Set the workflow to run.
18
	 *
19
	 * @author	Andrea Marco Sartori
20
	 * @param	Cerbero\Workflow\Workflow	$workflow
21
	 * @return	void
22
	 */
23
	public function setWorkflow(Workflow $workflow)
24
	{
25
		$this->workflow = $workflow;
0 ignored issues
show
Documentation Bug introduced by
It seems like $workflow of type object<Cerbero\Workflow\Workflow> is incompatible with the declared type object<Cerbero\Workflow\...bero\Workflow\Workflow> of property $workflow.

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...
26
	}
27
28
}
29