<?php
namespace CodeGen\Statement;
use CodeGen\Renderable;
use CodeGen\Line;

class RequireStatement extends Line implements Renderable
{
    public $expr;

    public function __construct(Renderable $expr) {
        $this->expr = $expr;
    }

    public function render(array $args = array()) {
        return 'require ' . $this->expr->render($args) . ';';
    }

}




<?php
namespace CodeGen\Statement;
use CodeGen\Renderable;
use CodeGen\Line;

class RequireStatement extends Statement implements Renderable
{
    public function __construct($file)
    {
        $this->expr = $file;
    }

    public function render(array $args = array()) {
        if ($this->expr instanceof Renderable) {
            return 'require ' . $this->expr->render($args) . ';';
        } else {
            return 'require ' . var_export($this->expr) . ';';
        }
    }

}




Fix require statement class for passing string as the file path
Fix require statement class for passing string as the file path
