| Total Complexity | 10 |
| Total Lines | 97 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Application |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * 应用 |
||
| 20 | * |
||
| 21 | * @var NebulaApplication |
||
| 22 | */ |
||
| 23 | protected $nebula; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * 资源管理 |
||
| 27 | * |
||
| 28 | * @var Resource |
||
| 29 | */ |
||
| 30 | protected $resource; |
||
| 31 | |||
| 32 | |||
| 33 | public function setNebula(NebulaApplication $application) |
||
| 34 | { |
||
| 35 | $this->nebula = $application; |
||
| 36 | } |
||
| 37 | |||
| 38 | |||
| 39 | /** |
||
| 40 | * Get 资源管理 |
||
| 41 | * |
||
| 42 | * @return Resource |
||
| 43 | */ |
||
| 44 | public function getResource() |
||
| 45 | { |
||
| 46 | return $this->resource; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Set 资源管理 |
||
| 51 | * |
||
| 52 | * @param Resource $resource 资源管理 |
||
| 53 | * |
||
| 54 | * @return self |
||
| 55 | */ |
||
| 56 | public function setResource(Resource $resource) |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get 应用 |
||
| 65 | * |
||
| 66 | * @return NebulaApplication |
||
| 67 | */ |
||
| 68 | public function getNebula() |
||
| 69 | { |
||
| 70 | return $this->nebula; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * 初始化 |
||
| 75 | * |
||
| 76 | * @return void |
||
| 77 | */ |
||
| 78 | public function initiation() |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * 处理请求 |
||
| 85 | * |
||
| 86 | * @param Request $request |
||
| 87 | * @return boolean |
||
| 88 | */ |
||
| 89 | public function onRequest(Request $request): bool { |
||
|
|
|||
| 90 | return false; |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * 处理异常 |
||
| 95 | * |
||
| 96 | * @param Exception $exception |
||
| 97 | * @return boolean |
||
| 98 | */ |
||
| 99 | public function onException(Exception $exception): bool { |
||
| 101 | } |
||
| 102 | |||
| 103 | protected function initResource() |
||
| 104 | { |
||
| 113 | } |
||
| 114 | } |
||
| 115 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.