1 | <?php namespace Mascame\Artificer\Fields; |
||
7 | class FieldWrapper |
||
8 | { |
||
9 | use Filterable; |
||
10 | |||
11 | protected $widgets = []; |
||
12 | |||
13 | /** |
||
14 | * Sometimes ajax limits output, setting this to true will return all |
||
15 | * |
||
16 | * @var bool |
||
17 | */ |
||
18 | public $showFullField = false; |
||
19 | |||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $withWidgets = false; |
||
24 | |||
25 | /** |
||
26 | * @var FieldInterface|TypeInterface |
||
27 | */ |
||
28 | public $field; |
||
29 | |||
30 | /** |
||
31 | * Field constructor. |
||
32 | * @param FieldInterface|TypeInterface $field |
||
33 | * @param null $relation |
||
|
|||
34 | */ |
||
35 | public function __construct(FieldInterface $field) |
||
41 | |||
42 | /** |
||
43 | * Only get widgets that are installed |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | protected function getInstalledWidgets() |
||
61 | |||
62 | /** |
||
63 | * @param null $value |
||
64 | * @return null |
||
65 | */ |
||
66 | public function show($value = null) |
||
78 | |||
79 | /** |
||
80 | * @return bool|mixed|null|string |
||
81 | */ |
||
82 | public function output() |
||
94 | |||
95 | public function withWidgets() { |
||
100 | |||
101 | protected function applyWidgets() { |
||
113 | |||
114 | /** |
||
115 | * @param $array |
||
116 | * @return bool |
||
117 | */ |
||
118 | protected function isAll($array) |
||
122 | |||
123 | /** |
||
124 | * @param string $visibility [visible|hidden] |
||
125 | * @return bool |
||
126 | */ |
||
127 | protected function isListedAs($visibility, $action = null) |
||
141 | |||
142 | /** |
||
143 | * Hidden fields have preference. |
||
144 | * |
||
145 | * @return bool |
||
146 | */ |
||
147 | public function isVisible() |
||
153 | |||
154 | /** |
||
155 | * @param $value |
||
156 | * @param $array |
||
157 | * @return bool |
||
158 | */ |
||
159 | public function isInArray($value, $array) |
||
163 | |||
164 | /** |
||
165 | * @return bool |
||
166 | */ |
||
167 | public function isHidden() |
||
171 | |||
172 | public static function get($name) |
||
176 | |||
177 | public function __get($name) { |
||
186 | |||
187 | public function __call($method, $args) { |
||
194 | } |
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.