| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function spam(HTTPRequest $request) |
||
| 32 | { |
||
| 33 | $ids = array(); |
||
| 34 | |||
| 35 | foreach ($this->getRecords() as $record) { |
||
| 36 | array_push($ids, $record->ID); |
||
| 37 | $record->markSpam(); |
||
| 38 | } |
||
| 39 | |||
| 40 | $response = new HTTPResponse(json_encode(array( |
||
| 41 | 'done' => true, |
||
| 42 | 'records' => $ids |
||
| 43 | ))); |
||
| 44 | |||
| 45 | $response->addHeader('Content-Type', 'text/json'); |
||
| 46 | |||
| 47 | return $response; |
||
| 48 | } |
||
| 73 |