code: function containOnlyInstancesOf(string $className): self {
      return $this->expect($this->target, containsOnlyInstancesOf($className));
    }
docs: 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.