| Conditions | 4 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 6.4268 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 1 | public function fire() |
|
| 37 | { |
||
| 38 | 1 | $table = new Table($this->output); |
|
| 39 | |||
| 40 | 1 | $list = []; |
|
| 41 | |||
| 42 | 1 | foreach (app('firewall')->report() as $ip) { |
|
| 43 | $list[] = [ |
||
| 44 | $ip['ip_address'], |
||
| 45 | $ip['whitelisted'] == false |
||
| 46 | ? '' |
||
| 47 | : ' X ', |
||
| 48 | $ip['whitelisted'] == false |
||
| 49 | ? ' X ' |
||
| 50 | : '', |
||
| 51 | ]; |
||
| 52 | } |
||
| 53 | |||
| 54 | 1 | $table->setHeaders(['IP Address', 'Whitelist', 'Blacklist'])->setRows($list); |
|
| 55 | |||
| 56 | 1 | $table->render(); |
|
| 57 | 1 | } |
|
| 58 | } |
||
| 59 |