cucumber / gherkin

A parser and compiler for the Gherkin language.
MIT License
160 stars 48 forks source link

[php] Try to follow Psalm tips #238

Closed olleolleolle closed 3 months ago

olleolleolle commented 3 months ago

🤔 What's changed?

This PR is an experiment run, to see if Psalm's "find unused" can be tamed, to become useful.

⚡️ What's your motivation?

Psalm seems like a cool tool.

🏷️ What kind of change is this?

♻️ Anything particular you want feedback on?

Is this a viable path?

I downgraded a Property in a constructor to a regular positional parameter – this was due to a Psalm warning. Is that reasonable?

One error handler dealt with return values, when it looked like that wasn't what it usually did. I turned it into a regular "callbacky" thing, instead.

Well, any thoughts around keeping these Psalm checks enabled would be welcome. Also thoughts around "why this does not suit Gherkin".

📋 Checklist: