Conditions | 3 |
Paths | 4 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function run($aliasName, array $args, $options = ['foo' => 'bar']) |
||
|
|||
21 | { |
||
22 | // The site alias manager has not been added to the DI container yet. |
||
23 | if (!$this->hasSiteAliasManager()) { |
||
24 | // TODO: Provide some way to initialize the alias file loaders, so |
||
25 | // that there is some way to specify where alias files may be |
||
26 | // loaded from. |
||
27 | $manager = new SiteAliasManager(); |
||
28 | // $manager->setRoot($root); |
||
29 | $this->setSiteAliasManager($manager); |
||
30 | } |
||
31 | |||
32 | // In theory this might do something once we get an alias manager. |
||
33 | $siteAlias = $this->siteAliasManager()->get($aliasName); |
||
34 | if (!$siteAlias) { |
||
35 | throw new \Exception("Alias name $aliasName not found."); |
||
36 | } |
||
37 | $process = new SiteProcess($siteAlias, $args); |
||
38 | $process->setRealtimeOutput($this->io()); |
||
39 | $process->setTty($this->input()->isInteractive()); |
||
40 | $process->mustRun($process->showRealtime()); |
||
41 | } |
||
42 | } |
||
43 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.