mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user