77use Symfony \Component \Process \PhpExecutableFinder ;
88
99/**
10- * Test workflow totally copied from https://github.com/Behat/WebApiExtension/blob/master/features/bootstrap/FeatureContext.php
10+ * Test workflow totally copied from https://github.com/Behat/WebApiExtension/blob/master/features/bootstrap/FeatureContext.php.
1111 */
1212class FeatureContext implements Context
1313{
@@ -44,8 +44,8 @@ public static function cleanTestFolders()
4444 */
4545 public function prepareScenario ()
4646 {
47- $ dir = self ::workingDir () . DIRECTORY_SEPARATOR . md5 (microtime () * rand (0 , 10000 ));
48- mkdir ($ dir . '/features/bootstrap ' , 0777 , true );
47+ $ dir = self ::workingDir (). DIRECTORY_SEPARATOR . md5 (( microtime (true ) * rand (0 , 10000 ) ));
48+ mkdir ($ dir. '/features/bootstrap ' , 0777 , true );
4949
5050 $ phpFinder = new PhpExecutableFinder ();
5151
@@ -64,7 +64,7 @@ public function prepareScenario()
6464 public function aFileNamedWith ($ filename , PyStringNode $ fileContent )
6565 {
6666 $ content = strtr ((string ) $ fileContent , array ("''' " => '""" ' ));
67- $ this ->createFile ($ this ->workingDir . '/ ' . $ filename , $ content );
67+ $ this ->createFile ($ this ->workingDir . '/ ' . $ filename , $ content );
6868 }
6969
7070 /**
@@ -119,14 +119,14 @@ private function getExitCode()
119119
120120 private function getOutput ()
121121 {
122- $ output = $ this ->process ->getErrorOutput () . $ this ->process ->getOutput ();
122+ $ output = $ this ->process ->getErrorOutput (). $ this ->process ->getOutput ();
123123
124124 // Normalize the line endings in the output
125125 if ("\n" !== PHP_EOL ) {
126126 $ output = str_replace (PHP_EOL , "\n" , $ output );
127127 }
128128
129- return trim (preg_replace (" / +$/m " , '' , $ output ));
129+ return trim (preg_replace (' / +$/m ' , '' , $ output ));
130130 }
131131
132132 private function createFile ($ filename , $ content )
@@ -142,7 +142,7 @@ private function createFile($filename, $content)
142142
143143 public static function workingDir ()
144144 {
145- return sys_get_temp_dir () . DIRECTORY_SEPARATOR . 'json-api-behat ' ;
145+ return sys_get_temp_dir (). DIRECTORY_SEPARATOR . 'json-api-behat ' ;
146146 }
147147
148148 private static function clearDirectory ($ path )
@@ -152,7 +152,7 @@ private static function clearDirectory($path)
152152 array_shift ($ files );
153153
154154 foreach ($ files as $ file ) {
155- $ file = $ path . DIRECTORY_SEPARATOR . $ file ;
155+ $ file = $ path. DIRECTORY_SEPARATOR . $ file ;
156156 if (is_dir ($ file )) {
157157 self ::clearDirectory ($ file );
158158 } else {
0 commit comments