Conditions | 5 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
18 | 4 | public function setPriority($priority) |
|
19 | { |
||
20 | 4 | $oldPriority = $this->priority; |
|
21 | 4 | $this->priority = $priority; |
|
22 | 4 | if (!($this instanceof RunInterface && $this->hasStarted()) |
|
23 | 4 | && method_exists($this, 'dispatch') |
|
24 | 4 | && $this instanceof PrioritisedInterface) { |
|
25 | 4 | $this->dispatch(PriorityChangedEvent::CHANGED, new PriorityChangedEvent($this, $priority, $oldPriority)); |
|
26 | } |
||
27 | 4 | return $this; |
|
28 | } |
||
38 |