@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | use RevisionableTrait; |
| 12 | 12 | public $timestamps = false; |
| 13 | - protected $fillable = ['value']; |
|
| 13 | + protected $fillable = [ 'value' ]; |
|
| 14 | 14 | protected $table = 'translation__translation_translations'; |
| 15 | 15 | |
| 16 | 16 | protected $revisionEnabled = true; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | protected $historyLimit = 100; |
| 19 | 19 | protected $revisionCreationsEnabled = true; |
| 20 | 20 | |
| 21 | - public function __construct(array $attributes = []) |
|
| 21 | + public function __construct(array $attributes = [ ]) |
|
| 22 | 22 | { |
| 23 | 23 | parent::__construct($attributes); |
| 24 | 24 | $this->historyLimit = config('asgard.translation.config.revision-history-limit', 100); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $translation = $translation->translate($request->get('locale')); |
| 38 | 38 | |
| 39 | 39 | if (null === $translation) { |
| 40 | - return response()->json(['<tr><td>' . trans('translation::translations.No Revisions yet') . '</td></tr>']); |
|
| 40 | + return response()->json([ '<tr><td>' . trans('translation::translations.No Revisions yet') . '</td></tr>' ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return response()->json($this->formatRevisionHistory($translation->revisionHistory)); |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | private function formatRevisionHistory(Collection $revisionHistory) |
| 47 | 47 | { |
| 48 | - $formattedHistory = []; |
|
| 48 | + $formattedHistory = [ ]; |
|
| 49 | 49 | |
| 50 | 50 | foreach ($revisionHistory as $history) { |
| 51 | 51 | if ($history->key == 'created_at' && !$history->old_value) { |
| 52 | - $formattedHistory[] = $this->getCreatedRevisionTemplate($history); |
|
| 52 | + $formattedHistory[ ] = $this->getCreatedRevisionTemplate($history); |
|
| 53 | 53 | } else { |
| 54 | - $formattedHistory[] = $this->getRevisionTemplate($history); |
|
| 54 | + $formattedHistory[ ] = $this->getRevisionTemplate($history); |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | private function getRevisionTemplate($history) |
| 62 | 62 | { |
| 63 | 63 | $timeAgo = $history->created_at->diffForHumans(); |
| 64 | - $revertRoute = route('admin.translation.translation.update', [$history->revisionable_id, 'oldValue' => $history->oldValue()]); |
|
| 64 | + $revertRoute = route('admin.translation.translation.update', [ $history->revisionable_id, 'oldValue' => $history->oldValue() ]); |
|
| 65 | 65 | $edited = trans('translation::translations.edited'); |
| 66 | 66 | return <<<HTML |
| 67 | 67 | <tr> |