Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed Aug 21, 2024
1 parent d1ac49d commit a42c51b
Show file tree
Hide file tree
Showing 17 changed files with 319 additions and 286 deletions.
4 changes: 2 additions & 2 deletions Filament/Resources/ScheduleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static function getFormSchema(): array
->placeholder(static::trans('messages.custom-command-here'))
->label(static::trans('messages.custom'))
->required()
->visible(fn (Get $get) => 'custom' === $get('command') && config('filament-database-schedule.commands.enable_custom')),
->visible(fn (Get $get) => $get('command') === 'custom' && config('filament-database-schedule.commands.enable_custom')),
Repeater::make('params')
->schema([
Hidden::make('name'),
Expand Down Expand Up @@ -139,7 +139,7 @@ public static function getFormSchema(): array
*/
TextInput::make('expression')
->placeholder('* * * * *')
->rules([new Corn()])
->rules([new Corn])
->label(static::trans('fields.expression'))
->required()
->helperText(fn () => config('filament-database-schedule.tool-help-cron-expression.enable') ? new HtmlString(" <a href='".config('filament-database-schedule.tool-help-cron-expression.url')."' target='_blank'>".static::trans('messages.help-cron-expression').' </a>') : null),
Expand Down
7 changes: 3 additions & 4 deletions Filament/Widgets/ClockWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Process;

use function Safe\fopen;

use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\StreamOutput;

use function Safe\fopen;

class ClockWidget extends Widget
{
protected static string $view = 'job::filament.widgets.clock-widget';
Expand Down Expand Up @@ -82,7 +81,7 @@ protected function doWrite(string $message, bool $newline): void
};
*/
$resource = fopen('php://stdout', 'w');
if (false === $resource) {
if ($resource === false) {
throw new \Exception('['.__LINE__.']['.__FILE__.']');
}
$output = new StreamOutput($resource);
Expand Down
7 changes: 3 additions & 4 deletions Filament/Widgets/QueueListenWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Process;

use function Safe\fopen;

use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\StreamOutput;

use function Safe\fopen;

class QueueListenWidget extends Widget
{
protected static string $view = 'job::filament.widgets.queue-listen';
Expand Down Expand Up @@ -82,7 +81,7 @@ protected function doWrite(string $message, bool $newline): void
};
*/
$resource = fopen('php://stdout', 'w');
if (false === $resource) {
if ($resource === false) {
throw new \Exception('['.__LINE__.']['.__FILE__.']');
}
$output = new StreamOutput($resource);
Expand Down
37 changes: 19 additions & 18 deletions Models/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
use Illuminate\Database\Eloquent\Builder;

/**
*
*
* @method static \Modules\Job\Database\Factories\ExportFactory factory($count = null, $state = [])
* @method static Builder|Export newModelQuery()
* @method static Builder|Export newQuery()
* @method static Builder|Export query()
* @property int $id
* @method static Builder|Export newModelQuery()
* @method static Builder|Export newQuery()
* @method static Builder|Export query()
*
* @property int $id
* @property \Illuminate\Support\Carbon|null $completed_at
* @property string $file_disk
* @property string|null $file_name
* @property string $exporter
* @property int $processed_rows
* @property int $total_rows
* @property int $successful_rows
* @property string|null $user_id
* @property string $file_disk
* @property string|null $file_name
* @property string $exporter
* @property int $processed_rows
* @property int $total_rows
* @property int $successful_rows
* @property string|null $user_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $updated_by
* @property string|null $created_by
* @property string|null $deleted_at
* @property string|null $deleted_by
* @property string|null $updated_by
* @property string|null $created_by
* @property string|null $deleted_at
* @property string|null $deleted_by
*
* @method static Builder|Export whereCompletedAt($value)
* @method static Builder|Export whereCreatedAt($value)
* @method static Builder|Export whereCreatedBy($value)
Expand All @@ -47,6 +47,7 @@
* @method static Builder|Export whereUpdatedAt($value)
* @method static Builder|Export whereUpdatedBy($value)
* @method static Builder|Export whereUserId($value)
*
* @mixin \Eloquent
*/
class Export extends BaseModel
Expand Down Expand Up @@ -80,4 +81,4 @@ protected function casts(): array
// 'created_at' => 'datetime:d/m/Y H:i'
];
}
}
}
25 changes: 13 additions & 12 deletions Models/FailedImportRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
use Illuminate\Database\Eloquent\Builder;

