Skip to content

Commit

Permalink
refactor(fixtures): Use constants for setAllowedValues
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-monsieurbiz committed Jul 24, 2023
1 parent a090dc1 commit 4a65196
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Fixture/Factory/SettingsFixtureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ protected function configureOptions(OptionsResolver $resolver): void
->setAllowedTypes('channel', ['null', 'string'])
->setDefault('locale', null)
->setAllowedTypes('locale', ['null', 'string'])
->setDefault('type', 'text')
->setDefault('type', SettingInterface::STORAGE_TYPE_TEXT)
->setAllowedTypes('type', 'string')
->setAllowedValues('type', ['text', 'boolean', 'integer', 'float', 'json', 'date', 'datetime'])
->setAllowedValues('type', [SettingInterface::STORAGE_TYPE_TEXT, SettingInterface::STORAGE_TYPE_BOOLEAN, SettingInterface::STORAGE_TYPE_INTEGER,
SettingInterface::STORAGE_TYPE_FLOAT, SettingInterface::STORAGE_TYPE_JSON, SettingInterface::STORAGE_TYPE_DATE, SettingInterface::STORAGE_TYPE_DATETIME])
->setDefault('value', null)
->setAllowedTypes('value', ['null', 'string', 'integer', 'bool', 'float', 'Datetime', 'array'])
;
Expand Down

0 comments on commit 4a65196

Please sign in to comment.