forked from eatvio/eatvio-infra
refactoring static analyse code
This commit is contained in:
@@ -8,9 +8,12 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Http\File;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Faker\Generator;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Recipe>
|
||||
*
|
||||
* @property Generator|Restaurant|Youtube $faker
|
||||
*/
|
||||
class RecipeFactory extends Factory
|
||||
{
|
||||
@@ -38,7 +41,7 @@ class RecipeFactory extends Factory
|
||||
];
|
||||
}
|
||||
|
||||
private function generateImageFile(string $name)
|
||||
private function generateImageFile(string $name): string
|
||||
{
|
||||
$images = ['1.jpg', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.jpg', '9.jpg', '10.jpg'];
|
||||
Storage::fake($name);
|
||||
@@ -67,7 +70,7 @@ class RecipeFactory extends Factory
|
||||
];
|
||||
}
|
||||
|
||||
private function createQuentitySteps($count)
|
||||
private function createQuentitySteps(int $count): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
@@ -78,7 +81,7 @@ class RecipeFactory extends Factory
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function createQuentityIngredients($count)
|
||||
private function createQuentityIngredients(int $count): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user