webmozarts / assert

Assertions to validate method input/output with nice error messages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assert for all instances are of some class

vv12131415 opened this issue · comments

commented

Is there something similar to https://github.com/beberlei/assert#all-helper
Assertion::allIsInstanceOf(array(new \stdClass, new \stdClass), 'stdClass'); in beberlei/assert ?

Yes, the example used in the readme should be valid for your use-case: https://github.com/webmozart/assert#collection-assertions

commented

omg... sorry, my bad