Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Update return types. #112

Open
laurentmuller opened this issue Dec 6, 2021 · 1 comment
Open

Update return types. #112

laurentmuller opened this issue Dec 6, 2021 · 1 comment

Comments

@laurentmuller
Copy link

I have a project that use this bundle with symfony version 5.4. When I run PHP unit tests. A warning is output:

1x: Method "Twig\Extension\ExtensionInterface::getFunctions()" might add "array" as a native return type declaration in the future. Do the same in implementation "Ob\HighchartsBundle\Twig\HighchartsExtension" now to avoid errors or add an explicit @return annotation to suppress this message.

To stop all this warnings, just modify code to add a return type. For example for HighchartsExtension warning:

Before:

 /**
   * {@inheritdoc}
   */
  public function getFunctions()
  {
      ...
  }

After:

 /**
   * {@inheritdoc}
   */
  public function getFunctions(): array
  {
     ...
  }

Or

 /**
   * {@inheritdoc}
   * 
   * @return array
   */
  public function getFunctions()
  {
      ...
  }
@cbeyer
Copy link

cbeyer commented Aug 8, 2022

Same for me. Any update ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants