[Locator] PHPStan: Fix phpstan warning when staticly called in config files

Review Request #1183 — Created June 21, 2024 and updated

b.stoop
Lunr.Locator
phpstan
d55b5ca...
lunr

Based on release/0.9.x

PHPStan: Fix phpstan warning when staticly called in config files

https://github.com/lunr-php/lunr.locator/pull/9

  • 3
  • 0
  • 0
  • 0
  • 3
Description From Last Updated
What's the reasoning here? pprkut pprkut
Why? That's not a static method. smillernl smillernl
These methods aren't static though. smillernl smillernl
pprkut
  1. 
      
  2. What's the reasoning here?

    1. We have places where we call the locator in the locator files like: $this->request()->id. Because we call it inside of the locator extension it tries to call the request method in the locator extension, which does not exists. In the documentation, https://phpstan.org/developing-extensions/dynamic-return-type-extensions , it mentioned DynamicStaticMethodReturnTypeExtension, and when I tried it fix that warning.

    2. It sounds like it got fixed because it broke and therefore didn't trigger anymore.

  3. 
      
smillernl
Loading...