Skip to content

Commit 932b186

Browse files
committed
Merge pull request #65 from thiemowmde/patch-2
Fix capitalization of RunTimeException usages
2 parents 70f62a8 + 47d6850 commit 932b186

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/Process/Process.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace JakubOnderka\PhpParallelLint\Process;
34

45
use JakubOnderka\PhpParallelLint\RunTimeException;
@@ -33,7 +34,7 @@ class Process
3334
/**
3435
* @param string $cmdLine
3536
* @param string $stdInInput
36-
* @throws RuntimeException
37+
* @throws RunTimeException
3738
*/
3839
public function __construct($cmdLine, $stdInInput = null)
3940
{
@@ -46,7 +47,7 @@ public function __construct($cmdLine, $stdInInput = null)
4647
$this->process = proc_open($cmdLine, $descriptors, $pipes, null, null, array('bypass_shell' => true));
4748

4849
if ($this->process === false) {
49-
throw new RuntimeException("Cannot create new process $cmdLine");
50+
throw new RunTimeException("Cannot create new process $cmdLine");
5051
}
5152

5253
list($stdin, $this->stdout, $this->stderr) = $pipes;
@@ -102,38 +103,38 @@ public function waitForFinish()
102103

103104
/**
104105
* @return string
105-
* @throws RuntimeException
106+
* @throws RunTimeException
106107
*/
107108
public function getOutput()
108109
{
109110
if (!$this->isFinished()) {
110-
throw new RuntimeException("Cannot get output for running process");
111+
throw new RunTimeException("Cannot get output for running process");
111112
}
112113

113114
return $this->output;
114115
}
115116

116117
/**
117118
* @return string
118-
* @throws RuntimeException
119+
* @throws RunTimeException
119120
*/
120121
public function getErrorOutput()
121122
{
122123
if (!$this->isFinished()) {
123-
throw new RuntimeException("Cannot get error output for running process");
124+
throw new RunTimeException("Cannot get error output for running process");
124125
}
125126

126127
return $this->errorOutput;
127128
}
128129

129130
/**
130131
* @return int
131-
* @throws RuntimeException
132+
* @throws RunTimeException
132133
*/
133134
public function getStatusCode()
134135
{
135136
if (!$this->isFinished()) {
136-
throw new RuntimeException("Cannot get status code for running process");
137+
throw new RunTimeException("Cannot get status code for running process");
137138
}
138139

139140
return $this->statusCode;
@@ -146,4 +147,4 @@ public function isFail()
146147
{
147148
return $this->getStatusCode() === 1;
148149
}
149-
}
150+
}

0 commit comments

Comments
 (0)