File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2121namespace DarkWebDesign \SymfonyAddon \FormType ;
2222
2323use Symfony \Component \Form \AbstractType ;
24- use Symfony \Component \OptionsResolver \OptionsResolverInterface ;
24+ use Symfony \Component \OptionsResolver \OptionsResolver ;
2525
2626/**
2727 * Birthday form field type.
3333class BirthdayType extends AbstractType
3434{
3535 /**
36- * Sets the default options for this type.
36+ * Configures the options for this type.
3737 *
38- * @param \Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver
38+ * @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver
3939 */
40- public function setDefaultOptions ( OptionsResolverInterface $ resolver )
40+ public function configureOptions ( OptionsResolver $ resolver )
4141 {
4242 $ resolver ->setDefaults (array (
4343 'years ' => range (date ('Y ' ), date ('Y ' ) - 120 ),
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function test()
4242 $ choices = $ form ->get ('year ' )->getConfig ()->getOption ('choices ' );
4343
4444 $ this ->assertCount (121 , $ choices );
45- $ this ->assertSame (date ('Y ' ), reset ($ choices ));
46- $ this ->assertSame ((string ) ( date ('Y ' ) - 120 ), end ($ choices ));
45+ $ this ->assertSame (( int ) date ('Y ' ), reset ($ choices ));
46+ $ this ->assertSame ((date ('Y ' ) - 120 ), end ($ choices ));
4747 }
4848}
You can’t perform that action at this time.
0 commit comments