src/Reader.php
protected function openFile($filename)
    {
        $this->filename = $filename;

        if (!is_file($this->filename)) {
            throw new \Exception(
                sprintf(
                    'File %s does not exist',
                    $this->filename
                )
            );
        }

        $this->file = fopen($this->filename, 'rb');
        if (false === $this->file) {
            throw new \Exception(
                sprintf(
                    'Could not open file %s for reading',
                    $this->filename
                )
            );
        }
    }
protected function openFile($filename)
    {
        $this->filename = $filename;

        if (!is_file($this->filename)) {
            throw new \Exception(
                sprintf(
                    'File %s does not exist',
                    $this->filename
                )
            );
        }

        $this->file = fopen($this->filename, 'rb');
        if (false === $this->file) {
            throw new \Exception(
                sprintf(
                    'Could not open file %s for reading',
                    $this->filename
                )
            );
        }
    }
protected function openFile ( $ filename ) { $ this -> filename = $ filename ; if ( ! is_file ( $ this -> filename ) ) { throw new \ Exception ( sprintf ( 'File %s does not exist' , $ this -> filename ) ) ; } $ this -> file = fopen ( $ this -> filename , 'rb' ) ; if ( false === $ this -> file ) { throw new \ Exception ( sprintf ( 'Could not open file %s for reading' , $ this -> filename ) ) ; } }
Prepare file for reading

@param $filename

@throws \Exception
Prepare file for reading