77trait ViewsAndRestoresRevisions
88{
99 /**
10- * Build a list of Revisions, grouped by revision date
10+ * Build a list of Revisions, grouped by revision date.
1111 *
1212 * @return [Array] of revision groups, keyed by revision date
1313 */
1414 public function listRevisions ($ id )
1515 {
1616 $ revisions = [];
1717 // Group revisions by change date
18- foreach ($ this ->getEntry ($ id )->revisionHistory as $ history ) {
18+ foreach ($ this ->getEntry ($ id )->revisionHistory as $ history ) {
1919
2020 // 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 ));
2222
2323 // Be sure to instantiate the initial grouping array
24- if (! array_key_exists ($ revisionDate , $ revisions )) {
24+ if (! array_key_exists ($ revisionDate , $ revisions )) {
2525 $ revisions [$ revisionDate ] = [];
2626 }
2727
@@ -36,12 +36,13 @@ public function listRevisions($id)
3636 }
3737
3838 /**
39- * Restore a single revision
39+ * Restore a single revision.
4040 *
4141 * @param [int] $id The ID of the source CRUD Model instance to update
4242 * @param [int] $revisionId The ID of the revision to use for the update
4343 */
44- public function restoreRevision ($ id , $ revisionId ) {
44+ public function restoreRevision ($ id , $ revisionId )
45+ {
4546 $ entry = $ this ->getEntry ($ id );
4647 $ revision = Revision::findOrFail ($ revisionId );
4748
0 commit comments