| 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 | 18 | public function __construct($path, $preload = false) |
|
| 46 | { |
||
| 47 | 18 | $this->path = $path; |
|
| 48 | 18 | for ($i = 0; $i < 100; ++$i) { |
|
| 49 | 18 | $segment = $this->path . '/' . sprintf($this->segmentName, $i); |
|
| 50 | 18 | if (file_exists($segment)) { |
|
| 51 | 18 | $this->segments[$i] = array('segment' => $segment); |
|
| 52 | 18 | if ($preload) { |
|
| 53 | $this->segments[$i]['dictionary'] = (array) include $segment; |
||
| 54 | } |
||
| 55 | 18 | } |
|
| 56 | 18 | } |
|
| 57 | 18 | } |
|
| 58 | |||
| 88 |