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 | * @var string |
||
29 | */ |
||
30 | protected $plainFormClass = Form::class; |
||
31 | |||
32 | /** |
||
33 | * @param Container $container |
||
34 | * @param FormHelper $formHelper |
||
35 | * @param EventDispatcher $eventDispatcher |
||
36 | */ |
||
37 | 106 | public function __construct(Container $container, FormHelper $formHelper, EventDispatcher $eventDispatcher) |
|
43 | |||
44 | /** |
||
45 | * Create a Form instance. |
||
46 | * |
||
47 | * @param string $formClass The name of the class that inherits \Kris\LaravelFormBuilder\Form. |
||
48 | * @param array $options|null |
||
|
|||
49 | * @param array $data|null |
||
50 | * @return Form |
||
51 | */ |
||
52 | 16 | public function create($formClass, array $options = [], array $data = []) |
|
78 | |||
79 | /** |
||
80 | * Get the namespace from the config. |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | 16 | protected function getNamespaceFromConfig() |
|
94 | |||
95 | /** |
||
96 | * Get the plain form class. |
||
97 | * |
||
98 | * @return string |
||
99 | */ |
||
100 | public function getFormClass() { |
||
103 | |||
104 | /** |
||
105 | * Set the plain form class. |
||
106 | * |
||
107 | * @param string $class |
||
108 | */ |
||
109 | public function setFormClass($class) { |
||
117 | |||
118 | /** |
||
119 | * Get instance of the empty form which can be modified. |
||
120 | * |
||
121 | * @param array $options |
||
122 | * @param array $data |
||
123 | * @return \Kris\LaravelFormBuilder\Form |
||
124 | */ |
||
125 | 106 | public function plain(array $options = [], array $data = []) |
|
141 | } |
||
142 |
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.