classes/phing/tasks/ext/phpmd/PHPMDFormatterElement.php
public function getRenderer()
    {
        if (!class_exists('\\PHPMD\\Writer\\StreamWriter')) {
            $renderClass = 'PHP_PMD_RENDERER_' . $this->className;
            $writerClass = 'PHP_PMD_Writer_Stream';
            include_once 'PHP/PMD/Renderer/' . $this->className . '.php';
            include_once 'PHP/PMD/Writer/Stream.php';
        } else {
            $renderClass = 'PHPMD\Renderer\\' . $this->className;
            $writerClass = '\PHPMD\Writer\StreamWriter';
        }

        $renderer = new $renderClass();

        // Create a report stream
        if ($this->getUseFile() === false || $this->getOutfile() === null) {
            $stream = STDOUT;
        } else {
            $stream = fopen($this->getOutfile()->getAbsoluteFile(), 'wb');
        }

        $renderer->setWriter(new $writerClass($stream));

        return $renderer;
    }
public function getRenderer()
    {
        if (!class_exists('\\PHPMD\\Writer\\StreamWriter')) {
            $renderClass = 'PHP_PMD_RENDERER_' . $this->className;
            $writerClass = 'PHP_PMD_Writer_Stream';
            include_once 'PHP/PMD/Renderer/' . $this->className . '.php';
            include_once 'PHP/PMD/Writer/Stream.php';
        } else {
            $renderClass = 'PHPMD\Renderer\\' . $this->className;
            $writerClass = '\PHPMD\Writer\StreamWriter';
        }

        $renderer = new $renderClass();

        // Create a report stream
        if ($this->getUseFile() === false || $this->getOutfile() === null) {
            $stream = STDOUT;
        } else {
            $stream = fopen($this->getOutfile()->getAbsoluteFile(), 'wb');
        }

        $renderer->setWriter(new $writerClass($stream));

        return $renderer;
    }
public function getRenderer ( ) { if ( ! class_exists ( '\\PHPMD\\Writer\\StreamWriter' ) ) { $ renderClass = 'PHP_PMD_RENDERER_' . $ this -> className ; $ writerClass = 'PHP_PMD_Writer_Stream' ; include_once 'PHP/PMD/Renderer/' . $ this -> className . '.php' ; include_once 'PHP/PMD/Writer/Stream.php' ; } else { $ renderClass = 'PHPMD\Renderer\\' . $ this -> className ; $ writerClass = '\PHPMD\Writer\StreamWriter' ; } $ renderer = new $ renderClass ( ) ; // Create a report stream if ( $ this -> getUseFile ( ) === false || $ this -> getOutfile ( ) === null ) { $ stream = STDOUT ; } else { $ stream = fopen ( $ this -> getOutfile ( ) -> getAbsoluteFile ( ) , 'wb' ) ; } $ renderer -> setWriter ( new $ writerClass ( $ stream ) ) ; return $ renderer ; }
Creates a report renderer instance based on the formatter type.

@return PHP_PMD_AbstractRenderer
@throws BuildException           When the specified renderer does not exist.
Creates a report renderer instance based on the formatter type .