| Conditions | 7 |
| Paths | 6 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function getConnection() |
||
| 25 | { |
||
| 26 | if (!$this->connection) { |
||
| 27 | $this->connection = new SSH2($this->computer->host); |
||
| 28 | if ($this->computer->key) { |
||
| 29 | if ($this->connection->login($this->computer->username, $this->computer->key->getKey())) { |
||
| 30 | return $this->connection; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | if (isset($this->computer->password) && $this->computer->password && $this->connection->login($this->computer->username, $this->computer->password)) { |
||
| 35 | return $this->connection; |
||
| 36 | } |
||
| 37 | |||
| 38 | exit('Login Failed'); |
||
| 39 | } |
||
| 40 | return $this->connection; |
||
| 41 | } |
||
| 42 | |||
| 52 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..