@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function table(Table $table): Table |
| 44 | 44 | { |
| 45 | 45 | return $table |
| 46 | - ->modifyQueryUsing(function ($query) { |
|
| 46 | + ->modifyQueryUsing(function($query) { |
|
| 47 | 47 | return $query->withCount(['likes', 'reports']); |
| 48 | 48 | }) |
| 49 | 49 | ->recordTitleAttribute('id') |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | ->limit(100) |
| 61 | 61 | ->wrap() |
| 62 | 62 | ->searchable() |
| 63 | - ->formatStateUsing(function (Comment $record) { |
|
| 63 | + ->formatStateUsing(function(Comment $record) { |
|
| 64 | 64 | return strip_tags($record->presenter()->markdownBody()); |
| 65 | 65 | }), |
| 66 | 66 | Tables\Columns\TextColumn::make('likes_count') |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | |
| 145 | 145 | file_put_contents( |
| 146 | 146 | $configPath, |
| 147 | - "<?php\n\nreturn " . var_export($config, true) . ";\n" |
|
| 147 | + "<?php\n\nreturn ".var_export($config, true).";\n" |
|
| 148 | 148 | ); |
| 149 | 149 | |
| 150 | 150 | // Clear config cache |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | $channels = config('commentify.notification_channels', ['database']); |
| 31 | 31 | |
| 32 | - return array_filter($channels, function ($channel) { |
|
| 32 | + return array_filter($channels, function($channel) { |
|
| 33 | 33 | return in_array($channel, ['database', 'mail', 'broadcast']); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | ->line(__('commentify::commentify.notifications.comment_liked_line')) |
| 45 | 45 | ->action( |
| 46 | 46 | __('commentify::commentify.notifications.view_comment'), |
| 47 | - url('/comments/' . $this->event->comment->id) |
|
| 47 | + url('/comments/'.$this->event->comment->id) |
|
| 48 | 48 | ); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | $channels = config('commentify.notification_channels', ['database']); |
| 31 | 31 | |
| 32 | - return array_filter($channels, function ($channel) { |
|
| 32 | + return array_filter($channels, function($channel) { |
|
| 33 | 33 | return in_array($channel, ['database', 'mail', 'broadcast']); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ])) |
| 47 | 47 | ->action( |
| 48 | 48 | __('commentify::commentify.notifications.view_comment'), |
| 49 | - url('/comments/' . $this->event->comment->id) |
|
| 49 | + url('/comments/'.$this->event->comment->id) |
|
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | ->color('success') |
| 124 | 124 | ->requiresConfirmation() |
| 125 | 125 | ->visible(fn (CommentReport $record) => $record->status === 'pending') |
| 126 | - ->action(function (CommentReport $record) { |
|
| 126 | + ->action(function(CommentReport $record) { |
|
| 127 | 127 | $record->update([ |
| 128 | 128 | 'status' => 'reviewed', |
| 129 | 129 | 'reviewed_by' => auth()->id(), |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | ->color('danger') |
| 137 | 137 | ->requiresConfirmation() |
| 138 | 138 | ->visible(fn (CommentReport $record) => $record->status === 'pending') |
| 139 | - ->action(function (CommentReport $record) { |
|
| 139 | + ->action(function(CommentReport $record) { |
|
| 140 | 140 | $record->update([ |
| 141 | 141 | 'status' => 'dismissed', |
| 142 | 142 | 'reviewed_by' => auth()->id(), |
@@ -154,8 +154,8 @@ discard block |
||
| 154 | 154 | ->icon('heroicon-o-check-circle') |
| 155 | 155 | ->color('success') |
| 156 | 156 | ->requiresConfirmation() |
| 157 | - ->action(function ($records) { |
|
| 158 | - $records->each(function (CommentReport $record) { |
|
| 157 | + ->action(function($records) { |
|
| 158 | + $records->each(function(CommentReport $record) { |
|
| 159 | 159 | $record->update([ |
| 160 | 160 | 'status' => 'reviewed', |
| 161 | 161 | 'reviewed_by' => auth()->id(), |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public function register(): void |
| 20 | 20 | { |
| 21 | - $this->app->bind(CommentPolicy::class, function ($app) { |
|
| 21 | + $this->app->bind(CommentPolicy::class, function($app) { |
|
| 22 | 22 | return new CommentPolicy; |
| 23 | 23 | }); |
| 24 | 24 | |
@@ -36,38 +36,38 @@ discard block |
||
| 36 | 36 | if ($this->app->runningInConsole()) { |
| 37 | 37 | // Publish config file |
| 38 | 38 | $this->publishes([ |
| 39 | - __DIR__ . '/../../config/commentify.php' => config_path('commentify.php'), |
|
| 39 | + __DIR__.'/../../config/commentify.php' => config_path('commentify.php'), |
|
| 40 | 40 | ], 'commentify-config'); |
| 41 | 41 | |
| 42 | 42 | $this->publishes([ |
| 43 | - __DIR__ . '/../../tailwind.config.js' => base_path('tailwind.config.js'), |
|
| 43 | + __DIR__.'/../../tailwind.config.js' => base_path('tailwind.config.js'), |
|
| 44 | 44 | ], 'commentify-tailwind-config'); |
| 45 | 45 | |
| 46 | 46 | // Publish Tailwind views |
| 47 | 47 | $this->publishes([ |
| 48 | - __DIR__ . '/../../resources/views/tailwind' => resource_path('views/vendor/commentify'), |
|
| 48 | + __DIR__.'/../../resources/views/tailwind' => resource_path('views/vendor/commentify'), |
|
| 49 | 49 | ], 'commentify-tailwind-views'); |
| 50 | 50 | |
| 51 | 51 | // Publish Bootstrap views |
| 52 | 52 | $this->publishes([ |
| 53 | - __DIR__ . '/../../resources/views/bootstrap' => resource_path('views/vendor/commentify'), |
|
| 53 | + __DIR__.'/../../resources/views/bootstrap' => resource_path('views/vendor/commentify'), |
|
| 54 | 54 | ], 'commentify-bootstrap-views'); |
| 55 | 55 | |
| 56 | 56 | // Only register Filament views for publishing if Filament is installed |
| 57 | 57 | if (class_exists(\Filament\Filament::class)) { |
| 58 | 58 | $this->publishes([ |
| 59 | - __DIR__ . '/../../resources/views/filament' => resource_path('views/vendor/commentify'), |
|
| 59 | + __DIR__.'/../../resources/views/filament' => resource_path('views/vendor/commentify'), |
|
| 60 | 60 | ], 'commentify-filament-views'); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // Publish language files |
| 64 | 64 | $this->publishes([ |
| 65 | - __DIR__ . '/../../lang' => resource_path('../lang/vendor/commentify'), |
|
| 65 | + __DIR__.'/../../lang' => resource_path('../lang/vendor/commentify'), |
|
| 66 | 66 | ], 'commentify-lang'); |
| 67 | 67 | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - $migrationPath = realpath(__DIR__ . '/../../database/migrations'); |
|
| 70 | + $migrationPath = realpath(__DIR__.'/../../database/migrations'); |
|
| 71 | 71 | if ($migrationPath && is_dir($migrationPath)) { |
| 72 | 72 | $this->loadMigrationsFrom($migrationPath); |
| 73 | 73 | } |
@@ -81,20 +81,20 @@ discard block |
||
| 81 | 81 | $framework = 'tailwind'; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - $frameworkPath = __DIR__ . '/../../resources/views/' . $framework; |
|
| 84 | + $frameworkPath = __DIR__.'/../../resources/views/'.$framework; |
|
| 85 | 85 | |
| 86 | 86 | if (is_dir($frameworkPath)) { |
| 87 | 87 | $this->loadViewsFrom($frameworkPath, 'commentify'); |
| 88 | 88 | } else { |
| 89 | 89 | // Fallback to tailwind if framework directory doesn't exist |
| 90 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views/tailwind', 'commentify'); |
|
| 90 | + $this->loadViewsFrom(__DIR__.'/../../resources/views/tailwind', 'commentify'); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | // Only load Filament views if Filament is installed |
| 94 | 94 | if (class_exists(\Filament\Filament::class)) { |
| 95 | - $filamentPath = __DIR__ . '/../../resources/views/filament'; |
|
| 96 | - $filamentPathTailwind = __DIR__ . '/../../resources/views/tailwind/filament'; |
|
| 97 | - $filamentPathBootstrap = __DIR__ . '/../../resources/views/bootstrap/filament'; |
|
| 95 | + $filamentPath = __DIR__.'/../../resources/views/filament'; |
|
| 96 | + $filamentPathTailwind = __DIR__.'/../../resources/views/tailwind/filament'; |
|
| 97 | + $filamentPathBootstrap = __DIR__.'/../../resources/views/bootstrap/filament'; |
|
| 98 | 98 | |
| 99 | 99 | if (is_dir($filamentPath)) { |
| 100 | 100 | $this->loadViewsFrom($filamentPath, 'commentify'); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'commentify'); |
|
| 108 | + $this->loadTranslationsFrom(__DIR__.'/../../lang', 'commentify'); |
|
| 109 | 109 | Livewire::component('comments', Comments::class); |
| 110 | 110 | Livewire::component('comment', Comment::class); |
| 111 | 111 | Livewire::component('like', Like::class); |