mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -5,6 +5,9 @@
|
||||
use App\Enums\BackupStatus;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Backup>
|
||||
*/
|
||||
class BackupFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\BackupFile>
|
||||
*/
|
||||
class BackupFileFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
|
@ -7,6 +7,9 @@
|
||||
use App\Models\CommandExecution;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\CommandExecution>
|
||||
*/
|
||||
class CommandExecutionFactory extends Factory
|
||||
{
|
||||
protected $model = CommandExecution::class;
|
||||
|
@ -7,6 +7,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Command>
|
||||
*/
|
||||
class CommandFactory extends Factory
|
||||
{
|
||||
protected $model = Command::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use App\Models\CronJob;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\CronJob>
|
||||
*/
|
||||
class CronJobFactory extends Factory
|
||||
{
|
||||
protected $model = CronJob::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use App\Models\Database;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Database>
|
||||
*/
|
||||
class DatabaseFactory extends Factory
|
||||
{
|
||||
protected $model = Database::class;
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\DatabaseUser;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\DatabaseUser>
|
||||
*/
|
||||
class DatabaseUserFactory extends Factory
|
||||
{
|
||||
protected $model = DatabaseUser::class;
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\Deployment;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Deployment>
|
||||
*/
|
||||
class DeploymentFactory extends Factory
|
||||
{
|
||||
protected $model = Deployment::class;
|
||||
|
@ -7,6 +7,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\DeploymentScript>
|
||||
*/
|
||||
class DeploymentScriptFactory extends Factory
|
||||
{
|
||||
protected $model = DeploymentScript::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\File>
|
||||
*/
|
||||
class FileFactory extends Factory
|
||||
{
|
||||
protected $model = File::class;
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\FirewallRule;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\FirewallRule>
|
||||
*/
|
||||
class FirewallRuleFactory extends Factory
|
||||
{
|
||||
protected $model = FirewallRule::class;
|
||||
|
@ -8,6 +8,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\GitHook>
|
||||
*/
|
||||
class GitHookFactory extends Factory
|
||||
{
|
||||
protected $model = GitHook::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\LoadBalancerServer>
|
||||
*/
|
||||
class LoadBalancerServerFactory extends Factory
|
||||
{
|
||||
protected $model = LoadBalancerServer::class;
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Metric>
|
||||
*/
|
||||
class MetricFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\NotificationChannel>
|
||||
*/
|
||||
class NotificationChannelFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
|
@ -7,7 +7,7 @@
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<Project>
|
||||
* @extends Factory<\App\Models\Project>
|
||||
*/
|
||||
class ProjectFactory extends Factory
|
||||
{
|
||||
|
@ -6,6 +6,9 @@
|
||||
use App\Models\Queue;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Queue>
|
||||
*/
|
||||
class QueueFactory extends Factory
|
||||
{
|
||||
protected $model = Queue::class;
|
||||
|
@ -7,6 +7,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\ScriptExecution>
|
||||
*/
|
||||
class ScriptExecutionFactory extends Factory
|
||||
{
|
||||
protected $model = ScriptExecution::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Script>
|
||||
*/
|
||||
class ScriptFactory extends Factory
|
||||
{
|
||||
protected $model = Script::class;
|
||||
|
@ -9,6 +9,9 @@
|
||||
use App\Models\Server;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Server>
|
||||
*/
|
||||
class ServerFactory extends Factory
|
||||
{
|
||||
protected $model = Server::class;
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\ServerLog;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\ServerLog>
|
||||
*/
|
||||
class ServerLogFactory extends Factory
|
||||
{
|
||||
protected $model = ServerLog::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\ServerProvider>
|
||||
*/
|
||||
class ServerProviderFactory extends Factory
|
||||
{
|
||||
protected $model = ServerProvider::class;
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\Service;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Service>
|
||||
*/
|
||||
class ServiceFactory extends Factory
|
||||
{
|
||||
protected $model = Service::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use App\Models\Site;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Site>
|
||||
*/
|
||||
class SiteFactory extends Factory
|
||||
{
|
||||
protected $model = Site::class;
|
||||
|
@ -6,6 +6,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\SourceControl>
|
||||
*/
|
||||
class SourceControlFactory extends Factory
|
||||
{
|
||||
protected $model = SourceControl::class;
|
||||
@ -20,30 +23,33 @@ public function definition(): array
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Factory<\App\Models\SourceControl>
|
||||
*/
|
||||
public function gitlab(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::GITLAB,
|
||||
];
|
||||
});
|
||||
return $this->state(fn (array $attributes): array => [
|
||||
'provider' => \App\Enums\SourceControl::GITLAB,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Factory<\App\Models\SourceControl>
|
||||
*/
|
||||
public function github(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::GITHUB,
|
||||
];
|
||||
});
|
||||
return $this->state(fn (array $attributes): array => [
|
||||
'provider' => \App\Enums\SourceControl::GITHUB,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Factory<\App\Models\SourceControl>
|
||||
*/
|
||||
public function bitbucket(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::BITBUCKET,
|
||||
];
|
||||
});
|
||||
return $this->state(fn (array $attributes): array => [
|
||||
'provider' => \App\Enums\SourceControl::BITBUCKET,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\SshKey;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\SshKey>
|
||||
*/
|
||||
class SshKeyFactory extends Factory
|
||||
{
|
||||
protected $model = SshKey::class;
|
||||
|
@ -7,6 +7,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Ssl>
|
||||
*/
|
||||
class SslFactory extends Factory
|
||||
{
|
||||
protected $model = Ssl::class;
|
||||
|
@ -5,6 +5,9 @@
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\StorageProvider>
|
||||
*/
|
||||
class StorageProviderFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
|
@ -6,6 +6,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\Tag>
|
||||
*/
|
||||
class TagFactory extends Factory
|
||||
{
|
||||
protected $model = Tag::class;
|
||||
|
@ -7,6 +7,9 @@
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
protected $model = User::class;
|
||||
|
Reference in New Issue
Block a user