Conditions | 2 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
20 | 5 | public function __toString(): string |
|
21 | { |
||
22 | 5 | $home = \sprintf('%s/.phive', \dirname($this->bin)); |
|
23 | 5 | $tmp = \sprintf('%s/tmp/%s', $home, \md5($this->alias)); |
|
24 | |||
25 | 5 | return \sprintf( |
|
26 | 5 | 'phive --no-progress --home %s install %s %s -t %s && mv %s/* %s', |
|
27 | 5 | $home, |
|
28 | 5 | $this->sig ? '--trust-gpg-keys '.$this->sig : '--force-accept-unsigned', |
|
29 | 5 | $this->alias, |
|
30 | 5 | $tmp, |
|
31 | 5 | $tmp, |
|
32 | 5 | $this->bin |
|
33 | 5 | ); |
|
36 |