diff --git a/README.md b/README.md index 8737648..bc6da3d 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ class UserFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/resources/views/class-factory.blade.php b/resources/views/class-factory.blade.php index fd12263..e679160 100644 --- a/resources/views/class-factory.blade.php +++ b/resources/views/class-factory.blade.php @@ -20,7 +20,7 @@ class {{ $reflection->getShortName() }}Factory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ @foreach($properties as $name => $property) diff --git a/src/Console/GenerateFactoryCommand.php b/src/Console/GenerateFactoryCommand.php index 1864ac4..854856c 100644 --- a/src/Console/GenerateFactoryCommand.php +++ b/src/Console/GenerateFactoryCommand.php @@ -411,7 +411,7 @@ protected function registerCustomTypes(AbstractSchemaManager $schema): void return; } - $platform->registerDoctrineTypeMapping('enum', 'enum'); + $platform->registerDoctrineTypeMapping('enum', 'customEnum'); $platformName = $platform->getName(); $customTypes = $this->laravel['config']->get("ide-helper.custom_db_types.{$platformName}", []);