Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add return types in form #1518

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add return types in form
  • Loading branch information
garak committed Jun 19, 2023
commit 6ce9b06ec64d27f6aa0a84e39b7364e5b365ebf3
14 changes: 4 additions & 10 deletions Form/Type/ImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
class ImageType extends AbstractType
{
public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['image_path'] = $options['image_path'];
$view->vars['image_filter'] = $options['image_filter'];
Expand All @@ -34,7 +34,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
$view->vars['link_attr'] = $options['link_attr'];
}

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired([
'image_path',
Expand All @@ -49,18 +49,12 @@ public function configureOptions(OptionsResolver $resolver)
]);
}

/**
* @return string
*/
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'liip_imagine_image';
}

/**
* @return string
*/
public function getParent()
public function getParent(): string
{
return FileType::class;
}
Expand Down