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