Google\Cloud\Dev\Snippet\Parser\Snippet::insertAfterLine PHP Method

insertAfterLine() public method

Hopefully this is obvious, but be careful using this, and only use it when no other feasible options present themselves. It's pretty easy to make your test useless when you're modifying the thing you are trying to test. This is provided for cases when a snippet relies on a global, or on something else which can not be overridden or mocked.
public insertAfterLine ( integer $line, string $content ) : void
$line integer The line number (0-indexed) to write in after.
$content string The PHP code to inject.
return void
    public function insertAfterLine($line, $content)
    {
        $snippet = explode("\n", $this->config['content']);
        array_splice($snippet, $line + 1, 0, $content);
        $this->config['content'] = implode("\n", $snippet);
    }