Add phpstan level 7(#544)

This commit is contained in:
Saeed Vaziry
2025-03-12 13:31:10 +01:00
committed by GitHub
parent c22bb1fa80
commit 493cbb0849
437 changed files with 4505 additions and 2193 deletions

View File

@ -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,
]);
}
}