Total Complexity | 4 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class Application |
||
17 | { |
||
18 | use Notify; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | const SUCCESS = 'success'; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | const FAIL = 'fail'; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $method = ''; |
||
34 | |||
35 | /** |
||
36 | * Application constructor. |
||
37 | */ |
||
38 | 1 | public function __construct() |
|
39 | { |
||
40 | 1 | $this->setMethod(); |
|
41 | 1 | } |
|
42 | |||
43 | /** |
||
44 | * __call |
||
45 | * |
||
46 | * @param $name |
||
47 | * @param $arguments |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | 1 | public function __call($name, $arguments) |
|
52 | { |
||
53 | 1 | return call_user_func([$this, $name], ...$arguments); |
|
54 | } |
||
55 | |||
56 | /** |
||
57 | * setMethod |
||
58 | */ |
||
59 | 1 | protected function setMethod() |
|
64 | ]); |
||
65 | 1 | } |
|
66 | |||
67 | /** |
||
68 | * verify |
||
69 | * |
||
70 | * @param mixed $data |
||
71 | * |
||
72 | * @return bool |
||
73 | * |
||
74 | * @throws Exceptions\InvalidArgumentException |
||
75 | */ |
||
76 | 1 | public function verify($data = null) |
|
81 |