Skip to content

Commit

Permalink
PHP Linting (Pint)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreia authored and github-actions[bot] committed Aug 16, 2023
1 parent 4e37112 commit 42a6123
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 deletions.
4 changes: 1 addition & 3 deletions config/filament-auditing.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* In case you need to add a column to the AuditsRelationManager that does
* not already exist in the table, you can add it here, and it will be
* prepended to the table builder.
*
*
*/
'audits_extend' => [
// 'url' => [
Expand All @@ -25,6 +23,6 @@
// 'default' => 'N/A'
// ]
// ],
]
],

];
5 changes: 1 addition & 4 deletions resources/lang/ar/filament-auditing.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'column.new_values' => 'القيم الجديدة',
'column.new_values' => 'القيم الجديدة',

/*
/*
|--------------------------------------------------------------------------
| Table Actions
|--------------------------------------------------------------------------
Expand All @@ -40,7 +40,4 @@
'notification.restored' => 'تمت الاستعادة',
'notification.unchanged' => 'لا توجد تعديلات',




];
5 changes: 1 addition & 4 deletions resources/lang/en/filament-auditing.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'column.old_values' => 'Old Values',
'column.new_values' => 'New Values',

/*
/*
|--------------------------------------------------------------------------
| Table Actions
|--------------------------------------------------------------------------
Expand All @@ -39,7 +39,4 @@
'notification.restored' => 'Audit restored',
'notification.unchanged' => 'Nothing to change',




];
3 changes: 0 additions & 3 deletions resources/lang/es/filament-auditing.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,4 @@
'notification.restored' => 'Auditoría restaurada',
'notification.unchanged' => 'Nada que cambiar',




];
14 changes: 5 additions & 9 deletions src/RelationManagers/AuditsRelationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

namespace Tapp\FilamentAuditing\RelationManagers;

use Filament\Forms;
use Filament\Notifications\Notification;
use Filament\Resources\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables\Table;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Relation;
Expand Down Expand Up @@ -48,7 +46,7 @@ public function table(Table $table): Table
Tables\Columns\ViewColumn::make('new_values')
->view('filament-auditing::tables.columns.key-value')
->label(trans('filament-auditing::filament-auditing.column.new_values')),
self::extraColumns()
self::extraColumns(),
]))
->filters([
//
Expand Down Expand Up @@ -77,9 +75,9 @@ protected static function extraColumns()
return Arr::map(config('filament-auditing.audits_extend'), function ($buildParameters, $columnName) {
return collect($buildParameters)->pipeThrough([
function ($collection) use ($columnName) {
$columnClass = (string)$collection->get('class');
$columnClass = (string) $collection->get('class');

if (!is_null($collection->get('methods'))) {
if (! is_null($collection->get('methods'))) {
$columnClass = $columnClass::make($columnName);

collect($collection->get('methods'))->transform(function ($value, $key) use ($columnClass) {
Expand All @@ -105,7 +103,7 @@ protected static function restoreAuditSelected($audit)

$record = $morphClass::find($audit->auditable_id);

if (!$record) {
if (! $record) {
self::unchangedAuditNotification();

return;
Expand Down Expand Up @@ -136,8 +134,6 @@ protected static function restoreAuditSelected($audit)

self::restoredAuditNotification();

$refresh;

return;
}

Expand Down

0 comments on commit 42a6123

Please sign in to comment.