beberlei / assert

Thin assertion library for use in libraries and business-model
Other
2.41k stars 188 forks source link

Rename param to fix auto doc regex #237

Closed cjhaas closed 6 years ago

cjhaas commented 6 years ago

I was reading the docs for the Assertion::count() method and they incorrectly say:

Assertion::count(array|\Countable $countable, array|\Countable $count);

The second param should be an int however the auto doc generator's RegEx greedily takes the param type for the first item that starts with the param name. In this case, $countable always wins because it starts with $count.

In the long run the doc generator should probably be adjusted but in the short term, since $value is used elsewhere I thought this would be a simpler change.

rquadling commented 6 years ago

I've fixed the generator. Just needed a \b in the regex.