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