diff --git a/CHANGELOG.md b/CHANGELOG.md
index edd9421c..616da50a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,21 @@ This project follows [Semantic Versioning](CONTRIBUTING.md).
---
+## v11.0.0 - 03/27/2024
+
+- Add Laravel 11.x Support
+- Update Change Log
+
+## v10.0.0 - 03/17/2023
+
+- Add Laravel 10.x Support
+- Update Change Log
+
+## v9.0.0 - 06/29/2022
+
+- Add Laravel 9.x Support
+- Update Change Log
+
## v8.0.0 - 10/30/2020
- Add Laravel 8.x Support
diff --git a/README.md b/README.md
index 28c3acaa..bfcb249b 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,8 @@ Manage your `Laravel Schedule` from a pretty dashboard. Schedule your `Laravel C
| Laravel | Totem |
| :-------------------------------- | ------------------------------: |
+| 11.x | 11.x |
+| 10.x | 10.x |
| 9.x | 9.x |
| 8.x | 8.x |
| 7.x | 7.x |
diff --git a/config/totem.php b/config/totem.php
index 2bebe905..91d4d313 100644
--- a/config/totem.php
+++ b/config/totem.php
@@ -1,217 +1,217 @@
[
+ 'frequencies' => [
[
- 'label' => 'Every Minute',
- 'interval' => 'everyMinute',
- 'parameters' => false,
+ 'label' => 'Every Minute',
+ 'interval' => 'everyMinute',
+ 'parameters' => false,
],
[
- 'label' => 'Every Five Minutes',
- 'interval' => 'everyFiveMinutes',
- 'parameters' => false,
+ 'label' => 'Every Five Minutes',
+ 'interval' => 'everyFiveMinutes',
+ 'parameters' => false,
],
[
- 'label' => 'Every Ten Minutes',
- 'interval' => 'everyTenMinutes',
- 'parameters' => false,
+ 'label' => 'Every Ten Minutes',
+ 'interval' => 'everyTenMinutes',
+ 'parameters' => false,
],
[
- 'label' => 'Every Thirty Minutes',
- 'interval' => 'everyThirtyMinutes',
- 'parameters' => false,
+ 'label' => 'Every Thirty Minutes',
+ 'interval' => 'everyThirtyMinutes',
+ 'parameters' => false,
],
[
- 'label' => 'Hourly',
- 'interval' => 'hourly',
- 'parameters' => false,
+ 'label' => 'Hourly',
+ 'interval' => 'hourly',
+ 'parameters' => false,
],
[
- 'label' => 'Hourly at',
- 'interval' => 'hourlyAt',
- 'parameters' => [
+ 'label' => 'Hourly at',
+ 'interval' => 'hourlyAt',
+ 'parameters' => [
[
- 'label' => 'At',
- 'name' => 'at',
- 'type' => 'number',
- 'min' => '0',
- 'max' => '59',
+ 'label' => 'At',
+ 'name' => 'at',
+ 'type' => 'number',
+ 'min' => '0',
+ 'max' => '59',
],
],
],
[
- 'label' => 'Daily',
- 'interval' => 'daily',
- 'parameters' => false,
+ 'label' => 'Daily',
+ 'interval' => 'daily',
+ 'parameters' => false,
],
[
- 'label' => 'Daily at',
- 'interval' => 'dailyAt',
- 'parameters' => [
+ 'label' => 'Daily at',
+ 'interval' => 'dailyAt',
+ 'parameters' => [
[
- 'label' => 'At',
- 'name' => 'at',
- 'type' => 'time',
+ 'label' => 'At',
+ 'name' => 'at',
+ 'type' => 'time',
],
],
],
[
- 'label' => 'Twice Daily',
- 'interval' => 'twiceDaily',
- 'parameters' => [
+ 'label' => 'Twice Daily',
+ 'interval' => 'twiceDaily',
+ 'parameters' => [
[
- 'label' => 'First',
- 'name' => 'at',
- 'type' => 'time',
+ 'label' => 'First',
+ 'name' => 'at',
+ 'type' => 'time',
],
[
- 'label' => 'Second',
- 'name' => 'second_at',
- 'type' => 'time',
+ 'label' => 'Second',
+ 'name' => 'second_at',
+ 'type' => 'time',
],
],
],
[
- 'label' => 'Weekly',
- 'interval' => 'weekly',
- 'parameters' => false,
+ 'label' => 'Weekly',
+ 'interval' => 'weekly',
+ 'parameters' => false,
],
[
- 'label' => 'Weekly On',
- 'interval' => 'weeklyOn',
- 'parameters' => [
+ 'label' => 'Weekly On',
+ 'interval' => 'weeklyOn',
+ 'parameters' => [
[
- 'label' => 'On',
- 'name' => 'on',
- 'type' => 'number',
- 'min' => '1',
- 'max' => '31',
+ 'label' => 'On',
+ 'name' => 'on',
+ 'type' => 'number',
+ 'min' => '1',
+ 'max' => '31',
],
[
- 'label' => 'At',
- 'name' => 'at',
- 'type' => 'time',
+ 'label' => 'At',
+ 'name' => 'at',
+ 'type' => 'time',
],
],
],
[
- 'label' => 'Monthly',
- 'interval' => 'monthly',
- 'parameters' => false,
+ 'label' => 'Monthly',
+ 'interval' => 'monthly',
+ 'parameters' => false,
],
[
- 'label' => 'Monthly On',
- 'interval' => 'monthlyOn',
- 'parameters' => [
+ 'label' => 'Monthly On',
+ 'interval' => 'monthlyOn',
+ 'parameters' => [
[
- 'label' => 'On',
- 'name' => 'on',
- 'type' => 'number',
- 'max' => '',
+ 'label' => 'On',
+ 'name' => 'on',
+ 'type' => 'number',
+ 'max' => '',
],
[
- 'label' => 'At',
- 'name' => 'at',
- 'type' => 'time',
+ 'label' => 'At',
+ 'name' => 'at',
+ 'type' => 'time',
],
],
],
[
- 'label' => 'Twice Monthly',
- 'interval' => 'twiceMonthly',
- 'parameters' => [
+ 'label' => 'Twice Monthly',
+ 'interval' => 'twiceMonthly',
+ 'parameters' => [
[
- 'label' => 'First',
- 'name' => 'on',
- 'type' => 'number',
+ 'label' => 'First',
+ 'name' => 'on',
+ 'type' => 'number',
],
[
- 'label' => 'Second',
- 'name' => 'second_at',
- 'type' => 'text',
+ 'label' => 'Second',
+ 'name' => 'second_at',
+ 'type' => 'text',
],
],
],
[
- 'label' => 'Quarterly',
- 'interval' => 'quarterly',
- 'parameters' => false,
+ 'label' => 'Quarterly',
+ 'interval' => 'quarterly',
+ 'parameters' => false,
],
[
- 'label' => 'Yearly',
- 'interval' => 'yearly',
- 'parameters' => false,
+ 'label' => 'Yearly',
+ 'interval' => 'yearly',
+ 'parameters' => false,
],
[
- 'label' => 'Weekdays',
- 'interval' => 'weekdays',
- 'parameters' => false,
+ 'label' => 'Weekdays',
+ 'interval' => 'weekdays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Sunday',
- 'interval' => 'sundays',
- 'parameters' => false,
+ 'label' => 'Every Sunday',
+ 'interval' => 'sundays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Monday',
- 'interval' => 'mondays',
- 'parameters' => false,
+ 'label' => 'Every Monday',
+ 'interval' => 'mondays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Tuesday',
- 'interval' => 'tuesdays',
- 'parameters' => false,
+ 'label' => 'Every Tuesday',
+ 'interval' => 'tuesdays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Wednesday',
- 'interval' => 'wednesdays',
- 'parameters' => false,
+ 'label' => 'Every Wednesday',
+ 'interval' => 'wednesdays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Thursday',
- 'interval' => 'thursdays',
- 'parameters' => false,
+ 'label' => 'Every Thursday',
+ 'interval' => 'thursdays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Friday',
- 'interval' => 'fridays',
- 'parameters' => false,
+ 'label' => 'Every Friday',
+ 'interval' => 'fridays',
+ 'parameters' => false,
],
[
- 'label' => 'Every Saturday',
- 'interval' => 'saturdays',
- 'parameters' => false,
+ 'label' => 'Every Saturday',
+ 'interval' => 'saturdays',
+ 'parameters' => false,
],
[
- 'label' => 'Between',
- 'interval' => 'between',
- 'parameters' => [
+ 'label' => 'Between',
+ 'interval' => 'between',
+ 'parameters' => [
[
- 'label' => 'Start',
- 'name' => 'start',
- 'type' => 'time',
+ 'label' => 'Start',
+ 'name' => 'start',
+ 'type' => 'time',
],
[
- 'label' => 'End',
- 'name' => 'end',
- 'type' => 'time',
+ 'label' => 'End',
+ 'name' => 'end',
+ 'type' => 'time',
],
],
],
[
- 'label' => 'Unless Between',
- 'interval' => 'unlessBetween',
- 'parameters' => [
+ 'label' => 'Unless Between',
+ 'interval' => 'unlessBetween',
+ 'parameters' => [
[
- 'label' => 'Start',
- 'name' => 'start',
- 'type' => 'time',
+ 'label' => 'Start',
+ 'name' => 'start',
+ 'type' => 'time',
],
[
- 'label' => 'End',
- 'name' => 'end',
- 'type' => 'time',
+ 'label' => 'End',
+ 'name' => 'end',
+ 'type' => 'time',
],
],
],
diff --git a/database/factories/TotemResultFactory.php b/database/factories/TotemResultFactory.php
index 9fd87934..7d913f1c 100644
--- a/database/factories/TotemResultFactory.php
+++ b/database/factories/TotemResultFactory.php
@@ -12,12 +12,12 @@ class TotemResultFactory extends Factory
public function definition()
{
return [
- 'task_id' => $this->faker->randomDigit,
- 'ran_at' => $this->faker->dateTimeBetween('-1 hour'),
- 'duration' => (string) $this->faker->randomFloat(11, 0, 8000000),
- 'result' => $this->faker->sentence,
- 'created_at' => $this->faker->dateTimeBetween('-1 year', '-6 months'),
- 'updated_at' => $this->faker->dateTimeBetween('-6 months'),
+ 'task_id' => $this->faker->randomDigit,
+ 'ran_at' => $this->faker->dateTimeBetween('-1 hour'),
+ 'duration' => (string) $this->faker->randomFloat(11, 0, 8000000),
+ 'result' => $this->faker->sentence,
+ 'created_at' => $this->faker->dateTimeBetween('-1 year', '-6 months'),
+ 'updated_at' => $this->faker->dateTimeBetween('-6 months'),
];
}
}
diff --git a/database/factories/TotemTaskFactory.php b/database/factories/TotemTaskFactory.php
index 4e48a285..097d661b 100644
--- a/database/factories/TotemTaskFactory.php
+++ b/database/factories/TotemTaskFactory.php
@@ -12,9 +12,9 @@ class TotemTaskFactory extends Factory
public function definition()
{
return [
- 'description' => $this->faker->sentence,
- 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
- 'expression' => '* * * * *',
+ 'description' => $this->faker->sentence,
+ 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
+ 'expression' => '* * * * *',
];
}
}
diff --git a/database/factories/TotemUserFactory.php b/database/factories/TotemUserFactory.php
index 73a4616f..9047f855 100644
--- a/database/factories/TotemUserFactory.php
+++ b/database/factories/TotemUserFactory.php
@@ -15,9 +15,9 @@ public function definition()
static $password;
return [
- 'name' => $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- 'password' => $password ?: $password = bcrypt('secret'),
+ 'name' => $this->faker->name,
+ 'email' => $this->faker->unique()->safeEmail,
+ 'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => Str::random(10),
];
}
diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php
index 2312ad0c..5f99d987 100644
--- a/resources/lang/en/messages.php
+++ b/resources/lang/en/messages.php
@@ -1,9 +1,9 @@
[
- 'create' => 'Task Created Successfully.',
- 'update' => 'Task Updated Successfully',
- 'delete' => 'Task Deleted Successfully',
+ 'success' => [
+ 'create' => 'Task Created Successfully.',
+ 'update' => 'Task Updated Successfully',
+ 'delete' => 'Task Deleted Successfully',
],
];
diff --git a/src/Console/Commands/ListSchedule.php b/src/Console/Commands/ListSchedule.php
index 2fda418f..de84ab13 100644
--- a/src/Console/Commands/ListSchedule.php
+++ b/src/Console/Commands/ListSchedule.php
@@ -52,15 +52,15 @@ public function handle()
if (count($this->schedule->events()) > 0) {
$events = collect($this->schedule->events())->map(function ($event) {
return [
- 'description' => $event->description ?: 'N/A',
- 'command' => ltrim(strtok(Str::after($event->command, "'artisan'"), ' ')),
- 'schedule' => $event->expression,
- 'upcoming' => $this->upcoming($event),
- 'timezone' => $event->timezone ?: config('app.timezone'),
- 'overlaps' => $event->withoutOverlapping ? 'No' : 'Yes',
- 'maintenance' => $event->evenInMaintenanceMode ? 'Yes' : 'No',
- 'one_server' => $event->onOneServer ? 'Yes' : 'No',
- 'in_background' => $event->runInBackground ? 'Yes' : 'No',
+ 'description' => $event->description ?: 'N/A',
+ 'command' => ltrim(strtok(Str::after($event->command, "'artisan'"), ' ')),
+ 'schedule' => $event->expression,
+ 'upcoming' => $this->upcoming($event),
+ 'timezone' => $event->timezone ?: config('app.timezone'),
+ 'overlaps' => $event->withoutOverlapping ? 'No' : 'Yes',
+ 'maintenance' => $event->evenInMaintenanceMode ? 'Yes' : 'No',
+ 'one_server' => $event->onOneServer ? 'Yes' : 'No',
+ 'in_background' => $event->runInBackground ? 'Yes' : 'No',
];
});
@@ -86,6 +86,6 @@ protected function upcoming($event)
$date->setTimezone($event->timezone);
}
- return (CronExpression::factory($event->expression)->getNextRunDate($date->toDateTimeString()))->format('Y-m-d H:i:s');
+ return CronExpression::factory($event->expression)->getNextRunDate($date->toDateTimeString())->format('Y-m-d H:i:s');
}
}
diff --git a/src/Console/Commands/PublishAssets.php b/src/Console/Commands/PublishAssets.php
index 383460c0..3a5367d6 100644
--- a/src/Console/Commands/PublishAssets.php
+++ b/src/Console/Commands/PublishAssets.php
@@ -28,7 +28,7 @@ class PublishAssets extends Command
public function handle()
{
$this->call('vendor:publish', [
- '--tag' => 'totem-assets',
+ '--tag' => 'totem-assets',
'--force' => true,
]);
}
diff --git a/src/Events/Deleting.php b/src/Events/Deleting.php
index 0d4cca5b..606868b2 100644
--- a/src/Events/Deleting.php
+++ b/src/Events/Deleting.php
@@ -9,7 +9,7 @@ class Deleting extends Event
/**
* Deleting constructor.
*
- * @param $taskId
+ * @param $taskId
*/
public function __construct($taskId)
{
diff --git a/src/Events/Executed.php b/src/Events/Executed.php
index b5dc6d69..91aed61e 100644
--- a/src/Events/Executed.php
+++ b/src/Events/Executed.php
@@ -12,7 +12,7 @@ class Executed extends BroadcastingEvent
*
* @param Task $task
* @param string|float|int $started
- * @param $output
+ * @param $output
*/
public function __construct(Task $task, $started, $output)
{
@@ -21,8 +21,8 @@ public function __construct(Task $task, $started, $output)
$time_elapsed_secs = microtime(true) - $started;
$task->results()->create([
- 'duration' => $time_elapsed_secs * 1000,
- 'result' => $output,
+ 'duration' => $time_elapsed_secs * 1000,
+ 'result' => $output,
]);
$task->notify(new TaskCompleted($output));
diff --git a/src/Http/Controllers/ExecuteTasksController.php b/src/Http/Controllers/ExecuteTasksController.php
index f353a78f..6fb6b1ab 100644
--- a/src/Http/Controllers/ExecuteTasksController.php
+++ b/src/Http/Controllers/ExecuteTasksController.php
@@ -25,7 +25,7 @@ public function __construct(TaskInterface $tasks)
/**
* Execute a specific task.
*
- * @param $task
+ * @param $task
* @return \Illuminate\Http\Response
*/
public function index($task)
diff --git a/src/Http/Controllers/ExportTasksController.php b/src/Http/Controllers/ExportTasksController.php
index 4600c537..c89ac57a 100644
--- a/src/Http/Controllers/ExportTasksController.php
+++ b/src/Http/Controllers/ExportTasksController.php
@@ -42,6 +42,6 @@ public function index(): StreamedResponse
->streamDownload(function () {
echo $this->tasks->findAll()->toJson();
}, 'tasks.json',
- $headers);
+ $headers);
}
}
diff --git a/src/Http/Controllers/TasksController.php b/src/Http/Controllers/TasksController.php
index d6ab3057..383267ad 100644
--- a/src/Http/Controllers/TasksController.php
+++ b/src/Http/Controllers/TasksController.php
@@ -44,7 +44,7 @@ public function index(): View
'description',
'last_ran_at',
'average_runtime',
- ], ['description'=>'asc'])
+ ], ['description' => 'asc'])
->when(request('q'), function (Builder $query) {
$query->where('description', 'LIKE', '%'.request('q').'%');
})
@@ -65,10 +65,10 @@ public function create(): View
});
return view('totem::tasks.form', [
- 'task' => new Task,
- 'commands' => $commands,
- 'timezones' => timezone_identifiers_list(),
- 'frequencies' => Totem::frequencies(),
+ 'task' => new Task,
+ 'commands' => $commands,
+ 'timezones' => timezone_identifiers_list(),
+ 'frequencies' => Totem::frequencies(),
]);
}
@@ -96,7 +96,7 @@ public function store(TaskRequest $request): RedirectResponse
public function view(Task $task)
{
return view('totem::tasks.view', [
- 'task' => $task,
+ 'task' => $task,
]);
}
@@ -113,10 +113,10 @@ public function edit(Task $task): View
});
return view('totem::tasks.form', [
- 'task' => $task,
- 'commands' => $commands,
- 'timezones' => timezone_identifiers_list(),
- 'frequencies' => Totem::frequencies(),
+ 'task' => $task,
+ 'commands' => $commands,
+ 'timezones' => timezone_identifiers_list(),
+ 'frequencies' => Totem::frequencies(),
]);
}
@@ -124,7 +124,7 @@ public function edit(Task $task): View
* Update the specified task in storage.
*
* @param TaskRequest $request
- * @param $task
+ * @param $task
* @return RedirectResponse
*/
public function update(TaskRequest $request, Task $task): RedirectResponse
diff --git a/src/Http/Requests/ImportRequest.php b/src/Http/Requests/ImportRequest.php
index 3c9632d6..9fa310f2 100644
--- a/src/Http/Requests/ImportRequest.php
+++ b/src/Http/Requests/ImportRequest.php
@@ -39,9 +39,9 @@ public function rules()
public function messages()
{
return [
- 'tasks.required' => 'Please select a file to import',
- 'tasks.file' => 'Please select a file to import',
- 'tasks.json_file' => 'Please select a json file',
+ 'tasks.required' => 'Please select a file to import',
+ 'tasks.file' => 'Please select a file to import',
+ 'tasks.json_file' => 'Please select a json file',
'content' => 'File does not contain valid json',
];
}
diff --git a/src/Http/Requests/TaskRequest.php b/src/Http/Requests/TaskRequest.php
index 8813cf4b..26d20338 100644
--- a/src/Http/Requests/TaskRequest.php
+++ b/src/Http/Requests/TaskRequest.php
@@ -24,12 +24,12 @@ public function authorize()
public function rules()
{
return [
- 'description' => 'required',
- 'command' => 'required',
- 'expression' => 'nullable|required_if:type,expression|cron_expression',
- 'frequencies' => 'required_if:type,frequency|array',
+ 'description' => 'required',
+ 'command' => 'required',
+ 'expression' => 'nullable|required_if:type,expression|cron_expression',
+ 'frequencies' => 'required_if:type,frequency|array',
'notification_email_address' => 'nullable|email',
- 'notification_phone_number' => 'nullable|digits_between:11,13',
+ 'notification_phone_number' => 'nullable|digits_between:11,13',
'notification_slack_webhook' => 'nullable|url',
];
}
@@ -42,15 +42,15 @@ public function rules()
public function messages()
{
return [
- 'description.required' => 'Task description is required',
- 'command.required' => 'Please select a command',
- 'expression.required_if' => 'Cron Expression is required if task type is expression',
- 'frequencies.required_if' => 'At least one frequency is required',
- 'frequencies.array' => 'At least one frequency is required',
- 'cron_expression' => 'This is not a valid cron expression.',
- 'notification_email_address.email' => 'Email address is not valid',
- 'notification_phone_number.digits_between' => 'Phone number should be between 11 and 13 digits including country code',
- 'notification_slack_webhook.url' => 'Slack Webhook must be a valid url',
+ 'description.required' => 'Task description is required',
+ 'command.required' => 'Please select a command',
+ 'expression.required_if' => 'Cron Expression is required if task type is expression',
+ 'frequencies.required_if' => 'At least one frequency is required',
+ 'frequencies.array' => 'At least one frequency is required',
+ 'cron_expression' => 'This is not a valid cron expression.',
+ 'notification_email_address.email' => 'Email address is not valid',
+ 'notification_phone_number.digits_between' => 'Phone number should be between 11 and 13 digits including country code',
+ 'notification_slack_webhook.url' => 'Slack Webhook must be a valid url',
];
}
diff --git a/src/Providers/TotemEventServiceProvider.php b/src/Providers/TotemEventServiceProvider.php
index e5798e03..027e3dbc 100644
--- a/src/Providers/TotemEventServiceProvider.php
+++ b/src/Providers/TotemEventServiceProvider.php
@@ -7,10 +7,10 @@
class TotemEventServiceProvider extends EventServiceProvider
{
protected $listen = [
- 'Studio\Totem\Events\Created' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
- 'Studio\Totem\Events\Updated' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
- 'Studio\Totem\Events\Activated' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
+ 'Studio\Totem\Events\Created' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
+ 'Studio\Totem\Events\Updated' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
+ 'Studio\Totem\Events\Activated' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
'Studio\Totem\Events\Deactivated' => ['Studio\Totem\Listeners\BustCache', 'Studio\Totem\Listeners\BuildCache'],
- 'Studio\Totem\Events\Deleting' => ['Studio\Totem\Listeners\BustCacheImmediately'],
+ 'Studio\Totem\Events\Deleting' => ['Studio\Totem\Listeners\BustCacheImmediately'],
];
}
diff --git a/src/Repositories/EloquentTaskRepository.php b/src/Repositories/EloquentTaskRepository.php
index bf2b3d82..702df732 100644
--- a/src/Repositories/EloquentTaskRepository.php
+++ b/src/Repositories/EloquentTaskRepository.php
@@ -148,7 +148,7 @@ public function destroy(Task|int $id): bool
/**
* Activate the given task.
*
- * @param $input
+ * @param $input
* @return Task
*/
public function activate($input): Task
@@ -165,7 +165,7 @@ public function activate($input): Task
/**
* Deactivate the given task.
*
- * @param $id
+ * @param $id
* @return Task
*/
public function deactivate($id): Task
@@ -204,7 +204,7 @@ public function execute(Task|int $id): Task
/**
* Import tasks.
*
- * @param $input
+ * @param $input
* @return void
*/
public function import($input): void
diff --git a/src/Traits/FrontendSortable.php b/src/Traits/FrontendSortable.php
index 01339318..625795db 100644
--- a/src/Traits/FrontendSortable.php
+++ b/src/Traits/FrontendSortable.php
@@ -20,7 +20,7 @@ public function scopeSortableBy(Builder $builder, array $sortableColumns, array
return $builder->when($sorted, function (Builder $query) use ($request) {
$query->orderBy(
$request->input('sort_by'),
- (($request->input('sort_direction', 'asc') == 'desc') ? 'desc' : 'asc')
+ ($request->input('sort_direction', 'asc') == 'desc') ? 'desc' : 'asc'
);
}, function (Builder $query) use ($defaultSort) {
foreach ($defaultSort as $key => $direction) {
diff --git a/src/Traits/HasFrequencies.php b/src/Traits/HasFrequencies.php
index a4f5b631..0f9ba212 100644
--- a/src/Traits/HasFrequencies.php
+++ b/src/Traits/HasFrequencies.php
@@ -8,11 +8,12 @@
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Arr;
-use function json_decode;
-use function request;
use Studio\Totem\Frequency;
use Studio\Totem\Task;
+use function json_decode;
+use function request;
+
trait HasFrequencies
{
use ManagesFrequencies;
diff --git a/tests/Feature/AuthTest.php b/tests/Feature/AuthTest.php
index 8ff4c8e5..8180c7a5 100644
--- a/tests/Feature/AuthTest.php
+++ b/tests/Feature/AuthTest.php
@@ -32,8 +32,7 @@ public function auth_middleware_works()
$middleware = new Authenticate;
$response = $middleware->handle(
- new class
- {
+ new class {
},
function ($value) {
return 'response';
@@ -56,8 +55,7 @@ public function auth_middleware_responds_with_403_on_failure()
$middleware = new Authenticate;
$response = $middleware->handle(
- new class
- {
+ new class {
},
function ($value) {
return 'response';
diff --git a/tests/Feature/CreateTaskTest.php b/tests/Feature/CreateTaskTest.php
index c9791c38..78085184 100644
--- a/tests/Feature/CreateTaskTest.php
+++ b/tests/Feature/CreateTaskTest.php
@@ -30,10 +30,10 @@ public function user_can_create_task_with_cron_expression()
$this->disableExceptionHandling()->signIn();
$response = $this->post(route('totem.task.create'), [
- 'description' => 'List All Scheduled Commands',
- 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
- 'type' => 'cron',
- 'cron' => '* * * * *',
+ 'description' => 'List All Scheduled Commands',
+ 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
+ 'type' => 'cron',
+ 'cron' => '* * * * *',
]);
$response->assertRedirect(route('totem.tasks.all'));
@@ -45,16 +45,16 @@ public function user_can_create_task_with_frequencies()
$this->disableExceptionHandling()->signIn();
$response = $this->post(route('totem.task.create'), [
- 'description' => 'List All Scheduled Commands',
- 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
- 'type' => 'frequency',
- 'frequencies' => [
+ 'description' => 'List All Scheduled Commands',
+ 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
+ 'type' => 'frequency',
+ 'frequencies' => [
[
- 'interval' => 'dailyAt',
- 'label' => 'Daily',
+ 'interval' => 'dailyAt',
+ 'label' => 'Daily',
'parameters' => [
[
- 'name' => 'at',
+ 'name' => 'at',
'value' => '22:30',
],
],
diff --git a/tests/Feature/EditTaskTest.php b/tests/Feature/EditTaskTest.php
index 82d109cf..365ff443 100644
--- a/tests/Feature/EditTaskTest.php
+++ b/tests/Feature/EditTaskTest.php
@@ -32,10 +32,10 @@ public function user_can_edit_task()
$this->disableExceptionHandling()->signIn();
$task = Task::factory()->create();
$response = $this->post(route('totem.task.edit', $task), [
- 'description' => 'List All Scheduled Commands',
- 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
- 'type' => 'cron',
- 'expression' => '5 * * * *',
+ 'description' => 'List All Scheduled Commands',
+ 'command' => 'Studio\Totem\Console\Commands\ListSchedule',
+ 'type' => 'cron',
+ 'expression' => '5 * * * *',
]);
$response->assertSessionHas('task');