| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function listShares() { |
||
| 36 | $this->connect(); |
||
| 37 | $shares = array(); |
||
| 38 | $dh = $this->state->opendir('smb://' . $this->getHost()); |
||
| 39 | while ($share = $this->state->readdir($dh)) { |
||
| 40 | if ($share['type'] === 'file share') { |
||
| 41 | $shares[] = $this->getShare($share['name']); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | $this->state->closedir($dh); |
||
| 45 | return $shares; |
||
| 46 | } |
||
| 47 | |||
| 56 |