for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace hiapi\exceptions;
/**
* Class NotProcessableException
*
* @author Dmytro Naumenko <[email protected]>
*/
class NotProcessableException extends \RuntimeException
{
* @var int
protected $progressionMultiplier = 1;
private $secondsBeforeRetry;
private $maxTries;
public function maxTries(int $maxTries): NotProcessableException
$this->maxTries = $maxTries;
return $this;
}
* @param $delaySeconds
* @param float $progressionMultiplier
* @return self
public function retryProgressively($delaySeconds, $progressionMultiplier): NotProcessableException
$this->secondsBeforeRetry = $delaySeconds;
$this->progressionMultiplier = $progressionMultiplier;
$progressionMultiplier
integer
double
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.
$answer = 42; $correct = false; $correct = (bool) $answer;
* @return int
public function getSecondsBeforeRetry(): ?int
return $this->secondsBeforeRetry;
public function getMaxTries(): ?int
return $this->maxTries;
public function getProgressionMultiplier(): int
return $this->progressionMultiplier;
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.