/**
*
*
* @method static \Modules\Job\Database\Factories\FailedImportRowFactory factory($count = null, $state = [])
* @method static Builder|FailedImportRow newModelQuery()
* @method static Builder|FailedImportRow newQuery()
* @method static Builder|FailedImportRow query()
* @property int $id
* @property array $data
* @property int $import_id
* @property string|null $validation_error
* @method static Builder|FailedImportRow newModelQuery()
* @method static Builder|FailedImportRow newQuery()
* @method static Builder|FailedImportRow query()
*
* @property int $id
* @property array $data
* @property int $import_id
* @property string|null $validation_error
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $updated_by
* @property string|null $created_by
* @property string|null $updated_by
* @property string|null $created_by
*
* @method static Builder|FailedImportRow whereCreatedAt($value)
* @method static Builder|FailedImportRow whereCreatedBy($value)
* @method static Builder|FailedImportRow whereData($value)
Expand All @@ -33,6 +33,7 @@
* @method static Builder|FailedImportRow whereUpdatedAt($value)
* @method static Builder|FailedImportRow whereUpdatedBy($value)
* @method static Builder|FailedImportRow whereValidationError($value)
*
* @mixin \Eloquent
*/
class FailedImportRow extends BaseModel
Expand Down Expand Up @@ -63,4 +64,4 @@ protected function casts(): array
// 'created_at' => 'datetime:d/m/Y H:i'
];
}
}
}
15 changes: 9 additions & 6 deletions Models/FailedJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@
* Modules\Job\Models\FailedJob.
*
* @method static \Modules\Job\Database\Factories\FailedJobFactory factory($count = null, $state = [])
* @method static Builder|FailedJob newModelQuery()
* @method static Builder|FailedJob newQuery()
* @method static Builder|FailedJob query()
* @property int $id
* @method static Builder|FailedJob newModelQuery()
* @method static Builder|FailedJob newQuery()
* @method static Builder|FailedJob query()
*
* @property int $id
* @property string $uuid
* @property string $connection
* @property string $queue
* @property array $payload
* @property array $payload
* @property string $exception
* @property string $failed_at
*
* @method static Builder|FailedJob whereConnection($value)
* @method static Builder|FailedJob whereException($value)
* @method static Builder|FailedJob whereFailedAt($value)
* @method static Builder|FailedJob whereId($value)
* @method static Builder|FailedJob wherePayload($value)
* @method static Builder|FailedJob whereQueue($value)
* @method static Builder|FailedJob whereUuid($value)
*
* @mixin \Eloquent
*/
class FailedJob extends BaseModel
Expand Down Expand Up @@ -59,4 +62,4 @@ protected function casts(): array
'payload' => 'array',
];
}
}
}
46 changes: 24 additions & 22 deletions Models/Frequency.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,31 @@
/**
* Modules\Job\Models\Frequency.
*
* @property int $id
* @property int $task_id
* @property string $label
* @property string $interval
* @property string|null $created_by
* @property string|null $updated_by
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property int $id
* @property int $task_id
* @property string $label
* @property string $interval
* @property string|null $created_by
* @property string|null $updated_by
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Collection<int, \Modules\Job\Models\Parameter> $parameters
* @property int|null $parameters_count
* @property Task|null $task
* @property int|null $parameters_count
* @property Task|null $task
*
* @method static \Modules\Job\Database\Factories\FrequencyFactory factory($count = null, $state = [])
* @method static Builder|Frequency newModelQuery()
* @method static Builder|Frequency newQuery()
* @method static Builder|Frequency query()
* @method static Builder|Frequency whereCreatedAt($value)
* @method static Builder|Frequency whereCreatedBy($value)
* @method static Builder|Frequency whereId($value)
* @method static Builder|Frequency whereInterval($value)
* @method static Builder|Frequency whereLabel($value)
* @method static Builder|Frequency whereTaskId($value)
* @method static Builder|Frequency whereUpdatedAt($value)
* @method static Builder|Frequency whereUpdatedBy($value)
* @method static Builder|Frequency newModelQuery()
* @method static Builder|Frequency newQuery()
* @method static Builder|Frequency query()
* @method static Builder|Frequency whereCreatedAt($value)
* @method static Builder|Frequency whereCreatedBy($value)
* @method static Builder|Frequency whereId($value)
* @method static Builder|Frequency whereInterval($value)
* @method static Builder|Frequency whereLabel($value)
* @method static Builder|Frequency whereTaskId($value)
* @method static Builder|Frequency whereUpdatedAt($value)
* @method static Builder|Frequency whereUpdatedBy($value)
*
* @mixin \Eloquent
*/
class Frequency extends BaseModel
Expand All @@ -60,4 +62,4 @@ public function parameters(): HasMany
{
return $this->hasMany(Parameter::class);
}
}
}
39 changes: 21 additions & 18 deletions Models/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
use Illuminate\Database\Eloquent\Builder;

/**
*
*
* @method static \Modules\Job\Database\Factories\ImportFactory factory($count = null, $state = [])
* @method static Builder|Import newModelQuery()
* @method static Builder|Import newQuery()
* @method static Builder|Import query()
* @property int $id
* @method static Builder|Import newModelQuery()
* @method static Builder|Import newQuery()
* @method static Builder|Import query()
*
* @property int $id
* @property \Illuminate\Support\Carbon|null $completed_at
* @property string $file_name
* @property string $file_path
* @property string $importer
* @property int $processed_rows
* @property int $total_rows
* @property int $successful_rows
* @property string|null $user_id
* @property string $file_name
* @property string $file_path
* @property string $importer
* @property int $processed_rows
* @property int $total_rows
* @property int $successful_rows
* @property string|null $user_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property string|null $updated_by
* @property string|null $created_by
* @property string|null $deleted_at
* @property string|null $deleted_by
* @property string|null $updated_by
* @property string|null $created_by
* @property string|null $deleted_at
* @property string|null $deleted_by
*
* @method static Builder|Import whereCompletedAt($value)
* @method static Builder|Import whereCreatedAt($value)
* @method static Builder|Import whereCreatedBy($value)
Expand All @@ -47,8 +47,11 @@
* @method static Builder|Import whereUpdatedAt($value)
* @method static Builder|Import whereUpdatedBy($value)
* @method static Builder|Import whereUserId($value)
*
* @property string|null $user_type
*
* @method static Builder|Import whereUserType($value)
*
* @mixin \Eloquent
*/
class Import extends BaseModel
Expand Down Expand Up @@ -84,4 +87,4 @@ protected function casts(): array
// 'created_at' => 'datetime:d/m/Y H:i'
];
}
}
}
Loading

0 comments on commit a42c51b

Please sign in to comment.