Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
45 | 9 | public function __construct($path, $preload = false) |
|
46 | { |
||
47 | 9 | $this->path = $path; |
|
48 | 9 | for ($i = 0; $i < 100; ++$i) { |
|
49 | 9 | $segment = $this->path . '/' . sprintf($this->segmentName, $i); |
|
50 | 9 | if (file_exists($segment)) { |
|
51 | 9 | $this->segments[$i] = array('segment' => $segment); |
|
52 | 9 | if ($preload) { |
|
53 | $this->segments[$i]['dictionary'] = (array) include $segment; |
||
54 | } |
||
55 | 9 | } |
|
56 | 9 | } |
|
57 | 9 | } |
|
58 | |||
88 |