private function getStatus(array $statuses)
{
foreach ($statuses as $status) {
if (false !== stripos($status['context'], 'StyleCI')) {
return ['status' => $status['state'], 'patch_url' => $status['target_url'] . '/diff'];
}
}
throw new UserException('No StyleCI status found in commit, make sure StyleCI is enabled for the repository.' . "\n" . 'And that analyses exist for the commit/pull-request.');
}