| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function getSystemManipulator() |
||
| 13 | { |
||
| 14 | $shell = getenv('SHELL'); |
||
| 15 | $userHome = getenv('HOME'); |
||
| 16 | |||
| 17 | $environFile = $userHome.'/.bash_profile'; |
||
| 18 | if (strpos($shell, 'zsh') !== false) { |
||
| 19 | $environFile = $userHome.'/.zshrc'; |
||
| 20 | } elseif (strpos($shell, 'fish') !== false) { |
||
| 21 | $environFile = $userHome.'/.config/fish/config.fish'; |
||
| 22 | } |
||
| 23 | |||
| 24 | return new FileEnvironManipulator($environFile); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |