Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function __construct() |
||
12 | { |
||
13 | $this->commandLine = getenv('CMDLINE_CONTENTS'); |
||
14 | $this->charIndex = intval(getenv('CMDLINE_CURSOR_INDEX')); |
||
15 | |||
16 | if ($this->commandLine === false) { |
||
17 | $message = 'Failed to configure from environment; Environment var CMDLINE_CONTENTS not set.'; |
||
18 | |||
19 | if (getenv('COMP_LINE')) { |
||
20 | $message .= "\n\nYou appear to be attempting completion using an out-dated hook. If you've just updated," |
||
21 | . " you probably need to reinitialise the completion shell hook by reloading your shell" |
||
22 | . " profile or starting a new shell session. If you are using a hard-coded (rather than generated)" |
||
23 | . " hook, you will need to update that function with the new environment variable names." |
||
24 | . "\n\nSee here for details: https://github.com/stecman/symfony-console-completion/issues/31"; |
||
25 | } |
||
26 | |||
27 | throw new \RuntimeException($message); |
||
28 | } |
||
29 | } |
||
30 | |||
47 |