#183·assert

Assert::allOneOf get complains from phpStan on usage

Author: monro93Created Apr 17, 2020Updated Jun 3, 2022

Hi, Thanks for your library! I have discovered the following issue: The method allOneOf($values, $values, $message = '') of Webmozart\Assert has in the signature two variables with the same name "values", this is confusing PhpStan, the static analyzer, thinking that the method has only 2 arguments, so when is called with 3 is giving the following error: Static method Webmozart\Assert\Assert::allOneOf() invoked with 3 parameters, 1-2 required.

I will submit a PR this afternoon/first days of the next week

Thanks!