Loading src/Commands/BehatCommands.php +3 −13 Original line number Diff line number Diff line Loading @@ -91,9 +91,7 @@ class BehatCommands extends DrushCommands implements BehatCommandsInterface { $this->validatePath(self::OPT_PARAMS_FILES, $params_file, $opt_params_file, FALSE, FALSE); $file_contents = Yaml::decode(file_get_contents($params_file)); if (empty($file_contents) || !is_array($file_contents)) { throw new \RuntimeException('Valid parameters are not found in PARAMS_FILE: @opt_params_file', [ '@opt_params_file' => $opt_params_file, ]); throw new \RuntimeException("No valid parameters are found in PARAMS_FILE: ${opt_params_file}"); } $params += $file_contents; } Loading @@ -101,9 +99,7 @@ class BehatCommands extends DrushCommands implements BehatCommandsInterface { $output_dir = $base_path . $opt_output_dir; if (!file_exists($output_dir)) { if (!mkdir($tmp_dir = $output_dir, 0755, TRUE) && !is_dir($tmp_dir)) { throw new \RuntimeException('Failed to create a directory of OUTPUT_DIR: @opt_output_dir', [ '@opt_output_dir' => $opt_output_dir, ]); throw new \RuntimeException("Failed to create a directory of OUTPUT_DIR: ${opt_output_dir}"); } $this->logger()->notice(dt('Created: @opt', ['@opt' => $output_dir])); } Loading Loading @@ -197,13 +193,7 @@ class BehatCommands extends DrushCommands implements BehatCommandsInterface { $permission = $isWritable ? 'writable' : 'readable'; $operation = 'is_' . $permission; if (!$operation($path) || ($isDir && !is_dir($path))) { throw new \RuntimeException('No such @type exists or is @permission for @path_name: @opt_path (path: @path)', [ '@type' => $isDir ? 'directory' : 'file', '@permission' => $permission, '@path_name' => strtoupper($path_name), '@opt_path' => $opt_path, '@path' => $path, ]); throw new \RuntimeException("No such directory/file exists or is ${permission} for ${path_name}: ${opt_path} (path: ${path})"); } } Loading Loading
src/Commands/BehatCommands.php +3 −13 Original line number Diff line number Diff line Loading @@ -91,9 +91,7 @@ class BehatCommands extends DrushCommands implements BehatCommandsInterface { $this->validatePath(self::OPT_PARAMS_FILES, $params_file, $opt_params_file, FALSE, FALSE); $file_contents = Yaml::decode(file_get_contents($params_file)); if (empty($file_contents) || !is_array($file_contents)) { throw new \RuntimeException('Valid parameters are not found in PARAMS_FILE: @opt_params_file', [ '@opt_params_file' => $opt_params_file, ]); throw new \RuntimeException("No valid parameters are found in PARAMS_FILE: ${opt_params_file}"); } $params += $file_contents; } Loading @@ -101,9 +99,7 @@ class BehatCommands extends DrushCommands implements BehatCommandsInterface { $output_dir = $base_path . $opt_output_dir; if (!file_exists($output_dir)) { if (!mkdir($tmp_dir = $output_dir, 0755, TRUE) && !is_dir($tmp_dir)) { throw new \RuntimeException('Failed to create a directory of OUTPUT_DIR: @opt_output_dir', [ '@opt_output_dir' => $opt_output_dir, ]); throw new \RuntimeException("Failed to create a directory of OUTPUT_DIR: ${opt_output_dir}"); } $this->logger()->notice(dt('Created: @opt', ['@opt' => $output_dir])); } Loading Loading @@ -197,13 +193,7 @@ class BehatCommands extends DrushCommands implements BehatCommandsInterface { $permission = $isWritable ? 'writable' : 'readable'; $operation = 'is_' . $permission; if (!$operation($path) || ($isDir && !is_dir($path))) { throw new \RuntimeException('No such @type exists or is @permission for @path_name: @opt_path (path: @path)', [ '@type' => $isDir ? 'directory' : 'file', '@permission' => $permission, '@path_name' => strtoupper($path_name), '@opt_path' => $opt_path, '@path' => $path, ]); throw new \RuntimeException("No such directory/file exists or is ${permission} for ${path_name}: ${opt_path} (path: ${path})"); } } Loading