| Conditions | 3 |
| Paths | 4 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 70 | protected function abortIfNoSSHConnection($server = null) |
||
| 71 | { |
||
| 72 | $server = $server ? $server : $this->hostNameForConfigFile(); |
||
| 73 | if (!$this->checkSSHConnection($server)) { |
||
| 74 | $this->error("SSH connection to server $server doesn't works. Please run php artisan publish:init or publish:ssh"); |
||
| 75 | die(); |
||
| 76 | } |
||
| 77 | } |
||
| 78 | } |
||
| 79 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: