| Conditions | 2 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function check($patterns) |
||
| 12 | { |
||
| 13 | $status = false; |
||
| 14 | |||
| 15 | try { |
||
| 16 | $ip = config('firewall.models.ip', Model::class); |
||
| 17 | $status = $ip::blocked($this->ip())->pluck('id')->first(); |
||
| 18 | } catch (QueryException $e) { |
||
| 19 | // Base table or view not found |
||
| 20 | //$status = ($e->getCode() == '42S02') ? false : true; |
||
| 21 | } |
||
| 22 | |||
| 23 | return $status; |
||
| 24 | } |
||
| 25 | } |
||
| 26 |