Skip to content

Commit

Permalink
Adapt to new APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed May 2, 2014
1 parent 8e72c0e commit 0023df6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions components/lib/Components/Qc/Task/Cpd.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function getName()
*/
public function validate($options)
{
return array('PHPCPD has changed interfaces, QC task needs updating.');
if (!class_exists('SebastianBergmann\\PHPCPD\\Detector\\Detector')) {
return array('PHP CPD is not available!');
}
Expand Down
4 changes: 1 addition & 3 deletions components/lib/Components/Qc/Task/Cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ public function run(&$options)
$_SERVER['argv'] = $argv;
$_SERVER['argc'] = $argc;

$reporting = new PHP_CodeSniffer_Reporting();
$filesViolations = $phpcs->getFilesErrors();
chdir($old_dir);
return $reporting->printReport('emacs', $filesViolations, false, null);
return $phpcs->reporting->printReport('emacs', false, null);
}
}
3 changes: 1 addition & 2 deletions components/lib/Components/Qc/Task/Unit.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public function getName()
*/
public function validate($options)
{
if (!class_exists('Horde_Test_AllTests') ||
!class_exists('PHPUnit_TextUI_TestRunner')) {
if (!class_exists('Horde_Test_AllTests')) {
return array('PHPUnit is not available!');
}
}
Expand Down

0 comments on commit 0023df6

Please sign in to comment.