Back

hey all, i just started using larastan , for better code analysis, but sometime error like this make me confuse , what to do next.
should i configure php stan to ignore these type of error suggestion or should i configure pint to remove return types, if the function has empty body ?

image

5

276

  • No matching results...
  • Searching...

/ 1000

if you're not going to implement it, you can just remove it. and if you must have them, just return the default value. If you can go for the former.

1

112

yeah, removal of unused function is good approach.

108

Thanks. will implement this in future.

38

Depends, are you gonna implement these functions later? If yes, then i would let the errors there so i can remember to implement them later, if not, just return the default behavior that i am expecting for these actions on this policy or remove them entirely

1

91

Thanks @brimmar for nice reply, for now i've removed it.
but keep this tip for future reference.

45

The function definition needs to return what you define as the return type. If you want to return nothing set the return type to 'void'.

60