1 | <?php |
||
9 | class FormBuilder |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var Container |
||
14 | */ |
||
15 | protected $container; |
||
16 | |||
17 | /** |
||
18 | * @var FormHelper |
||
19 | */ |
||
20 | protected $formHelper; |
||
21 | |||
22 | /** |
||
23 | * @var EventDispatcher |
||
24 | */ |
||
25 | protected $eventDispatcher; |
||
26 | |||
27 | /** |
||
28 | * @param Container $container |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $plainFormClass = Form::class; |
||
32 | |||
33 | /** |
||
34 | * @param Container $container |
||
35 | * @param FormHelper $formHelper |
||
36 | * @param EventDispatcher $eventDispatcher |
||
37 | */ |
||
38 | 108 | public function __construct(Container $container, FormHelper $formHelper, EventDispatcher $eventDispatcher) |
|
44 | |||
45 | /** |
||
46 | * Create a Form instance. |
||
47 | * |
||
48 | * @param string $formClass The name of the class that inherits \Kris\LaravelFormBuilder\Form. |
||
49 | * @param array $options|null |
||
|
|||
50 | * @param array $data|null |
||
51 | * @return Form |
||
52 | */ |
||
53 | 18 | public function create($formClass, array $options = [], array $data = []) |
|
79 | |||
80 | /** |
||
81 | * @param $items |
||
82 | * @param array $options |
||
83 | * @param array $data |
||
84 | * @return mixed |
||
85 | */ |
||
86 | 1 | public function createByArray($items, array $options = [], array $data = []) |
|
104 | |||
105 | /** |
||
106 | * @param $form |
||
107 | * @param $items |
||
108 | */ |
||
109 | 1 | public function buildFormByArray($form, $items) |
|
126 | |||
127 | /** |
||
128 | * Get the namespace from the config |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | 18 | protected function getNamespaceFromConfig() |
|
142 | |||
143 | /** |
||
144 | * Get instance of the empty form which can be modified |
||
145 | * Get the plain form class. |
||
146 | * |
||
147 | * @return string |
||
148 | */ |
||
149 | public function getFormClass() { |
||
152 | |||
153 | /** |
||
154 | * Set the plain form class. |
||
155 | * |
||
156 | * @param string $class |
||
157 | */ |
||
158 | public function setFormClass($class) { |
||
166 | |||
167 | /** |
||
168 | * Get instance of the empty form which can be modified. |
||
169 | * |
||
170 | * @param array $options |
||
171 | * @param array $data |
||
172 | * @return \Kris\LaravelFormBuilder\Form |
||
173 | */ |
||
174 | 108 | public function plain(array $options = [], array $data = []) |
|
190 | } |
||
191 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.