Skip to content

Commit f61025c

Browse files
committed
Initial attempt at a namespace-based cleanup of the code. Almost nothing is working right now.
1 parent 081f49a commit f61025c

File tree

921 files changed

+6837
-7241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

921 files changed

+6837
-7241
lines changed

CodeSniffer.php

Lines changed: 0 additions & 2462 deletions
This file was deleted.

CodeSniffer/File.php

Lines changed: 0 additions & 3570 deletions
This file was deleted.
File renamed without changes.

scripts/phpcs renamed to bin/phpcs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,14 @@
99
* @category PHP
1010
* @package PHP_CodeSniffer
1111
* @author Greg Sherwood <[email protected]>
12-
* @author Marc McIntyre <[email protected]>
1312
* @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600)
1413
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
1514
* @link http://pear.php.net/package/PHP_CodeSniffer
1615
*/
1716

18-
if (is_file(dirname(__FILE__).'/../CodeSniffer/CLI.php') === true) {
19-
include_once dirname(__FILE__).'/../CodeSniffer/CLI.php';
20-
} else {
21-
include_once 'PHP/CodeSniffer/CLI.php';
22-
}
17+
require_once 'vendor/autoload.php';
2318

24-
$cli = new PHP_CodeSniffer_CLI();
25-
$cli->runphpcs();
19+
use PHP_CodeSniffer\Runner;
20+
21+
$runner = new Runner();
22+
$runner->runPHPCS();

composer.json

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,14 @@
2525
}
2626
},
2727
"autoload": {
28-
"classmap": [
29-
"CodeSniffer.php",
30-
"CodeSniffer/CLI.php",
31-
"CodeSniffer/Exception.php",
32-
"CodeSniffer/File.php",
33-
"CodeSniffer/Fixer.php",
34-
"CodeSniffer/Report.php",
35-
"CodeSniffer/Reporting.php",
36-
"CodeSniffer/Sniff.php",
37-
"CodeSniffer/Tokens.php",
38-
"CodeSniffer/Reports/",
39-
"CodeSniffer/Tokenizers/",
40-
"CodeSniffer/DocGenerators/",
41-
"CodeSniffer/Standards/AbstractPatternSniff.php",
42-
"CodeSniffer/Standards/AbstractScopeSniff.php",
43-
"CodeSniffer/Standards/AbstractVariableSniff.php",
44-
"CodeSniffer/Standards/IncorrectPatternException.php",
45-
"CodeSniffer/Standards/Generic/Sniffs/",
46-
"CodeSniffer/Standards/MySource/Sniffs/",
47-
"CodeSniffer/Standards/PEAR/Sniffs/",
48-
"CodeSniffer/Standards/PSR1/Sniffs/",
49-
"CodeSniffer/Standards/PSR2/Sniffs/",
50-
"CodeSniffer/Standards/Squiz/Sniffs/",
51-
"CodeSniffer/Standards/Zend/Sniffs/"
52-
]
28+
"psr-4": {"PHP_CodeSniffer\\": "src/"}
5329
},
5430
"require": {
5531
"php": ">=5.1.2",
5632
"ext-tokenizer": "*",
5733
"ext-xmlwriter": "*"
5834
},
5935
"bin": [
60-
"scripts/phpcs",
61-
"scripts/phpcbf"
36+
"bin/phpcs"
6237
]
6338
}

0 commit comments

Comments
 (0)