public countStatus ( string $status ) : integer | ||
$status | string | a status (pending, running, succeeded, failed) |
Результат | integer |
public function countStatus($status)
{
if ($status === 'pending') {
return $this->countPending();
} elseif ($status === 'running') {
return $this->countRunning();
} elseif ($status === 'succeeded') {
return $this->countSucceeded();
} elseif ($status === 'failed') {
return $this->countFailed();
}
throw new \InvalidArgumentException(sprintf('Status "%s" seems not to be a good status.', $status));
}