for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PhpSpellcheck\Exception;
use Symfony\Component\Process\Process;
class ProcessFailedException extends \RuntimeException implements ExceptionInterface
{
/**
* @var Process
*/
private $process;
public function __construct(
Process $process,
\Throwable $previous = null,
string $failureReason = '',
int $code = 0
) {
$this->process = $process;
$message = \Safe\sprintf(
Safe\sprintf()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
$message = /** @scrutinizer ignore-deprecated */ \Safe\sprintf(
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
'Process with command "%s" has failed%s with exit code %d(%s)%s',
$process->getCommandLine(),
$process->isStarted() ? ' running' : '',
$process->getExitCode(),
$process->getExitCodeText(),
$failureReason !== '' ? ' because "' . $failureReason . '"' : ''
);
parent::__construct(
$message,
$code,
$previous
}
public function getProcess(): Process
return $this->process;
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.