| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class Dear |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var Dear |
||
| 20 | */ |
||
| 21 | protected static $instance; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var Config |
||
| 25 | */ |
||
| 26 | protected $config; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Dear constructor. |
||
| 30 | * @param string $accountId |
||
| 31 | * @param string $applicationKey |
||
| 32 | */ |
||
| 33 | protected function __construct($accountId = null, $applicationKey = null) |
||
| 34 | { |
||
| 35 | $this->config = new Config($accountId, $applicationKey); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $accountId |
||
| 40 | * @param string $applicationKey |
||
| 41 | * @return Dear |
||
| 42 | */ |
||
| 43 | public static function create($accountId = null, $applicationKey = null) |
||
| 44 | { |
||
| 45 | return (static::$instance) ? static::$instance : new static($accountId, $applicationKey); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param $name |
||
| 50 | * @param $arguments |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function __call($name, $arguments) |
||
| 61 | } |
||
| 62 | } |
||
| 63 |