Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | 57 | public function sync($type = 'xml') |
|
17 | { |
||
18 | // Download quran data |
||
19 | 57 | foreach ($this->config->get('translations') as $tr) { |
|
20 | 57 | $file = $this->config->get('storage_path') . '/' . $tr . '.' . $type; |
|
21 | |||
22 | 57 | if (!file_exists($file)) { |
|
23 | 3 | $url = 'http://tanzil.net/trans/?transID=' . $tr . '&type=' . $type; |
|
24 | 3 | $this->download($url, $file); |
|
25 | 3 | } |
|
26 | 57 | } |
|
27 | 57 | } |
|
28 | |||
36 |