diff options
Diffstat (limited to 'bridges/GithubPullRequestBridge.php')
-rw-r--r-- | bridges/GithubPullRequestBridge.php | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/bridges/GithubPullRequestBridge.php b/bridges/GithubPullRequestBridge.php index 82f901d1..b508a919 100644 --- a/bridges/GithubPullRequestBridge.php +++ b/bridges/GithubPullRequestBridge.php @@ -1,44 +1,45 @@ <?php -class GitHubPullRequestBridge extends GithubIssueBridge { - const NAME = 'GitHub Pull Request'; - const DESCRIPTION = 'Returns the pull request or comments of a pull request of a GitHub project'; +class GitHubPullRequestBridge extends GithubIssueBridge +{ + const NAME = 'GitHub Pull Request'; + const DESCRIPTION = 'Returns the pull request or comments of a pull request of a GitHub project'; - const PARAMETERS = array( - 'global' => array( - 'u' => array( - 'name' => 'User name', - 'exampleValue' => 'RSS-Bridge', - 'required' => true - ), - 'p' => array( - 'name' => 'Project name', - 'exampleValue' => 'rss-bridge', - 'required' => true - ) - ), - 'Project Pull Requests' => array( - 'c' => array( - 'name' => 'Show Pull Request Comments', - 'type' => 'checkbox' - ), - 'q' => array( - 'name' => 'Search Query', - 'defaultValue' => 'is:pr is:open sort:created-desc', - 'required' => true - ) - ), - 'Pull Request comments' => array( - 'i' => array( - 'name' => 'Pull Request number', - 'type' => 'number', - 'exampleValue' => '2100', - 'required' => true - ) - ) - ); + const PARAMETERS = [ + 'global' => [ + 'u' => [ + 'name' => 'User name', + 'exampleValue' => 'RSS-Bridge', + 'required' => true + ], + 'p' => [ + 'name' => 'Project name', + 'exampleValue' => 'rss-bridge', + 'required' => true + ] + ], + 'Project Pull Requests' => [ + 'c' => [ + 'name' => 'Show Pull Request Comments', + 'type' => 'checkbox' + ], + 'q' => [ + 'name' => 'Search Query', + 'defaultValue' => 'is:pr is:open sort:created-desc', + 'required' => true + ] + ], + 'Pull Request comments' => [ + 'i' => [ + 'name' => 'Pull Request number', + 'type' => 'number', + 'exampleValue' => '2100', + 'required' => true + ] + ] + ]; - const BRIDGE_OPTIONS = array(0 => 'Project Pull Requests', 1 => 'Pull Request comments'); - const URL_PATH = 'pull'; - const SEARCH_QUERY_PATH = 'pulls'; + const BRIDGE_OPTIONS = [0 => 'Project Pull Requests', 1 => 'Pull Request comments']; + const URL_PATH = 'pull'; + const SEARCH_QUERY_PATH = 'pulls'; } |