Reorganize use statements, autoload Tokens class
parent
2bcabb34dd
commit
a363428b53
|
@ -11,10 +11,9 @@ use LanguageServer\Protocol\ {
|
||||||
use Exception;
|
use Exception;
|
||||||
use PHP_CodeSniffer\ {
|
use PHP_CodeSniffer\ {
|
||||||
Config,
|
Config,
|
||||||
Ruleset,
|
Ruleset
|
||||||
Files\DummyFile,
|
|
||||||
Util\Tokens
|
|
||||||
};
|
};
|
||||||
|
use PHP_CodeSniffer\Files\DummyFile;
|
||||||
|
|
||||||
abstract class Formatter
|
abstract class Formatter
|
||||||
{
|
{
|
||||||
|
@ -42,9 +41,9 @@ abstract class Formatter
|
||||||
$config = new Config(['dummy'], false);
|
$config = new Config(['dummy'], false);
|
||||||
$config->standards = self::findConfiguration($path);
|
$config->standards = self::findConfiguration($path);
|
||||||
|
|
||||||
// Create this class so it is autoloaded and sets up a bunch
|
// Autoload class to sets up a bunch
|
||||||
// of PHP_CodeSniffer-specific token type constants.
|
// of PHP_CodeSniffer-specific token type constants.
|
||||||
new Tokens();
|
spl_autoload_call('PHP_CodeSniffer\Util\Tokens');
|
||||||
|
|
||||||
$file = new DummyFile($content, new Ruleset($config), $config);
|
$file = new DummyFile($content, new Ruleset($config), $config);
|
||||||
$file->process();
|
$file->process();
|
||||||
|
|
Loading…
Reference in New Issue