@@ -43,20 +43,19 @@ class StanCs
4343 private $ fileToAnalise ;
4444
4545
46-
4746 /**
4847 * StanCs constructor.
4948 *
50- * @param array $argv
49+ * @param array $argv
5150 * @param string $projectRootDir
5251 */
5352 public function __construct (array $ argv , string $ projectRootDir )
5453 {
55- $ this ->projectRootDir = $ projectRootDir ;
54+ $ this ->projectRootDir = $ projectRootDir ;
5655 $ this ->phpstancsRootDir = __DIR__ . '/../ ' ;
57- $ this ->argv = $ argv ;
58- $ this ->fileToAnalise = $ this ->argv [1 ];
59- $ this ->config = $ this ->getConfig ();
56+ $ this ->argv = $ argv ;
57+ $ this ->fileToAnalise = $ this ->argv [1 ];
58+ $ this ->config = $ this ->getConfig ();
6059 }
6160
6261 public function run (): string
@@ -66,7 +65,7 @@ public function run(): string
6665 }
6766
6867 if ($ this ->argv [1 ] === '--version ' || in_array ('-i ' , $ this ->argv , true )) {
69- return $ this ->getCsOutput ();
68+ return $ this ->getCsOutput ();
7069 }
7170
7271 if (!$ this ->config ->runCs ) {
@@ -116,7 +115,7 @@ protected function getStanOutput(): string
116115 */
117116 protected function getCsOutput (): string
118117 {
119- $ args = $ this ->argv ;
118+ $ args = $ this ->argv ;
120119 array_shift ($ args );
121120
122121 ob_start ();
@@ -153,8 +152,8 @@ private function getConfig(): Config
153152
154153 if (file_exists ($ configFile )) {
155154 $ NeonConfig = $ this ->decodeNeonFile ($ configFile );
156- if (isset ($ NeonConfig ['parameters ' ]['runCS ' ])) {
157- $ config ->runCs = (bool )$ NeonConfig ['parameters ' ]['runCS ' ];
155+ if (isset ($ NeonConfig ['parameters ' ]['phpstancs ' ][ ' runCS ' ])) {
156+ $ config ->runCs = (bool )$ NeonConfig ['parameters ' ]['phpstancs ' ][ ' runCS ' ];
158157 }
159158 }
160159
0 commit comments