Permalink
Browse files

Fixed bug #20097 : CLI.php throws error in php 5.2

  • Loading branch information...
1 parent 5ea0972 commit 4b615f4e1dd6d3a2961e9e01dabecc571e9c842a @gsherwood gsherwood committed Oct 23, 2013
Showing with 4 additions and 8 deletions.
  1. +1 −2 CodeSniffer/CLI.php
  2. +1 −3 CodeSniffer/Reports/Junit.php
  3. +1 −3 CodeSniffer/Reports/Xml.php
  4. +1 −0 package.xml
View
3 CodeSniffer/CLI.php
@@ -307,8 +307,7 @@ public function processLongArgument($arg, $pos, $values)
exit(0);
break;
case 'version':
- $phpcs = new PHP_CodeSniffer();
- echo 'PHP_CodeSniffer version '.$phpcs::VERSION.' ('.$phpcs::STABILITY.') ';
+ echo 'PHP_CodeSniffer version '.PHP_CodeSniffer::VERSION.' ('.PHP_CodeSniffer::STABILITY.') ';
echo 'by Squiz (http://www.squiz.net)'.PHP_EOL;
exit(0);
break;
View
4 CodeSniffer/Reports/Junit.php
@@ -66,10 +66,8 @@ public function generate(
$out->setIndent(true);
$out->startDocument('1.0', 'UTF-8');
- $phpcs = new PHP_CodeSniffer;
-
$out->startElement('testsuites');
- $out->writeAttribute('name', 'PHP_CodeSniffer '.$phpcs::VERSION);
+ $out->writeAttribute('name', 'PHP_CodeSniffer '.PHP_CodeSniffer::VERSION);
$out->writeAttribute('tests', $tests);
$out->writeAttribute('failures', $errors);
View
4 CodeSniffer/Reports/Xml.php
@@ -55,10 +55,8 @@ public function generate(
$out->openMemory();
$out->setIndent(true);
$out->startDocument('1.0', 'UTF-8');
-
- $phpcs = new PHP_CodeSniffer;
$out->startElement('phpcs');
- $out->writeAttribute('version', $phpcs::VERSION);
+ $out->writeAttribute('version', PHP_CodeSniffer::VERSION);
$errorsShown = 0;
View
1 package.xml
@@ -26,6 +26,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
<notes>
+ - Fixed bug #20097 : CLI.php throws error in php 5.2
- Fixed bug #20100 : incorrect Function mysql() has been deprecated report
</notes>
<contents>

0 comments on commit 4b615f4

Please sign in to comment.