MoslemPray   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
ccs 0
cts 8
cp 0
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFacadeRoot() 0 3 1
A __callStatic() 0 7 2
A getFacadeAccessor() 0 3 1
1
<?php
2
3
namespace Ianrizky\MoslemPray\Facades;
4
5
use Ianrizky\MoslemPray\Manager;
6
use Ianrizky\MoslemPray\MoslemPray as BaseClass;
7
use Illuminate\Support\Facades\Facade as BaseFacade;
8
9
/**
10
 * @method static \Ianrizky\MoslemPray\Drivers\MyQuran myquran() Create an instance of the PrayerTimes driver.
11
 * @method static \Ianrizky\MoslemPray\Contracts\Response\HasPrayerTime getPrayerTime(mixed $city, \Illuminate\Support\Carbon|string|null $date = null) Return prayer time based on the given city and date.
12
 * @method static \Ianrizky\MoslemPray\Contracts\Response\HasPrayerTimeCollection getPrayerTimePerMonth(mixed $city, \Illuminate\Support\Carbon|string|int|null $year = null, int|null $month = null) Return list of prayer time based on the given city and month.
13
 *
14
 * @see \Ianrizky\MoslemPray\Manager
15
 */
16
class MoslemPray extends BaseFacade
17
{
18
    /**
19
     * {@inheritDoc}
20
     */
21
    protected static function getFacadeAccessor(): string
22
    {
23
        return Manager::class;
24
    }
25
26
    /**
27
     * {@inheritDoc}
28
     */
29
    public static function getFacadeRoot(): Manager
30
    {
31
        return parent::getFacadeRoot();
32
    }
33
34
    /**
35
     * {@inheritDoc}
36
     */
37
    public static function __callStatic($method, $args)
38
    {
39
        if (BaseClass::isDriverAvailable($method)) {
40
            return static::getFacadeRoot()->driver($method);
41
        }
42
43
        return parent::__callStatic($method, $args);
44
    }
45
}
46