Returns the remaining contents in a string

@return string
@throws \RuntimeException if unable to read or an error occurs while
reading.
497618
public function getContents()
    {
        if ($this->resource === null) {
            return '';
        }

        $result = substr($this->resource, $this->pointer);

        if ($result === false) {
            return '';
        }

        return $result;
    }
1286361
public function getText() : string {
        $start = $this->getStart();
        $end = $this->getEndPosition();

        $fileContents = $this->getFileContents();
        return \substr($fileContents, $start, $end - $start);
    }
950763
public function getMainScriptContents()
    {
        if (null !== ($path = $this->getMainScriptPath())) {
            $path = $this->getBasePath() . DIRECTORY_SEPARATOR . $path;

            if (false === ($contents = @file_get_contents($path))) {
                $errors = error_get_last();
                if ($errors === null) {
                    $errors = array('message' => 'failed to get contents of \''.$path.'\'');
                }

                throw new RuntimeException($errors['message']);
            }

            return preg_replace('/^#!.*\s*/', '', $contents);
        }

        return null;
    }
463672
public function read()
	{
		if (!isset($this->contents))
		{
			$this->contents = $this->hasAdapterOrFail()->adapter->read($this->getPath());
		}

		return (string) $this->contents;
	}
864431
public function readContent($filePath)
    {
        if (!$this->fileExists($filePath)) {
            throw new \RuntimeException("File '{$filePath}' doesn't exists.");
        }

        $content = \file_get_contents($filePath);

        if (false === $content) {
            throw new \RuntimeException("Unable to get contents of file '{$filePath}'.");
        }

        return $content;
    }
611925
public function getFullText() : string {
        $start = $this->getFullStart();
        $end = $this->getEndPosition();

        $fileContents = $this->getFileContents();
        return \substr($fileContents, $start, $end - $start);

    }
895811
public function getStatus()
    {
        /** @var $result CallResult */
        $result = $this->getSvn()->{'status'}($this->getRepositoryPath(), array(
            '--xml'
        ));
        $result->assertSuccess(
            sprintf('Cannot retrieve status from "%s"', $this->getRepositoryPath())
        );

        $xml    = simplexml_load_string($result->getStdOut());
        if (!$xml) {
            throw new \RuntimeException(sprintf('Cannot read status XML for "%s"', $this->getRepositoryPath()));
        }

        $status = array();
        foreach ($xml->xpath('/status/target/entry') as $entry) {
            $status[]   = array(
                'file'      => (string)$entry['path'],
                'status'    => (string)$entry->{'wc-status'}['item']
            );
        }
        return $status;
    }
1146553
public function getContents() : string
	{
		if (! \is_resource($this->resource))
		{
			throw new Exception\UnreadableStreamException('Stream is not resourceable');
		}

		if (! $this->isReadable())
		{
			throw new Exception\UnreadableStreamException('Stream is not readable');
		}

		$result = \stream_get_contents($this->resource);

		if (false === $result)
		{
			throw new Exception\UnreadableStreamException('Unable to read remainder of the stream');
		}

		return $result;
	}
398877
public function getStubBannerFromFile()
    {
        if (null !== ($path = $this->getStubBannerPath())) {
            $path = $this->getBasePath() . DIRECTORY_SEPARATOR . $path;

            if (false === ($contents = @file_get_contents($path))) {
                $errors = error_get_last();
                if ($errors === null) {
                    $errors = array('message' => 'failed to get contents of \''.$path.'\'');
                }

                throw new RuntimeException($errors['message']);
            }

            return $contents;
        }

        return null;
    }
94673
public function getContents() : string
    {
        $r = false;
        $err = ($this->stream === null || $this->readable === false);

        if ($err === false) {
            $r = stream_get_contents($this->stream);
        }

        if ($err === true || $r === false) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Could not get contents of stream.");
            // @codeCoverageIgnoreEnd
        }

        return $r;
    }
222166
public function errorMessage()
	{
		if ($this->decoded() === null) {
			throw new \RuntimeException('No result from server.');
		}

		$decoded = $this->decoded();
		if (isset($decoded->error))
			return sprintf('%s (%s)', $decoded->error->message, $decoded->error->code);

		$message = sprintf('%s (%s)', $decoded->message, $this->statusCode());

		if (isset($this->decoded()->errors)) {
			$errors = $this->decoded()->errors;

			$message .= $this->resolveAttributes($errors);
		}

		return $message;
	}
56615
public function getJson()
    {
        if (empty($this->json_loaded)) {
            if ($this->getBody() && $this->isJson()) {
                $this->json = json_decode($this->getBody(), true);

                if (json_last_error()) {
                    throw new RuntimeException('Failed to parse JSON. Reason: ' . json_last_error_msg());
                }
            }

            $this->json_loaded = true;
        }

        return $this->json;
    }
1181422
public function readStringLen()
    {
        $l = $this->readIntLen();
        if ($l === null) {
            return $l;
        }

        return $this->read($l);
    }
1155937
public function getAbsolute(){
		if( empty( $this->parts->scheme ) )
			throw new RuntimeException( 'HTTP scheme not set' );
		if( empty( $this->parts->host ) )
			throw new RuntimeException( 'HTTP host not set' );
		$buffer	= array();
		if( $this->parts->scheme )
			$buffer[]	= $this->parts->scheme.'://';
		if( $this->parts->user ){
			$buffer[]	= $this->parts->user;
			if( $this->parts->pass )
				$buffer[]	= ':'.$this->parts->pass;
			$buffer[]	= '@';
		}
		if( $this->parts->host )
			$buffer[]	= $this->parts->host;
		if( $this->parts->port )
			$buffer[]	= ':'.$this->parts->port;
		if( $this->parts->path )
			$buffer[]	= $this->parts->path;
		if( $this->parts->query )
			$buffer[]	= '?'.$this->parts->query;
		if( $this->parts->fragment )
			$buffer[]	= '#'.$this->parts->fragment;
		return join( '', $buffer );
	}
280101
function getContents()
    {
        if (!$this->isReadable())
            throw new \RuntimeException('Stream is not readable.');

        $content = '';
        while (!$this->eof()) {
            $buf = $this->read(1048576);
            // match on '' and false by loose equal
            if ($buf == null)
                break;

            $content .= $buf;
        }

        return $content;
    }
41628
public function readLongstr()
    {
        $this->_bitcount = $this->_bits = 0;
        $slen = $this->readPhpInt();
        if ($slen < 0) {
            throw new \Exception("Strings longer than supported on this platform");
        }
        return $this->_rawread($slen);
    }
389617
protected function getStdIn()
    {
        if ($this->stdIn && !feof($this->stdIn)) {
            return $this->stdIn;
        }

        try {
            $this->setStdIn();
        } catch (\Error $e) {
            throw new RuntimeException('Unable to read from STDIN', 0, $e);
        }

        return $this->stdIn;
    }