Skip to content

Commit ad5046a

Browse files
committed
Merge branch 'master' into report-memory-improvements
Conflicts: CodeSniffer/Reports/Junit.php CodeSniffer/Reports/Xml.php package.xml
2 parents a7da037 + 4b615f4 commit ad5046a

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

CodeSniffer/CLI.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ public function processLongArgument($arg, $pos, $values)
307307
exit(0);
308308
break;
309309
case 'version':
310-
$phpcs = new PHP_CodeSniffer();
311-
echo 'PHP_CodeSniffer version '.$phpcs::VERSION.' ('.$phpcs::STABILITY.') ';
310+
echo 'PHP_CodeSniffer version '.PHP_CodeSniffer::VERSION.' ('.PHP_CodeSniffer::STABILITY.') ';
312311
echo 'by Squiz (http://www.squiz.net)'.PHP_EOL;
313312
exit(0);
314313
break;

CodeSniffer/Reports/Junit.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ public function generate(
133133
$width=80,
134134
$toScreen=true
135135
) {
136-
$phpcs = new PHP_CodeSniffer;
137136
$failures = ($totalErrors + $totalWarnings);
138137
echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
139-
echo '<testsuites name="PHP_CodeSniffer '.$phpcs::VERSION.'" tests="'.$this->_tests.'" failures="'.$failures.'">'.PHP_EOL;
138+
echo '<testsuites name="PHP_CodeSniffer '.PHP_CodeSniffer::VERSION.'" tests="'.$this->_tests.'" failures="'.$failures.'">'.PHP_EOL;
140139
echo $cachedData;
141140
echo '</testsuites>'.PHP_EOL;
142141

CodeSniffer/Reports/Xml.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ public function generate(
115115
$width=80,
116116
$toScreen=true
117117
) {
118-
$phpcs = new PHP_CodeSniffer;
119118
echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
120-
echo '<phpcs version="'.$phpcs::VERSION.'">'.PHP_EOL;
119+
echo '<phpcs version="'.PHP_CodeSniffer::VERSION.'">'.PHP_EOL;
121120
echo $cachedData;
122121
echo '</phpcs>'.PHP_EOL;
123122

package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
2727
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
2828
<notes>
2929
- Fixed bug #20093 : Bug with ternary operator token
30+
- Fixed bug #20097 : CLI.php throws error in php 5.2
3031
- Fixed bug #20100 : incorrect Function mysql() has been deprecated report
3132
</notes>
3233
<contents>

0 commit comments

Comments
 (0)