We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -9,6 +9,7 @@ discard block |
||
9 | 9 | /** |
10 | 10 | * Build a list of Revisions, grouped by revision date |
11 | 11 | * |
12 | + * @param integer $id |
|
12 | 13 | * @return [Array] of revision groups, keyed by revision date |
13 | 14 | */ |
14 | 15 | public function listRevisions($id) |
@@ -38,7 +39,7 @@ discard block |
||
38 | 39 | /** |
39 | 40 | * Restore a single revision |
40 | 41 | * |
41 | - * @param [int] $id The ID of the source CRUD Model instance to update |
|
42 | + * @param integer $id The ID of the source CRUD Model instance to update |
|
42 | 43 | * @param [int] $revisionId The ID of the revision to use for the update |
43 | 44 | */ |
44 | 45 | public function restoreRevision($id, $revisionId) { |
@@ -15,13 +15,13 @@ |
||
15 | 15 | { |
16 | 16 | $revisions = []; |
17 | 17 | // Group revisions by change date |
18 | - foreach($this->getEntry($id)->revisionHistory as $history) { |
|
18 | + foreach ($this->getEntry($id)->revisionHistory as $history) { |
|
19 | 19 | |
20 | 20 | // Get just the date from the revision created timestamp |
21 | - $revisionDate = date('Y-m-d', strtotime((string)$history->created_at)); |
|
21 | + $revisionDate = date('Y-m-d', strtotime((string) $history->created_at)); |
|
22 | 22 | |
23 | 23 | // Be sure to instantiate the initial grouping array |
24 | - if(!array_key_exists($revisionDate, $revisions)) { |
|
24 | + if (!array_key_exists($revisionDate, $revisions)) { |
|
25 | 25 | $revisions[$revisionDate] = []; |
26 | 26 | } |
27 | 27 |
@@ -89,33 +89,33 @@ |
||
89 | 89 | Route::post($name.'/search', [ |
90 | 90 | 'as' => 'crud.'.$name.'.search', |
91 | 91 | 'uses' => $controller.'@search', |
92 | - ]); |
|
92 | + ]); |
|
93 | 93 | Route::get($name.'/reorder', [ |
94 | 94 | 'as' => 'crud.'.$name.'.reorder', |
95 | 95 | 'uses' => $controller.'@reorder', |
96 | - ]); |
|
96 | + ]); |
|
97 | 97 | Route::post($name.'/reorder', [ |
98 | 98 | 'as' => 'crud.'.$name.'.save.reorder', |
99 | 99 | 'uses' => $controller.'@saveReorder', |
100 | - ]); |
|
100 | + ]); |
|
101 | 101 | Route::get($name.'/{id}/details', [ |
102 | 102 | 'as' => 'crud.'.$name.'.showDetailsRow', |
103 | 103 | 'uses' => $controller.'@showDetailsRow', |
104 | - ]); |
|
104 | + ]); |
|
105 | 105 | Route::get($name.'/{id}/translate/{lang}', [ |
106 | 106 | 'as' => 'crud.'.$name.'.translateItem', |
107 | 107 | 'uses' => $controller.'@translateItem', |
108 | - ]); |
|
108 | + ]); |
|
109 | 109 | |
110 | 110 | Route::get($name.'/{id}/revisions', [ |
111 | 111 | 'as' => 'crud.'.$name.'.listRevisions', |
112 | 112 | 'uses' => $controller.'@listRevisions', |
113 | - ]); |
|
113 | + ]); |
|
114 | 114 | |
115 | 115 | Route::post($name.'/{id}/revisions/{revisionId}/restore', [ |
116 | 116 | 'as' => 'crud.'.$name.'.restoreRevision', |
117 | 117 | 'uses' => $controller.'@restoreRevision', |
118 | - ]); |
|
118 | + ]); |
|
119 | 119 | |
120 | 120 | $options_with_default_route_names = array_merge([ |
121 | 121 | 'names' => [ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $this->data['title'] = ucfirst($this->crud->entity_name_plural); |
38 | 38 | |
39 | 39 | // get all entries if AJAX is not enabled |
40 | - if (! $this->data['crud']->ajaxTable()) { |
|
40 | + if (!$this->data['crud']->ajaxTable()) { |
|
41 | 41 | $this->data['entries'] = $this->data['crud']->getEntries(); |
42 | 42 | } |
43 | 43 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | // is somewhat superfluous.. however if we are POSTing, it makes sense to actually have data to post. |
221 | 221 | // Perhaps the route shoud be better named to reflect this (e.g. just /model/{id}/revisions) (??) |
222 | 222 | $revisionId = \Request::input('revision_id', false); |
223 | - if(!$revisionId) { |
|
223 | + if (!$revisionId) { |
|
224 | 224 | abort(500, 'Can\'t restore revision without revision_id'); |
225 | 225 | } else { |
226 | 226 | $this->crud->restoreRevision($id, $revisionId); // do the update |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | { |
261 | 261 | $this->crud->hasAccessOrFail('reorder'); |
262 | 262 | |
263 | - if (! $this->crud->isReorderEnabled()) { |
|
263 | + if (!$this->crud->isReorderEnabled()) { |
|
264 | 264 | abort(403, 'Reorder is disabled.'); |
265 | 265 | } |
266 | 266 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | $dataTable = new DataTable($this->crud->query, $columns); |
332 | 332 | |
333 | 333 | // make the datatable use the column types instead of just echoing the text |
334 | - $dataTable->setFormatRowFunction(function ($entry) { |
|
334 | + $dataTable->setFormatRowFunction(function($entry) { |
|
335 | 335 | // get the actual HTML for each row's cell |
336 | 336 | $row_items = $this->crud->getRowViews($entry, $this->crud); |
337 | 337 |