@@ -115,6 +115,7 @@ class Config
115
115
'tabWidth ' => null ,
116
116
'encoding ' => null ,
117
117
'extensions ' => null ,
118
+ 'editorPath ' => null ,
118
119
'sniffs ' => null ,
119
120
'exclude ' => null ,
120
121
'ignored ' => null ,
@@ -485,6 +486,7 @@ public function restoreDefaults()
485
486
$ this ->reportFile = null ;
486
487
$ this ->generator = null ;
487
488
$ this ->filter = null ;
489
+ $ this ->editorPath = null ;
488
490
$ this ->bootstrap = [];
489
491
$ this ->basepath = null ;
490
492
$ this ->reports = ['full ' => null ];
@@ -503,6 +505,11 @@ public function restoreDefaults()
503
505
$ this ->standards = explode (', ' , $ standard );
504
506
}
505
507
508
+ $ editorPath = self ::getConfigData ('editorPath ' );
509
+ if ($ editorPath !== null ) {
510
+ $ this ->editorPath = $ editorPath ;
511
+ }
512
+
506
513
$ reportFormat = self ::getConfigData ('report_format ' );
507
514
if ($ reportFormat !== null ) {
508
515
$ this ->reports = [$ reportFormat => null ];
@@ -839,6 +846,9 @@ public function processLongArgument($arg, $pos)
839
846
840
847
$ this ->sniffs = $ sniffs ;
841
848
self ::$ overriddenDefaults ['sniffs ' ] = true ;
849
+ } else if (substr ($ arg , 0 , 12 ) === 'editor-path= ' ) {
850
+ $ this ->editorPath = substr ($ arg , 12 );
851
+ self ::$ overriddenDefaults ['editorPath ' ] = true ;
842
852
} else if (substr ($ arg , 0 , 8 ) === 'exclude= ' ) {
843
853
if (isset (self ::$ overriddenDefaults ['exclude ' ]) === true ) {
844
854
break ;
@@ -1361,7 +1371,7 @@ public function printPHPCSUsage()
1361
1371
echo ' [--report-width=<reportWidth>] [--basepath=<basepath>] [--bootstrap=<bootstrap>] ' .PHP_EOL ;
1362
1372
echo ' [--severity=<severity>] [--error-severity=<severity>] [--warning-severity=<severity>] ' .PHP_EOL ;
1363
1373
echo ' [--runtime-set key value] [--config-set key value] [--config-delete key] [--config-show] ' .PHP_EOL ;
1364
- echo ' [--standard=<standard>] [--sniffs=<sniffs>] [--exclude=<sniffs>] ' .PHP_EOL ;
1374
+ echo ' [--standard=<standard>] [--sniffs=<sniffs>] [--exclude=<sniffs>] [--editor-path=<path>] ' .PHP_EOL ;
1365
1375
echo ' [--encoding=<encoding>] [--parallel=<processes>] [--generator=<generator>] ' .PHP_EOL ;
1366
1376
echo ' [--extensions=<extensions>] [--ignore=<patterns>] [--ignore-annotations] ' .PHP_EOL ;
1367
1377
echo ' [--stdin-path=<stdinPath>] [--file-list=<fileList>] <file> - ... ' .PHP_EOL ;
0 commit comments