hotmeteor / spectator

OpenAPI testing for PHP
MIT License
285 stars 53 forks source link

Refactor codebase, increase PHPStan level to 6 #184

Closed bastien-phi closed 8 months ago

bastien-phi commented 9 months ago

This PR also simplifies Middleware::validate as a parameter was not used anymore and makes usage of openapi version in RequestValidator::validate

bastien-phi commented 9 months ago

@hotmeteor @jarrodparkes : As this PR is quite large, I requested reviews from both of you. Feel free to make comments

jarrodparkes commented 9 months ago

@bastien-phi taking a look now, thx!

bastien-phi commented 9 months ago

It looks like it : https://phpstan.org/r/2c329201-22fb-4786-bc59-e12f4258771e

object typehint means any object (any class) whereas stdClass is the actual class of (object) $array.

bastien-phi commented 8 months ago

@hotmeteor Is it ok for you ?