beberlei / assert

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

Add a isCountable assertion #266

Closed Taluu closed 5 years ago

Taluu commented 5 years ago

I'm not sure whether the new is_countable function call if it is available (php >= 7.3) is not overkill or maybe too much ? I can remove it if you want to.

rquadling commented 5 years ago

I've taken your code and done the following:

  1. Using the Symfony Polyfill for is_countable.
  2. Using PHPs ResourceBundles for testing of ResourceBundle::count().