| Conditions | 4 | 
| Paths | 3 | 
| Total Lines | 13 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 30 | public function elementForm(HTTPRequest $request = null) | ||
| 31 |     { | ||
| 32 | // Get ID either from posted back value, or url parameter | ||
| 33 |         if (!$request) { | ||
| 34 | $this->jsonError(400); | ||
| 35 | return null; | ||
| 36 | } | ||
| 37 |         $id = $request->param('ID'); | ||
| 38 |         if (!$id) { | ||
| 39 | $this->jsonError(400); | ||
| 40 | return null; | ||
| 41 | } | ||
| 42 | return $this->getElementForm($id) ?: $this->jsonError(404); | ||
| 43 | } | ||
| 65 |