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

Update return types.  #112

@laurentmuller

Description

@laurentmuller

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()
  {
      ...
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions