public static function validatePath(string $path = null): void
    {
        if (empty($path)) {
            throw new InvalidArgumentException("Cannot validate empty path");
        }

        if (!file_exists($path)) {
            throw new InvalidArgumentException("Path does not exist [$path]");
        }
        if (!is_readable($path)) {
            throw new InvalidArgumentException("Path is not readable [$path]");
        }
    }
public static function validatePath(string $path = null): void
    {
        if (empty($path)) {
            throw new InvalidArgumentException("Cannot validate empty path");
        }

        if (!file_exists($path)) {
            throw new InvalidArgumentException("Path does not exist [$path]");
        }
        if (!is_readable($path)) {
            throw new InvalidArgumentException("Path is not readable [$path]");
        }
    }
public static function validatePath ( string $ path = null ) : void { if ( empty ( $ path ) ) { throw new InvalidArgumentException ( "Cannot validate empty path" ) ; } if ( ! file_exists ( $ path ) ) { throw new InvalidArgumentException ( "Path does not exist [$path]" ) ; } if ( ! is_readable ( $ path ) ) { throw new InvalidArgumentException ( "Path is not readable [$path]" ) ; } }
Check validity of the given path

@throws \InvalidArgumentException when path does not exist or is not readable
@param string $path Path to validate
@return void
Check validity of the given path