lib/Assertion.php
function containOnlyInstancesOf(string $className): self {
    return $this->expect($this->target, containsOnlyInstancesOf($className));
  }
function containOnlyInstancesOf(string $className): self {
    return $this->expect($this->target, containsOnlyInstancesOf($className));
  }
function containOnlyInstancesOf ( string $ className ) : self { return $ this -> expect ( $ this -> target , containsOnlyInstancesOf ( $ className ) ) ; }
Reports an error if the target does not contain only instances of a given class.
@param string $className The name of the class to check.
@return self This instance.
Reports an error if the target does not contain only instances of a given class .