We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 104-119 (lines=16) @@ | ||
| 101 | * |
|
| 102 | * @return CrudButton The button that has suffered the changes, for daisychaining methods. |
|
| 103 | */ |
|
| 104 | public function modifyButton($name, $modifications = null) |
|
| 105 | { |
|
| 106 | /** |
|
| 107 | * @var CrudButton|null |
|
| 108 | */ |
|
| 109 | $button = $this->buttons()->firstWhere('name', $name); |
|
| 110 | ||
| 111 | if (! $button) { |
|
| 112 | abort(500, 'CRUD Button "'.$name.'" not found. Please check the button exists before you modify it.'); |
|
| 113 | } |
|
| 114 | ||
| 115 | if (is_array($modifications)) { |
|
| 116 | foreach ($modifications as $key => $value) { |
|
| 117 | $button->{$key} = $value; |
|
| 118 | } |
|
| 119 | } |
|
| 120 | ||
| 121 | return $button; |
|
| 122 | } |
|
| @@ 203-218 (lines=16) @@ | ||
| 200 | * |
|
| 201 | * @return CrudFilter The filter that has suffered modifications, for daisychaining methods. |
|
| 202 | */ |
|
| 203 | public function modifyFilter($name, $modifications) |
|
| 204 | { |
|
| 205 | $filter = $this->filters->firstWhere('name', $name); |
|
| 206 | ||
| 207 | if (! $filter) { |
|
| 208 | abort(500, 'CRUD Filter "'.$name.'" not found. Please check the filter exists before you modify it.'); |
|
| 209 | } |
|
| 210 | ||
| 211 | if (is_array($modifications)) { |
|
| 212 | foreach ($modifications as $key => $value) { |
|
| 213 | $filter->{$key} = $value; |
|
| 214 | } |
|
| 215 | } |
|
| 216 | ||
| 217 | return $filter; |
|
| 218 | } |
|
| 219 | ||
| 220 | public function removeFilter($name) |
|
| 221 | { |
|