This is a PHP Mess Detector task for Soy
Include soy-php/phpmd-task
in your project with composer:
$ composer require soy-php/phpmd-task
Then in your recipe you can use the task as follows:
<?php
$recipe = new \Soy\Recipe();
$recipe->component('default', function (\Soy\PhpMessDetector\RunTask $messDetectorTask) {
$messDetectorTask
->setBinary('phpmd')
->addTarget('.')
->setVerbose(true)
->setThrowExceptionOnError(false)
->addExcludePattern('vendor/')
->addSuffix('php')
->setReport(\Soy\PhpMessDetector\RunTask::REPORT_XML)
->setStrict(true)
->run();
});
return $recipe;