src/Whoops/Handler/PrettyPageHandler.php
public function getEditorHref($filePath, $line)
    {
        $editor = $this->getEditor($filePath, $line);

        if (empty($editor)) {
            return false;
        }

        // Check that the editor is a string, and replace the
        // %line and %file placeholders:
        if (!isset($editor['url']) || !is_string($editor['url'])) {
            throw new UnexpectedValueException(
                __METHOD__ . " should always resolve to a string or a valid editor array; got something else instead."
            );
        }

        $editor['url'] = str_replace("%line", rawurlencode($line), $editor['url']);
        $editor['url'] = str_replace("%file", rawurlencode($filePath), $editor['url']);

        return $editor['url'];
    }
public function getEditorHref($filePath, $line)
    {
        $editor = $this->getEditor($filePath, $line);

        if (empty($editor)) {
            return false;
        }

        // Check that the editor is a string, and replace the
        // %line and %file placeholders:
        if (!isset($editor['url']) || !is_string($editor['url'])) {
            throw new UnexpectedValueException(
                __METHOD__ . " should always resolve to a string or a valid editor array; got something else instead."
            );
        }

        $editor['url'] = str_replace("%line", rawurlencode($line), $editor['url']);
        $editor['url'] = str_replace("%file", rawurlencode($filePath), $editor['url']);

        return $editor['url'];
    }
public function getEditorHref ( $ filePath , $ line ) { $ editor = $ this -> getEditor ( $ filePath , $ line ) ; if ( empty ( $ editor ) ) { return false ; } // Check that the editor is a string, and replace the // %line and %file placeholders: if ( ! isset ( $ editor [ 'url' ] ) || ! is_string ( $ editor [ 'url' ] ) ) { throw new UnexpectedValueException ( __METHOD__ . " should always resolve to a string or a valid editor array; got something else instead." ) ; } $ editor [ 'url' ] = str_replace ( "%line" , rawurlencode ( $ line ) , $ editor [ 'url' ] ) ; $ editor [ 'url' ] = str_replace ( "%file" , rawurlencode ( $ filePath ) , $ editor [ 'url' ] ) ; return $ editor [ 'url' ] ; }
Given a string file path, and an integer file line,
executes the editor resolver and returns, if available,
a string that may be used as the href property for that
file reference.

@throws InvalidArgumentException If editor resolver does not return a string
@param  string                   $filePath
@param  int                      $line
@return string|bool
Given a string file path and an integer file line executes the editor resolver and returns if available a string that may be used as the href property for that file reference .