| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class Guard extends ServerGuard |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var bool |
||
| 26 | */ |
||
| 27 | protected $alwaysValidate = true; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | 1 | public function validate() |
|
| 33 | { |
||
| 34 | 1 | return $this; |
|
|
|
|||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 1 | protected function shouldReturnRawResponse(): bool |
|
| 41 | { |
||
| 42 | 1 | return !is_null($this->app['request']->get('echostr')); |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | protected function isSafeMode(): bool |
|
| 46 | { |
||
| 47 | 1 | return true; |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param array $message |
||
| 52 | * |
||
| 53 | * @return mixed |
||
| 54 | * |
||
| 55 | * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException |
||
| 56 | */ |
||
| 57 | 1 | protected function decryptMessage(array $message) |
|
| 66 | ); |
||
| 67 | } |
||
| 68 | } |
||
| 69 |