Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3.054 |
Changes | 0 |
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 | $this->state->closedir($dh); |
||
45 | return $shares; |
||
46 | } |
||
47 | |||
56 |