| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function initialize() |
||
| 16 | { |
||
| 17 | $this->add( |
||
| 18 | (new Text('slug', ['required' => 'required'])) |
||
|
|
|||
| 19 | ->addValidator(new PresenceOf([ |
||
| 20 | 'message' => 'Slug is required' |
||
| 21 | ])) |
||
| 22 | ->setLabel('Slug') |
||
| 23 | ); |
||
| 24 | |||
| 25 | $this->add( |
||
| 26 | (new Text('title', ['required' => 'required'])) |
||
| 27 | ->addValidator(new PresenceOf([ |
||
| 28 | 'message' => 'Title is required' |
||
| 29 | ])) |
||
| 30 | ->setLabel('Title') |
||
| 31 | ); |
||
| 32 | |||
| 33 | } |
||
| 34 | |||
| 35 | } |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.