Conditions | 3 |
Paths | 7 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
1 | #!/usr/bin/php |
||
11 | public function execute(array $args) |
||
12 | { |
||
13 | $quran = new Quran(['storage_path' => __DIR__ . '/../quran']); |
||
14 | |||
15 | try { |
||
16 | if(isset($args[2])) $quran->translation($args[2]); |
||
17 | $ayah = $quran->get($args[1]); |
||
18 | |||
19 | return $this->parseResult($ayah) . "\n"; |
||
20 | |||
21 | } catch(Exception $e) { |
||
22 | return "Error: " . $e->getMessage() . "\n\n"; |
||
23 | } |
||
24 | } |
||
25 | |||
69 |