1 | <?php |
||
9 | abstract class InputHandler |
||
|
|||
10 | { |
||
11 | /** |
||
12 | * @var BaseNode |
||
13 | */ |
||
14 | protected $root; |
||
15 | |||
16 | /** |
||
17 | * @var TypeHandler |
||
18 | */ |
||
19 | protected $typeHandler; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $output = []; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $errors = []; |
||
30 | |||
31 | public function __construct(TypeHandler $typeHandler = null) |
||
37 | |||
38 | public function add(string $key, string $type, array $options = []): BaseNode |
||
42 | |||
43 | public function remove(string $key) |
||
47 | |||
48 | public function setRootType(string $type) |
||
52 | |||
53 | public function bind(array $input) |
||
65 | |||
66 | public function getData($index = null) |
||
78 | |||
79 | public function isValid(): bool |
||
83 | |||
84 | public function getErrors(): array |
||
88 | |||
89 | public function getErrorsAsString(): string |
||
93 | |||
94 | abstract public function define(); |
||
95 | } |
||
96 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.