@@ -25,11 +25,11 @@ |
||
| 25 | 25 | 'creator_id', |
| 26 | 26 | ]; |
| 27 | 27 | |
| 28 | - protected $primaryKey = 'id'; // TODO: Change to "uid" to make joins withs modules tables possible ??? |
|
| 28 | + protected $primaryKey = 'id'; // TODO: Change to "uid" to make joins withs modules tables possible ??? |
|
| 29 | 29 | public $incrementing = false; |
| 30 | 30 | |
| 31 | 31 | // Allow Eloquent to return id as string instead of int. |
| 32 | - protected $casts = ['id' => 'string']; |
|
| 32 | + protected $casts = [ 'id' => 'string' ]; |
|
| 33 | 33 | |
| 34 | 34 | protected function initTablePrefix() |
| 35 | 35 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | public function getFormattedValueToDisplay(Field $field, $record) : string |
| 76 | 76 | { |
| 77 | 77 | if (isset($field->data->multiple) && $field->data->multiple === true && !empty($record->{$field->column})) { |
| 78 | - $values = []; |
|
| 78 | + $values = [ ]; |
|
| 79 | 79 | |
| 80 | 80 | $fieldValues = json_decode($record->{$field->column}); |
| 81 | 81 | if (is_array($fieldValues)) { |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | continue; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - $values[] = uctrans($value, $field->module); |
|
| 87 | + $values[ ] = uctrans($value, $field->module); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $value = implode(', ', $values); |
| 92 | 92 | } else { |
| 93 | - $value = parent::getFormattedValueToDisplay($field, $record); |
|
| 93 | + $value = parent::getFormattedValueToDisplay($field, $record); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return $value; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $roots = collect(); |
| 61 | 61 | foreach ($rootRecords as $record) { |
| 62 | - $roots[] = $this->getFormattedRecordToAdd($record); |
|
| 62 | + $roots[ ] = $this->getFormattedRecordToAdd($record); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | return $roots; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $children = collect(); |
| 86 | 86 | if ($parentRecord) { |
| 87 | 87 | foreach ($parentRecord->children()->get() as $record) { |
| 88 | - $children[] = $this->getFormattedRecordToAdd($record); |
|
| 88 | + $children[ ] = $this->getFormattedRecordToAdd($record); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |