eightshift-libs icon indicating copy to clipboard operation
eightshift-libs copied to clipboard

[BUG] - PHPStan error for CallableRouterInterface

Open piqusy opened this issue 1 year ago • 2 comments

https://github.com/infinum/eightshift-libs/blob/ed2ab29f149cc7ca221a85bfba9095d9707b3886/src/Rest/CallableRouteInterface.php#L29

PHPStan throws the following error: {namespace}Vendor\EightshiftLibs\Rest\CallableRouteInterface::routeCallback() has parameter $request with generic class WP_REST_Request but does not specify its types: T () [phpstan] phpstan [32, 1]

piqusy avatar Aug 23 '24 09:08 piqusy

This happens directly in CallableRouteInterface or an implementing class? Can you share the function signature for the routeCallback method in your implementing class?

mbmjertan avatar Aug 23 '24 09:08 mbmjertan

Both places, but ran into this when generating the rest-route-load-more class via CLI so you can check by generating your own with wp boilerplate create rest-route-load-more

piqusy avatar Aug 23 '24 11:08 piqusy

not relevant anymore

iruzevic avatar May 28 '25 06:05 iruzevic