/** * Does nothing. * * @return void */ public function execute() { $out = phpucConsoleOutput::get(); $out->writeLine('Performing PHP_CodeSniffer task.'); $projectName = $this->args->getOption('project-name'); $projectPath = sprintf('%s/projects/%s', $this->args->getArgument('cc-install-dir'), $projectName); $out->startList(); $out->writeListItem('Modifying build file: project/{1}/build.xml', $projectName); // Create error log file $errorLog = phpucFileUtil::getSysTempDir() . '/checkstyle.error.log'; $buildFile = new phpucBuildFile($projectPath . '/build.xml', $projectName); $buildTarget = $buildFile->createBuildTarget('php-codesniffer'); $buildTarget->dependOn('lint'); $execTask = phpucAbstractAntTask::create($buildFile, 'exec'); $execTask->executable = $this->executable; $execTask->error = $errorLog; $execTask->output = '${basedir}/build/logs/checkstyle.xml'; $execTask->argLine = sprintf('--report=checkstyle --standard=%s %s', $this->args->getOption('coding-guideline'), $this->args->getOption('source-dir')); $buildTarget->addTask($execTask); $buildFile->store(); $out->writeLine(); }
/** * Constructs a new cvs checkout. */ public function __construct() { $this->properties['module'] = null; $this->passFile = tempnam(phpucFileUtil::getSysTempDir(), 'cvs'); }