Returns a checker that validated if an $element
is an instance of a $className
- className
- Class name to compare with.
Check if all the elements of a collection are instances of a Exception
<?php
use function Lambdish\Phunctional\all;
use function Lambdish\Phunctional\instance_of;
$coll = [new Exception(), new InvalidArgumentException(), new Exception()];
return all(instance_of(Exception::class), $coll);
// => true