| Total Complexity | 6 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 71.43% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | trait HasCommandPathTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var null|string |
||
| 13 | */ |
||
| 14 | protected static $commandPath = null; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return null|string |
||
| 18 | */ |
||
| 19 | 1 | public static function getCommandPath() |
|
| 20 | { |
||
| 21 | 1 | if (static::$commandPath === null) { |
|
| 22 | 1 | static::$commandPath = static::detectCommandPath(); |
|
| 23 | } |
||
| 24 | 1 | return static::$commandPath; |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string|null $path |
||
| 29 | */ |
||
| 30 | public static function setCommandPath($path) |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return null|string |
||
| 37 | */ |
||
| 38 | 1 | protected static function detectCommandPath() |
|
| 50 | } |
||
| 51 | } |
||
| 52 |