Generator/NumberGenerator.php
private function readNumber()
    {
        // Open
        if (false === $this->handle = fopen($this->path, 'c+')) {
            throw new RuntimeException("Failed to open file {$this->path}.");
        }
        // Exclusive lock
        if (!flock($this->handle, LOCK_EX)) {
            throw new RuntimeException("Failed to lock file {$this->path}.");
        }

        if (false !== $number = fread($this->handle, 10)) {
            return intval($number);
        }

        return 0;
    }
private function readNumber()
    {
        // Open
        if (false === $this->handle = fopen($this->path, 'c+')) {
            throw new RuntimeException("Failed to open file {$this->path}.");
        }
        // Exclusive lock
        if (!flock($this->handle, LOCK_EX)) {
            throw new RuntimeException("Failed to lock file {$this->path}.");
        }

        if (false !== $number = fread($this->handle, 10)) {
            return intval($number);
        }

        return 0;
    }
private function readNumber ( ) { // Open if ( false === $ this -> handle = fopen ( $ this -> path , 'c+' ) ) { throw new RuntimeException ( "Failed to open file {$this->path}." ) ; } // Exclusive lock if ( ! flock ( $ this -> handle , LOCK_EX ) ) { throw new RuntimeException ( "Failed to lock file {$this->path}." ) ; } if ( false !== $ number = fread ( $ this -> handle , 10 ) ) { return intval ( $ number ) ; } return 0 ; }
Reads the previous number.

@return int
Reads the previous number .