digipolisgent/robo-digipolis-code-validation

View on GitHub
src/Traits/PhpMdTrait.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace DigipolisGent\Robo\Task\CodeValidation\Traits;

use DigipolisGent\Robo\Task\CodeValidation\PhpMd;

trait PhpMdTrait
{
    /**
     * Creates a PHPMD task.
     *
     * @param string $dir
     *   A php source code filename or directory.
     * @param string $format
     *   The format for the report.
     * @param array $extensions
     *   List of valid file extensions for analyzed files.
     *
     * @return \DigipolisGent\Robo\Task\CodeValidation\PhpMd
     *   The phpmd task.
     */
    protected function taskPhpMd($dir = null, $format = 'xml', $extensions = [])
    {
        return $this->task(PhpMd::class, $dir, $format, $extensions);
    }
}