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

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

b.stoop
Lunr.Locator
phpstan
lunr

Based on release/0.9.x

PHPStan: Fix phpstan warning when staticly called in config files

  • 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. An issue was opened. Show all issues

    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
  1. 
      
  2. An issue was opened. Show all issues

    Why? That's not a static method.

  3. An issue was opened. Show all issues

    These methods aren't static though.

  4. 
      
b.stoop
b.stoop
b.stoop
Review request changed

Status: Discarded

Loading...