Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/phpcs-fixer' into phar
Browse files Browse the repository at this point in the history
Conflicts:
	CodeSniffer/CLI.php
  • Loading branch information
Benjamin Pearson committed Mar 3, 2014
2 parents c5a0896 + 2eb8400 commit 4f50dc2
Show file tree
Hide file tree
Showing 470 changed files with 2,857 additions and 1,643 deletions.
219 changes: 172 additions & 47 deletions CodeSniffer.php

Large diffs are not rendered by default.

238 changes: 129 additions & 109 deletions CodeSniffer/CLI.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CodeSniffer/DocGenerators/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
Expand All @@ -23,7 +23,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @version Release: @package_version@
* @link http://pear.php.net/package/PHP_CodeSniffer
Expand Down
6 changes: 3 additions & 3 deletions CodeSniffer/DocGenerators/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
Expand All @@ -28,7 +28,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @version Release: @package_version@
* @link http://pear.php.net/package/PHP_CodeSniffer
Expand Down Expand Up @@ -170,7 +170,7 @@ protected function printToc($standardFiles)
$doc = new DOMDocument();
$doc->load($standard);
$documentation = $doc->getElementsByTagName('documentation')->item(0);
$title = $this->getTitle($documentation);
$title = $this->getTitle($documentation);
echo ' <li><a href="#'.str_replace(' ', '-', $title)."\">$title</a></li>".PHP_EOL;
}

Expand Down
20 changes: 10 additions & 10 deletions CodeSniffer/DocGenerators/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
Expand All @@ -26,7 +26,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @version Release: @package_version@
* @link http://pear.php.net/package/PHP_CodeSniffer
Expand Down Expand Up @@ -143,22 +143,22 @@ protected function printCodeComparisonBlock($node)

$firstTitleLines = array();
$tempTitle = '';
$words = explode(' ', $firstTitle);
$words = explode(' ', $firstTitle);

foreach ($words as $word) {
if (strlen($tempTitle.$word) >= 45) {
if (strlen($tempTitle.$word) === 45) {
// Adding the extra space will push us to the edge
// so we are done.
$firstTitleLines[] = $tempTitle.$word;
$tempTitle = '';
$tempTitle = '';
} else if (strlen($tempTitle.$word) === 46) {
// We are already at the edge, so we are done.
$firstTitleLines[] = $tempTitle.$word;
$tempTitle = '';
$tempTitle = '';
} else {
$firstTitleLines[] = $tempTitle;
$tempTitle = $word;
$tempTitle = $word;
}
} else {
$tempTitle .= $word.' ';
Expand All @@ -178,22 +178,22 @@ protected function printCodeComparisonBlock($node)

$secondTitleLines = array();
$tempTitle = '';
$words = explode(' ', $secondTitle);
$words = explode(' ', $secondTitle);

foreach ($words as $word) {
if (strlen($tempTitle.$word) >= 45) {
if (strlen($tempTitle.$word) === 45) {
// Adding the extra space will push us to the edge
// so we are done.
$secondTitleLines[] = $tempTitle.$word;
$tempTitle = '';
$tempTitle = '';
} else if (strlen($tempTitle.$word) === 46) {
// We are already at the edge, so we are done.
$secondTitleLines[] = $tempTitle.$word;
$tempTitle = '';
$tempTitle = '';
} else {
$secondTitleLines[] = $tempTitle;
$tempTitle = $word;
$tempTitle = $word;
}
} else {
$tempTitle .= $word.' ';
Expand Down
4 changes: 2 additions & 2 deletions CodeSniffer/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
Expand All @@ -20,7 +20,7 @@
* @package PHP_CodeSniffer
* @author Greg Sherwood <[email protected]>
* @author Marc McIntyre <[email protected]>
* @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
* @version Release: @package_version@
* @link http://pear.php.net/package/PHP_CodeSniffer
Expand Down
Loading

0 comments on commit 4f50dc2

Please sign in to comment.