Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function addSolution(Job $job) : void |
||
43 | { |
||
44 | if ($this->hasSolution($job)) { |
||
45 | throw new Exceptions\InvalidArgumentException(sprintf( |
||
46 | 'Solution "%s:%s" is already added.', |
||
47 | $job->getPackage()->getName(), |
||
48 | $job->getAction() |
||
49 | )); |
||
50 | } |
||
51 | |||
52 | $this->solutions[$job->getPackage()->getName()] = $job; |
||
53 | } |
||
54 | |||
73 |