| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function handle(): void |
||
| 10 | { |
||
| 11 | $this->verifyNonce(); |
||
| 12 | $results = glsr(Database::class)->users([ |
||
| 13 | 'number' => 25, |
||
| 14 | 'search_wild' => $this->search, |
||
| 15 | ]); |
||
| 16 | if ($missingIds = $this->missingIds($results, $this->include)) { |
||
| 17 | $results += glsr(Database::class)->users([ |
||
| 18 | 'include' => $missingIds, |
||
| 19 | ]); |
||
| 20 | } |
||
| 21 | $formatted = $this->formatResults($results); |
||
| 22 | if (empty($this->search)) { |
||
| 23 | $formatted = [ |
||
| 24 | 'user_id' => esc_html_x('The Logged In User', 'admin-text', 'site-reviews'), |
||
| 25 | ] + $formatted; |
||
| 26 | } |
||
| 27 | $this->response = $formatted; |
||
| 28 | } |
||
| 30 |