Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
71 | public function findScriptByName(string $scriptName): Script |
||
72 | { |
||
73 | foreach ($this->getAllScripts() as $script) { |
||
74 | if ($script->getName() === $scriptName) { |
||
75 | return $script; |
||
76 | } |
||
77 | } |
||
78 | |||
79 | throw new ScriptNotFoundException('Unable to find script named "' . $scriptName . '"'); |
||
80 | } |
||
81 | } |
||
82 |