/** * Configures the input source. * * @param PDepend\Engine $pdepend The context php depend instance. * @param PHP_PMD $phpmd The calling/parent php mess detector. * * @return void */ private function initInput(PDepend\Engine $pdepend, PHP_PMD $phpmd) { foreach (explode(',', $phpmd->getInput()) as $path) { if (is_dir(trim($path))) { $pdepend->addDirectory(trim($path)); } else { $pdepend->addFile(trim($path)); } } }