@@ -76,13 +76,13 @@ public function behatCliWriteFeatureContextFile(array $traits = []): string {
7676 '{{USE_IN_CLASS}} ' => '' ,
7777 ];
7878 foreach ($ traits as $ path => $ trait ) {
79- $ traitName = $ trait ;
79+ $ trait_name = $ trait ;
8080 if (strpos ($ trait , '\\' ) !== FALSE ) {
8181 $ tokens ['{{USE_DECLARATION}} ' ] .= sprintf ('use %s; ' . PHP_EOL , $ trait );
82- $ traitNameParts = explode ('\\' , $ trait );
83- $ traitName = end ($ traitNameParts );
82+ $ trait_name_parts = explode ('\\' , $ trait );
83+ $ trait_name = end ($ trait_name_parts );
8484 }
85- $ tokens ['{{USE_IN_CLASS}} ' ] .= sprintf ('use %s; ' . PHP_EOL , $ traitName );
85+ $ tokens ['{{USE_IN_CLASS}} ' ] .= sprintf ('use %s; ' . PHP_EOL , $ trait_name );
8686
8787 if (is_string ($ path ) && file_exists ($ path )) {
8888 $ filename = $ this ->workingDir . DIRECTORY_SEPARATOR . 'features/bootstrap/ ' . basename ($ path );
@@ -182,11 +182,11 @@ public function behatCliWriteScenarioSteps(PyStringNode $content, string $tags =
182182 $ content = strtr ((string ) $ content , ["''' " => '""" ' ]);
183183
184184 // Make sure that indentation in provided content is accurate.
185- $ contentLines = explode (PHP_EOL , $ content );
186- foreach ($ contentLines as $ k => $ contentLine ) {
187- $ contentLines [$ k ] = str_repeat (' ' , 4 ) . trim ($ contentLine );
185+ $ content_lines = explode (PHP_EOL , $ content );
186+ foreach ($ content_lines as $ k => $ content_line ) {
187+ $ content_lines [$ k ] = str_repeat (' ' , 4 ) . trim ($ content_line );
188188 }
189- $ content = implode (PHP_EOL , $ contentLines );
189+ $ content = implode (PHP_EOL , $ content_lines );
190190
191191 $ tokens = [
192192 '{{SCENARIO_CONTENT}} ' => $ content ,
@@ -333,16 +333,16 @@ public function behatCliWriteScreenshotTestContext(PyStringNode $content): void
333333 }
334334
335335 // Update the behat.yml to include this context.
336- $ behatYmlPath = $ this ->workingDir . DIRECTORY_SEPARATOR . 'behat.yml ' ;
337- if (file_exists ($ behatYmlPath )) {
338- $ behatYml = file_get_contents ($ behatYmlPath );
339- if (strpos ($ behatYml , 'FullscreenTestContext ' ) === FALSE ) {
340- $ behatYml = str_replace (
336+ $ behat_yml_path = $ this ->workingDir . DIRECTORY_SEPARATOR . 'behat.yml ' ;
337+ if (file_exists ($ behat_yml_path )) {
338+ $ behat_yml = file_get_contents ($ behat_yml_path );
339+ if (strpos ($ behat_yml , 'FullscreenTestContext ' ) === FALSE ) {
340+ $ behat_yml = str_replace (
341341 'ScreenshotContext ' ,
342342 "ScreenshotContext \n - FullscreenTestContext " ,
343- $ behatYml
343+ $ behat_yml
344344 );
345- file_put_contents ($ behatYmlPath , $ behatYml );
345+ file_put_contents ($ behat_yml_path , $ behat_yml );
346346 }
347347 }
348348 }
0 commit comments