| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | private function getForm() |
||
| 52 | { |
||
| 53 | $form = new Form('auth'); |
||
| 54 | $radio = new Radio('auth'); |
||
| 55 | $radio->setOptions([ |
||
| 56 | 'yes' => 'Yes', |
||
| 57 | 'no' => 'No', |
||
| 58 | ]); |
||
| 59 | $radio->setLabel('Do you authorise TestClient?'); |
||
| 60 | $radio->setRenderInline(true); |
||
| 61 | $radio->setRequired(true); |
||
| 62 | $submit = new Submit('submit'); |
||
| 63 | |||
| 64 | $form->addField($radio) |
||
| 65 | ->addField($submit); |
||
| 66 | |||
| 67 | return $form; |
||
| 68 | } |
||
| 69 | } |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: