@@ -495,7 +495,7 @@ public function getPid()
495495 * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
496496 * @throws RuntimeException In case of failure
497497 */
498- public function signal ($ signal )
498+ public function signal (int $ signal )
499499 {
500500 $ this ->doSignal ($ signal , true );
501501
@@ -897,7 +897,7 @@ public function getStatus()
897897 *
898898 * @return int The exit-code of the process
899899 */
900- public function stop ($ timeout = 10 , $ signal = null )
900+ public function stop (float $ timeout = 10 , int $ signal = null )
901901 {
902902 $ timeoutMicro = microtime (true ) + $ timeout ;
903903 if ($ this ->isRunning ()) {
@@ -1028,13 +1028,11 @@ public function setIdleTimeout($timeout)
10281028 /**
10291029 * Enables or disables the TTY mode.
10301030 *
1031- * @param bool $tty True to enabled and false to disable
1032- *
10331031 * @return self The current Process instance
10341032 *
10351033 * @throws RuntimeException In case the TTY mode is not supported
10361034 */
1037- public function setTty ($ tty )
1035+ public function setTty (bool $ tty )
10381036 {
10391037 if ('\\' === \DIRECTORY_SEPARATOR && $ tty ) {
10401038 throw new RuntimeException ('TTY mode is not supported on Windows platform. ' );
@@ -1062,13 +1060,11 @@ public function isTty()
10621060 /**
10631061 * Sets PTY mode.
10641062 *
1065- * @param bool $bool
1066- *
10671063 * @return self
10681064 */
1069- public function setPty ($ bool )
1065+ public function setPty (bool $ bool )
10701066 {
1071- $ this ->pty = ( bool ) $ bool ;
1067+ $ this ->pty = $ bool ;
10721068
10731069 return $ this ;
10741070 }
@@ -1102,11 +1098,9 @@ public function getWorkingDirectory()
11021098 /**
11031099 * Sets the current working directory.
11041100 *
1105- * @param string $cwd The new working directory
1106- *
11071101 * @return self The current Process instance
11081102 */
1109- public function setWorkingDirectory ($ cwd )
1103+ public function setWorkingDirectory (string $ cwd )
11101104 {
11111105 $ this ->cwd = $ cwd ;
11121106
@@ -1185,11 +1179,9 @@ public function setInput($input)
11851179 /**
11861180 * Sets whether environment variables will be inherited or not.
11871181 *
1188- * @param bool $inheritEnv
1189- *
11901182 * @return self The current Process instance
11911183 */
1192- public function inheritEnvironmentVariables ($ inheritEnv = true )
1184+ public function inheritEnvironmentVariables (bool $ inheritEnv = true )
11931185 {
11941186 if (!$ inheritEnv ) {
11951187 throw new InvalidArgumentException ('Not inheriting environment variables is not supported. ' );
@@ -1316,7 +1308,7 @@ protected function buildCallback(callable $callback = null)
13161308 *
13171309 * @param bool $blocking Whether to use a blocking read call
13181310 */
1319- protected function updateStatus ($ blocking )
1311+ protected function updateStatus (bool $ blocking )
13201312 {
13211313 if (self ::STATUS_STARTED !== $ this ->status ) {
13221314 return ;
0 commit comments