Skip to content

Commit

Permalink
Format Code
Browse files Browse the repository at this point in the history
  • Loading branch information
awcodes authored and github-actions[bot] committed Aug 5, 2024
1 parent 275908d commit ed116d0
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/curator.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
'multi_select_key' => 'metaKey',
'table' => [
'layout' => 'grid',
]
],
];
2 changes: 1 addition & 1 deletion resources/lang/vi/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'download' => 'Tải xuống',
'remove' => 'Chọn tên tin khác',
'deselect_all' => 'Ẩn tất cả lựa chọn',
'add_multiple_file' => 'Cmd + Click để chọn nhiều tệp tin'
'add_multiple_file' => 'Cmd + Click để chọn nhiều tệp tin',
],
'curation' => [
'thumbnail' => 'Hình ảnh thu nhỏ',
Expand Down
1 change: 0 additions & 1 deletion src/Actions/MediaAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Awcodes\Curator\Actions;

use Awcodes\Curator\Components\Forms\CuratorPicker;
use Awcodes\Curator\Models\Media;
use Filament\Forms\Components\Actions\Action;
use FilamentTiptapEditor\TiptapEditor;
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Forms/CuratorPicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Storage;
Expand Down Expand Up @@ -470,11 +470,13 @@ public function relationship(string | Closure $relationshipName, string | Closur
})->toArray();

$component->state($relatedMedia);

return;
}

$relatedModels = $relationship->getResults();
$component->state($relatedModels);

return;
}

Expand Down Expand Up @@ -509,11 +511,13 @@ public function relationship(string | Closure $relationshipName, string | Closur
});

$relationship->sync($state ?? []);

return;
}

$state = Arr::pluck($state, 'id');
$relationship->sync($state ?? []);

return;
}

Expand Down Expand Up @@ -545,6 +549,7 @@ public function relationship(string | Closure $relationshipName, string | Closur
}
$i++;
}

return;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Modals/CuratorPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function getFiles(int $page = 0, bool $excludeSelected = false): array
return $query->where('directory', $this->directory);
})
->when($this->types, function ($query) {
return $query->where(function($query){
return $query->where(function ($query) {
$types = $this->types;
$query = $query->whereIn('type', $types);
$wildcardTypes = collect($types)->filter(fn ($type) => str_contains($type, '*'));
Expand Down Expand Up @@ -404,7 +404,7 @@ public function destroyAction(): Action
->body(trans('curator::notifications.delete_success'))
->send();
} else {
throw new Exception();
throw new Exception;
}
} catch (Exception) {
Notification::make('curator_delete_error')
Expand Down Expand Up @@ -479,7 +479,7 @@ public function updateFileAction(): Action
->body(trans('curator::notifications.update_success'))
->send();
} else {
throw new Exception();
throw new Exception;
}
} catch (Exception) {
Notification::make('curator_update_error')
Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/HasGlideSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getGliderFallbacks(): ?array
public function getGlideServer(): Server | ServerFactory
{
if (! $this->glideServer) {
return (new DefaultServerFactory())->getFactory();
return (new DefaultServerFactory)->getFactory();
}

return $this->glideServer;
Expand Down
6 changes: 2 additions & 4 deletions src/CuratorPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function register(Panel $panel): void
$this->getResource(),
]);

if (!is_panel_auth_route()) {
if (! is_panel_auth_route()) {
$panel
->renderHook(
'panels::body.end',
Expand All @@ -53,9 +53,7 @@ public function register(Panel $panel): void
}
}

public function boot(Panel $panel): void
{
}
public function boot(Panel $panel): void {}

public static function make(): static
{
Expand Down
3 changes: 1 addition & 2 deletions src/Glide/GlideBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ final public function __construct(
public ?string $markpos = null,
public ?int $markalpha = null,
public ?string $markfit = null,
) {
}
) {}

public static function make(): static
{
Expand Down

0 comments on commit ed116d0

Please sign in to comment.