Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
52 | public function map(Closure $callback) |
||
53 | { |
||
54 | $segments = glob($this->path . '/' . $this->segmentName); |
||
55 | if ($segments == false) { |
||
56 | throw new PinyinException('CC-CEDICT dictionary data does not exist'); |
||
57 | } |
||
58 | while (($segment = array_shift($segments))) { |
||
59 | $dictionary = Arr::wrap(include $segment); |
||
60 | $callback($dictionary); |
||
61 | } |
||
79 |