source/Exo/Builder.php
public function buildBlock($code)
    {
        $lines = $this->parser->splitIntoLines($code);
        $result = [];

        foreach (array_filter($lines) as $line)
        {
            $result[] = $this->printer->toString(
                eval ("return {$line};")
            );
        }

        return sprintf(
            "```php\n%s```\n```\n%s\n```\n",
            implode("\n", $lines),
            implode("\n", $result)
        );
    }
public function buildBlock($code)
    {
        $lines = $this->parser->splitIntoLines($code);
        $result = [];

        foreach (array_filter($lines) as $line)
        {
            $result[] = $this->printer->toString(
                eval ("return {$line};")
            );
        }

        return sprintf(
            "```php\n%s```\n```\n%s\n```\n",
            implode("\n", $lines),
            implode("\n", $result)
        );
    }
public function buildBlock ( $ code ) { $ lines = $ this -> parser -> splitIntoLines ( $ code ) ; $ result = [ ] ; foreach ( array_filter ( $ lines ) as $ line ) { $ result [ ] = $ this -> printer -> toString ( eval ( "return {$line};" ) ) ; } return sprintf ( "```php\n%s```\n```\n%s\n```\n" , implode ( "\n" , $ lines ) , implode ( "\n" , $ result ) ) ; }
Build an example block.

@param string $code
@return string
Build an example block .