@@ -162,10 +162,10 @@ discard block |
||
| 162 | 162 | protected function configureOptions(OptionsResolver $resolver): void |
| 163 | 163 | { |
| 164 | 164 | $resolver |
| 165 | - ->setDefault('code', function (Options $options): string { |
|
| 165 | + ->setDefault('code', function(Options $options): string { |
|
| 166 | 166 | return StringInflector::nameToCode((string) $options['title']); |
| 167 | 167 | }) |
| 168 | - ->setDefault('enabled', function (Options $options): bool { |
|
| 168 | + ->setDefault('enabled', function(Options $options): bool { |
|
| 169 | 169 | return $this->faker->boolean(90); |
| 170 | 170 | }) |
| 171 | 171 | ->setAllowedTypes('enabled', 'bool') |
@@ -175,16 +175,16 @@ discard block |
||
| 175 | 175 | ->setDefault('categories', LazyOption::randomOnes($this->articleCategoryRepository, 1)) |
| 176 | 176 | ->setAllowedTypes('categories', 'array') |
| 177 | 177 | ->setNormalizer('categories', LazyOption::findBy($this->articleCategoryRepository, 'code')) |
| 178 | - ->setDefault('title', function (Options $options): string { |
|
| 178 | + ->setDefault('title', function(Options $options): string { |
|
| 179 | 179 | return $this->faker->text(20); |
| 180 | 180 | }) |
| 181 | - ->setDefault('content', function (Options $options): string { |
|
| 181 | + ->setDefault('content', function(Options $options): string { |
|
| 182 | 182 | return $this->faker->text; |
| 183 | 183 | }) |
| 184 | - ->setDefault('slug', function (Options $options): string { |
|
| 184 | + ->setDefault('slug', function(Options $options): string { |
|
| 185 | 185 | return StringInflector::nameToCode((string) $options['title']); |
| 186 | 186 | }) |
| 187 | - ->setDefault('images', function (Options $options): array { |
|
| 187 | + ->setDefault('images', function(Options $options): array { |
|
| 188 | 188 | return [ |
| 189 | 189 | __DIR__.'/../../Resources/fixtures/article/images/0'.rand(1, 6).'.jpg', |
| 190 | 190 | ]; |
@@ -79,17 +79,17 @@ |
||
| 79 | 79 | protected function configureOptions(OptionsResolver $resolver): void |
| 80 | 80 | { |
| 81 | 81 | $resolver |
| 82 | - ->setDefault('code', function (Options $options): string { |
|
| 82 | + ->setDefault('code', function(Options $options): string { |
|
| 83 | 83 | return StringInflector::nameToCode((string) $options['title']); |
| 84 | 84 | }) |
| 85 | - ->setDefault('enabled', function (Options $options): bool { |
|
| 85 | + ->setDefault('enabled', function(Options $options): bool { |
|
| 86 | 86 | return $this->faker->boolean(90); |
| 87 | 87 | }) |
| 88 | 88 | ->setAllowedTypes('enabled', 'bool') |
| 89 | - ->setDefault('title', function (Options $options): string { |
|
| 89 | + ->setDefault('title', function(Options $options): string { |
|
| 90 | 90 | return $this->faker->text(20); |
| 91 | 91 | }) |
| 92 | - ->setDefault('slug', function (Options $options): string { |
|
| 92 | + ->setDefault('slug', function(Options $options): string { |
|
| 93 | 93 | return StringInflector::nameToCode((string) $options['title']); |
| 94 | 94 | }) |
| 95 | 95 | ; |