phplinter\Report\Html::prepare PHP Method

prepare() public method

----------------------------------------------------------------------+
public prepare ( )
    public function prepare()
    {
        $this->html = $this->config->check('report');
        if (empty($this->html['out'])) {
            return 'No output directory selected...';
        }
        if ($this->html['out'] == $this->config->check('target')) {
            return 'Output directory same as target, aborting...';
        }
        if (file_exists($this->html['out'])) {
            if (!$this->html['overwrite']) {
                $files = @scandir($this->html['out']);
                if (count($files) > 2) {
                    return 'Output directory not empty, will not overwrite...';
                }
            }
        }
        if (isset($this->html['dry_run'])) {
            $this->dry_run = $this->html['dry_run'];
        }
        return true;
    }