| Conditions | 4 |
| Paths | 6 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function display($callback = null) |
||
| 34 | { |
||
| 35 | if (func_num_args() == 2) { |
||
| 36 | list($title, $callback) = func_get_args(); |
||
| 37 | } elseif (func_num_args() == 1) { |
||
| 38 | $title = $this->trans('title'); |
||
| 39 | } |
||
| 40 | |||
| 41 | $html = ''; |
||
| 42 | |||
| 43 | if ($async = is_subclass_of($callback, Renderable::class)) { |
||
| 44 | $this->renderable = $callback; |
||
| 45 | } else { |
||
| 46 | $html = call_user_func_array($callback->bindTo($this->row), [$this->row]); |
||
| 47 | } |
||
| 48 | |||
| 49 | return Admin::component('admin::components.column-modal', [ |
||
| 50 | 'url' => $this->getLoadUrl(), |
||
| 51 | 'async' => $async, |
||
| 52 | 'grid' => is_subclass_of($callback, Simple::class), |
||
| 53 | 'title' => $title, |
||
| 54 | 'html' => $html, |
||
| 55 | 'key' => $this->getKey(), |
||
| 56 | 'value' => $this->value, |
||
| 57 | 'name' => $this->getKey() . '-' . str_replace('.', '_', $this->getColumn()->getName()), |
||
| 58 | ]); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.