1 | <?php namespace Mascame\Artificer\Fields; |
||
9 | class FieldWrapper |
||
10 | { |
||
11 | use Filterable; |
||
12 | |||
13 | public static $widgets = []; |
||
14 | |||
15 | /** |
||
16 | * Sometimes ajax limits output, setting this to true will return all |
||
17 | * |
||
18 | * @var bool |
||
19 | */ |
||
20 | public $showFullField = false; |
||
21 | |||
22 | /** |
||
23 | * @var FieldInterface|TypeInterface |
||
24 | */ |
||
25 | protected $field; |
||
26 | |||
27 | /** |
||
28 | * Field constructor. |
||
29 | * @param FieldInterface|TypeInterface $field |
||
30 | * @param null $relation |
||
|
|||
31 | */ |
||
32 | public function __construct(FieldInterface $field) |
||
38 | |||
39 | /** |
||
40 | * @param $widget |
||
41 | * @return bool |
||
42 | */ |
||
43 | public function addWidget(AbstractWidget $widget) |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Used to load custom assets, widgets, ... |
||
57 | * |
||
58 | */ |
||
59 | protected function boot() |
||
75 | |||
76 | /** |
||
77 | * @param null $value |
||
78 | * @return null |
||
79 | */ |
||
80 | public function show($value = null) |
||
92 | |||
93 | /** |
||
94 | * @return bool|mixed|null|string |
||
95 | */ |
||
96 | public function output() |
||
102 | |||
103 | public function withWidgets($output) { |
||
110 | |||
111 | /** |
||
112 | * @param $array |
||
113 | * @return bool |
||
114 | */ |
||
115 | protected function isAll($array) |
||
119 | |||
120 | /** |
||
121 | * @param string $visibility [visible|hidden] |
||
122 | * @return bool |
||
123 | */ |
||
124 | protected function isListedAs($visibility, $action = null) |
||
138 | |||
139 | /** |
||
140 | * Hidden fields have preference. |
||
141 | * |
||
142 | * @return bool |
||
143 | */ |
||
144 | public function isVisible() |
||
150 | |||
151 | /** |
||
152 | * @param $value |
||
153 | * @param $array |
||
154 | * @return bool |
||
155 | */ |
||
156 | public function isInArray($value, $array) |
||
160 | |||
161 | /** |
||
162 | * @return bool |
||
163 | */ |
||
164 | public function isHidden() |
||
168 | |||
169 | public static function get($name) |
||
173 | |||
174 | public function __get($name) { |
||
183 | |||
184 | public function __call($method, $args) { |
||
191 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.