refactor: prepare for PSR2 (#2859)

This commit is contained in:
Dag 2022-06-24 18:29:35 +02:00 committed by GitHub
parent d2313bddcc
commit 5076d09de6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 140 additions and 146 deletions

View file

@ -263,23 +263,22 @@ class GithubIssueBridge extends BridgeAbstract {
$path_segments = array_values(array_filter(explode('/', $url_components['path'])));
switch(count($path_segments)) {
case 2: { // Project issues
case 2: // Project issues
list($user, $project) = $path_segments;
$show_comments = 'off';
} break;
case 3: { // Project issues with issue comments
break;
case 3: // Project issues with issue comments
if($path_segments[2] !== static::URL_PATH) {
return null;
}
list($user, $project) = $path_segments;
$show_comments = 'on';
} break;
case 4: { // Issue comments
break;
case 4: // Issue comments
list($user, $project, /* issues */, $issue) = $path_segments;
} break;
default: {
break;
default:
return null;
}
}
return array(