| Conditions | 4 |
| Paths | 6 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 66 | public function render() |
||
| 67 | { |
||
| 68 | $icon = 'fa-sort'; |
||
| 69 | $type = 'desc'; |
||
| 70 | |||
| 71 | if ($this->isSorted()) { |
||
| 72 | $type = $this->sort['type'] == 'desc' ? 'asc' : 'desc'; |
||
| 73 | $icon .= "-amount-{$this->sort['type']}"; |
||
| 74 | } |
||
| 75 | |||
| 76 | // set sort value |
||
| 77 | $sort = ['column' => $this->columnName, 'type' => $type]; |
||
| 78 | |||
| 79 | if ($this->cast) { |
||
| 80 | $sort['cast'] = $this->cast; |
||
| 81 | } |
||
| 82 | |||
| 83 | $query = app('request')->all(); |
||
| 84 | $query = array_merge($query, [$this->sortName => $sort]); |
||
| 85 | |||
| 86 | $url = url()->current().'?'.http_build_query($query); |
||
| 87 | |||
| 88 | return "<a class=\"fa fa-fw $icon\" href=\"$url\"></a>"; |
||
| 89 | } |
||
| 90 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..