Skip to content

Instantly share code, notes, and snippets.

@wrossmann
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrossmann/4ec693517225676400de to your computer and use it in GitHub Desktop.
Save wrossmann/4ec693517225676400de to your computer and use it in GitHub Desktop.
<?
foreach($filters as $pos => $filter) {
if( ! $filter instanceof Filter\FilterInterface ) {
throw new \InvalidArgumentException(
sprintf('Argument 3 passed to %s::%s must be an array of instances of %s, %s given for index %d',
__CLASS__, __FUNCTION__, 'Filter\FilterInterface', get_class($filter), $pos)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment