lib/Assertion.php
function readable(): self {
    if (!$this->hasFlag('directory') && !$this->hasFlag('file'))
      throw new \BadMethodCallException('This assertion is not a file or directory one.');

    return $this->expect($this->target, isReadable());
  }
function readable(): self {
    if (!$this->hasFlag('directory') && !$this->hasFlag('file'))
      throw new \BadMethodCallException('This assertion is not a file or directory one.');

    return $this->expect($this->target, isReadable());
  }
Reports an error if the file or directory specified by the target is not readable.
@return self This instance.
@throws \BadMethodCallException This assertion is not a file or directory one.