Test Failed
Pull Request — master (#46)
by David
02:47
created
lib/GitHub/Receiver/Enterprise/License.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
 class License extends AbstractEnterprise
11 11
 {
12 12
 
13
-    /**
14
-     * Get license information
15
-     *
16
-     * @link https://developer.github.com/v3/enterprise/license/#get-license-information
17
-     * @return array
18
-     */
19
-    public function getLicenseInformation(): array
20
-    {
21
-        return $this->getApi()->request(sprintf('/enterprise/settings/license'));
22
-    }
13
+	/**
14
+	 * Get license information
15
+	 *
16
+	 * @link https://developer.github.com/v3/enterprise/license/#get-license-information
17
+	 * @return array
18
+	 */
19
+	public function getLicenseInformation(): array
20
+	{
21
+		return $this->getApi()->request(sprintf('/enterprise/settings/license'));
22
+	}
23 23
 } 
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/Enterprise/Ldap.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -15,67 +15,67 @@
 block discarded – undo
15 15
 class Ldap extends AbstractEnterprise
16 16
 {
17 17
 
18
-    /**
19
-     * Update LDAP mapping for a user
20
-     *
21
-     * @link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user
22
-     *
23
-     * @param string $username
24
-     *
25
-     * @return array
26
-     * @throws Exception
27
-     */
28
-    public function updateMappingUser(string $username): array
29
-    {
30
-        return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:username/mapping', $username),
31
-            Request::METHOD_PATCH);
32
-    }
18
+	/**
19
+	 * Update LDAP mapping for a user
20
+	 *
21
+	 * @link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user
22
+	 *
23
+	 * @param string $username
24
+	 *
25
+	 * @return array
26
+	 * @throws Exception
27
+	 */
28
+	public function updateMappingUser(string $username): array
29
+	{
30
+		return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:username/mapping', $username),
31
+			Request::METHOD_PATCH);
32
+	}
33 33
 
34
-    /**
35
-     * Sync LDAP mapping for a user
36
-     *
37
-     * @link https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-user
38
-     *
39
-     * @param int $userId
40
-     *
41
-     * @return array
42
-     * @throws Exception
43
-     */
44
-    public function syncMappingUser(int $userId): array
45
-    {
46
-        return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:user_id/sync', (string)$userId),
47
-            Request::METHOD_POST);
48
-    }
34
+	/**
35
+	 * Sync LDAP mapping for a user
36
+	 *
37
+	 * @link https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-user
38
+	 *
39
+	 * @param int $userId
40
+	 *
41
+	 * @return array
42
+	 * @throws Exception
43
+	 */
44
+	public function syncMappingUser(int $userId): array
45
+	{
46
+		return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/user/:user_id/sync', (string)$userId),
47
+			Request::METHOD_POST);
48
+	}
49 49
 
50
-    /**
51
-     * Update LDAP mapping for a team
52
-     *
53
-     * @link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team
54
-     *
55
-     * @param int $teamId
56
-     *
57
-     * @return array
58
-     * @throws Exception
59
-     */
60
-    public function updateMappingTeam(int $teamId): array
61
-    {
62
-        return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/mapping', (string)$teamId),
63
-            Request::METHOD_PATCH);
64
-    }
50
+	/**
51
+	 * Update LDAP mapping for a team
52
+	 *
53
+	 * @link https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team
54
+	 *
55
+	 * @param int $teamId
56
+	 *
57
+	 * @return array
58
+	 * @throws Exception
59
+	 */
60
+	public function updateMappingTeam(int $teamId): array
61
+	{
62
+		return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/mapping', (string)$teamId),
63
+			Request::METHOD_PATCH);
64
+	}
65 65
 
66
-    /**
67
-     * Sync LDAP mapping for a team
68
-     *
69
-     * @link https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-team
70
-     *
71
-     * @param int $teamId
72
-     *
73
-     * @return array
74
-     * @throws Exception
75
-     */
76
-    public function syncMappingTeam(int $teamId): array
77
-    {
78
-        return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/sync', (string)$teamId),
79
-            Request::METHOD_POST);
80
-    }
66
+	/**
67
+	 * Sync LDAP mapping for a team
68
+	 *
69
+	 * @link https://developer.github.com/v3/enterprise/ldap/#sync-ldap-mapping-for-a-team
70
+	 *
71
+	 * @param int $teamId
72
+	 *
73
+	 * @return array
74
+	 * @throws Exception
75
+	 */
76
+	public function syncMappingTeam(int $teamId): array
77
+	{
78
+		return $this->getApi()->request($this->getApi()->sprintf('/admin/ldap/teams/:team_id/sync', (string)$teamId),
79
+			Request::METHOD_POST);
80
+	}
81 81
 }
82 82
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/Enterprise/ManagementConsole.php 1 patch
Indentation   +202 added lines, -202 removed lines patch added patch discarded remove patch
@@ -12,206 +12,206 @@
 block discarded – undo
12 12
 class ManagementConsole extends AbstractEnterprise
13 13
 {
14 14
 
15
-    /** Properties */
16
-    protected $hostname = '';
17
-    protected $password = '';
18
-
19
-    /**
20
-     * Get password
21
-     *
22
-     * @return string
23
-     */
24
-    public function getPassword(): string
25
-    {
26
-        return $this->password;
27
-    }
28
-
29
-    /**
30
-     * Set password
31
-     *
32
-     * @param string $password
33
-     *
34
-     * @return ManagementConsole
35
-     */
36
-    public function setPassword(string $password): ManagementConsole
37
-    {
38
-        $this->password = $password;
39
-
40
-        return $this;
41
-    }
42
-
43
-    /**
44
-     * Get hostname
45
-     *
46
-     * @return string
47
-     */
48
-    public function getHostname(): string
49
-    {
50
-        return $this->hostname;
51
-    }
52
-
53
-    /**
54
-     * Set hostname
55
-     *
56
-     * @param string $hostname
57
-     *
58
-     * @return ManagementConsole
59
-     */
60
-    public function setHostname(string $hostname): ManagementConsole
61
-    {
62
-        $this->hostname = $hostname;
63
-
64
-        return $this;
65
-    }
66
-
67
-    /**
68
-     * Upload a license and software package for the first time
69
-     *
70
-     * @link https://developer.github.com/v3/enterprise/management_console/#upload-a-license-and-software-package-for-the-first-time
71
-     *
72
-     * @param string $license
73
-     * @param string $package
74
-     * @param string $settings
75
-     *
76
-     * @return array
77
-     */
78
-    public function upload(string $license, string $package, string $settings = ''): array
79
-    {
80
-        $this->getApi()->setApiUrl(sprintf('http://license:%s@%s', md5($license), $this->getHostname()));
81
-
82
-        return $this->getApi()->request(sprintf('/setup/api/start -F package=@%s -F license=@%s -F settings=<%s',
83
-            $package, $license, $settings), Request::METHOD_POST);
84
-    }
85
-
86
-    /**
87
-     * Upgrade a license or software package
88
-     *
89
-     * @link https://developer.github.com/v3/enterprise/management_console/#upgrade-a-license-or-software-package
90
-     *
91
-     * @param string $license
92
-     * @param string $package
93
-     *
94
-     * @return array
95
-     */
96
-    public function upgrade(string $license = '', string $package = ''): array
97
-    {
98
-        $this->getApi()->setApiUrl(sprintf('http://license:%s@%s', md5($license), $this->getHostname()));
99
-
100
-        return $this->getApi()->request(sprintf('/setup/api/upgrade -F package=@%s -F license=@%s', $package, $license),
101
-            Request::METHOD_POST);
102
-    }
103
-
104
-    /**
105
-     * Check configuration status
106
-     *
107
-     * @link https://developer.github.com/v3/enterprise/management_console/#check-configuration-status
108
-     * @return array
109
-     */
110
-    public function checkConfigurationStatus(): array
111
-    {
112
-        return $this->getApi()->request(sprintf('/setup/api/configcheck'));
113
-    }
114
-
115
-    /**
116
-     * Start a configuration process
117
-     *
118
-     * @link https://developer.github.com/v3/enterprise/management_console/#start-a-configuration-process
119
-     * @return array
120
-     */
121
-    public function startConfigurationProcess(): array
122
-    {
123
-        return $this->getApi()->request(sprintf('/setup/api/configure'), Request::METHOD_POST);
124
-    }
125
-
126
-    /**
127
-     * Retrieve settings
128
-     *
129
-     * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-settings
130
-     * @return array
131
-     */
132
-    public function retrieveSettings(): array
133
-    {
134
-        return $this->getApi()->request(sprintf('/setup/api/settings'));
135
-    }
136
-
137
-    /**
138
-     * Modify settings
139
-     *
140
-     * @link https://developer.github.com/v3/enterprise/management_console/#modify-settings
141
-     *
142
-     * @param $settings
143
-     *
144
-     * @return array
145
-     */
146
-    public function modifySettings($settings): array
147
-    {
148
-        return $this->getApi()->request(sprintf('/setup/api/settings settings=%s', $settings), Request::METHOD_PUT);
149
-    }
150
-
151
-    /**
152
-     * Check maintenance status
153
-     *
154
-     * @link https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status
155
-     * @return array
156
-     */
157
-    public function checkMaintenanceStatus(): array
158
-    {
159
-        return $this->getApi()->request(sprintf('/setup/api/maintenance'));
160
-    }
161
-
162
-    /**
163
-     * Enable or disable maintenance mode
164
-     *
165
-     * @link https://developer.github.com/v3/enterprise/management_console/#enable-or-disable-maintenance-mode
166
-     *
167
-     * @param string $maintenance
168
-     *
169
-     * @return array
170
-     */
171
-    public function updateMaintenanceStatus(string $maintenance): array
172
-    {
173
-        return $this->getApi()->request(sprintf('/setup/api/maintenance -d maintenance=%s', $maintenance),
174
-            Request::METHOD_POST);
175
-    }
176
-
177
-    /**
178
-     * Retrieve authorized SSH keys
179
-     *
180
-     * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-authorized-ssh-keys
181
-     * @return array
182
-     */
183
-    public function retrieveAuthorizedSshKeys(): array
184
-    {
185
-        return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys'));
186
-    }
187
-
188
-    /**
189
-     * Add a new authorized SSH key
190
-     *
191
-     * @link https://developer.github.com/v3/enterprise/management_console/#add-a-new-authorized-ssh-key
192
-     *
193
-     * @param string $authorizedKey
194
-     *
195
-     * @return array
196
-     */
197
-    public function addNewAuthorizedSshKeys(string $authorizedKey): array
198
-    {
199
-        return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
200
-            $authorizedKey), Request::METHOD_POST);
201
-    }
202
-
203
-    /**
204
-     * Remove an authorized SSH key
205
-     *
206
-     * @link https://developer.github.com/v3/enterprise/management_console/#remove-an-authorized-ssh-key
207
-     *
208
-     * @param string $authorizedKey
209
-     *
210
-     * @return array
211
-     */
212
-    public function removeAuthorizedSshKeys(string $authorizedKey): array
213
-    {
214
-        return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
215
-            $authorizedKey), Request::METHOD_DELETE);
216
-    }
15
+	/** Properties */
16
+	protected $hostname = '';
17
+	protected $password = '';
18
+
19
+	/**
20
+	 * Get password
21
+	 *
22
+	 * @return string
23
+	 */
24
+	public function getPassword(): string
25
+	{
26
+		return $this->password;
27
+	}
28
+
29
+	/**
30
+	 * Set password
31
+	 *
32
+	 * @param string $password
33
+	 *
34
+	 * @return ManagementConsole
35
+	 */
36
+	public function setPassword(string $password): ManagementConsole
37
+	{
38
+		$this->password = $password;
39
+
40
+		return $this;
41
+	}
42
+
43
+	/**
44
+	 * Get hostname
45
+	 *
46
+	 * @return string
47
+	 */
48
+	public function getHostname(): string
49
+	{
50
+		return $this->hostname;
51
+	}
52
+
53
+	/**
54
+	 * Set hostname
55
+	 *
56
+	 * @param string $hostname
57
+	 *
58
+	 * @return ManagementConsole
59
+	 */
60
+	public function setHostname(string $hostname): ManagementConsole
61
+	{
62
+		$this->hostname = $hostname;
63
+
64
+		return $this;
65
+	}
66
+
67
+	/**
68
+	 * Upload a license and software package for the first time
69
+	 *
70
+	 * @link https://developer.github.com/v3/enterprise/management_console/#upload-a-license-and-software-package-for-the-first-time
71
+	 *
72
+	 * @param string $license
73
+	 * @param string $package
74
+	 * @param string $settings
75
+	 *
76
+	 * @return array
77
+	 */
78
+	public function upload(string $license, string $package, string $settings = ''): array
79
+	{
80
+		$this->getApi()->setApiUrl(sprintf('http://license:%s@%s', md5($license), $this->getHostname()));
81
+
82
+		return $this->getApi()->request(sprintf('/setup/api/start -F package=@%s -F license=@%s -F settings=<%s',
83
+			$package, $license, $settings), Request::METHOD_POST);
84
+	}
85
+
86
+	/**
87
+	 * Upgrade a license or software package
88
+	 *
89
+	 * @link https://developer.github.com/v3/enterprise/management_console/#upgrade-a-license-or-software-package
90
+	 *
91
+	 * @param string $license
92
+	 * @param string $package
93
+	 *
94
+	 * @return array
95
+	 */
96
+	public function upgrade(string $license = '', string $package = ''): array
97
+	{
98
+		$this->getApi()->setApiUrl(sprintf('http://license:%s@%s', md5($license), $this->getHostname()));
99
+
100
+		return $this->getApi()->request(sprintf('/setup/api/upgrade -F package=@%s -F license=@%s', $package, $license),
101
+			Request::METHOD_POST);
102
+	}
103
+
104
+	/**
105
+	 * Check configuration status
106
+	 *
107
+	 * @link https://developer.github.com/v3/enterprise/management_console/#check-configuration-status
108
+	 * @return array
109
+	 */
110
+	public function checkConfigurationStatus(): array
111
+	{
112
+		return $this->getApi()->request(sprintf('/setup/api/configcheck'));
113
+	}
114
+
115
+	/**
116
+	 * Start a configuration process
117
+	 *
118
+	 * @link https://developer.github.com/v3/enterprise/management_console/#start-a-configuration-process
119
+	 * @return array
120
+	 */
121
+	public function startConfigurationProcess(): array
122
+	{
123
+		return $this->getApi()->request(sprintf('/setup/api/configure'), Request::METHOD_POST);
124
+	}
125
+
126
+	/**
127
+	 * Retrieve settings
128
+	 *
129
+	 * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-settings
130
+	 * @return array
131
+	 */
132
+	public function retrieveSettings(): array
133
+	{
134
+		return $this->getApi()->request(sprintf('/setup/api/settings'));
135
+	}
136
+
137
+	/**
138
+	 * Modify settings
139
+	 *
140
+	 * @link https://developer.github.com/v3/enterprise/management_console/#modify-settings
141
+	 *
142
+	 * @param $settings
143
+	 *
144
+	 * @return array
145
+	 */
146
+	public function modifySettings($settings): array
147
+	{
148
+		return $this->getApi()->request(sprintf('/setup/api/settings settings=%s', $settings), Request::METHOD_PUT);
149
+	}
150
+
151
+	/**
152
+	 * Check maintenance status
153
+	 *
154
+	 * @link https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status
155
+	 * @return array
156
+	 */
157
+	public function checkMaintenanceStatus(): array
158
+	{
159
+		return $this->getApi()->request(sprintf('/setup/api/maintenance'));
160
+	}
161
+
162
+	/**
163
+	 * Enable or disable maintenance mode
164
+	 *
165
+	 * @link https://developer.github.com/v3/enterprise/management_console/#enable-or-disable-maintenance-mode
166
+	 *
167
+	 * @param string $maintenance
168
+	 *
169
+	 * @return array
170
+	 */
171
+	public function updateMaintenanceStatus(string $maintenance): array
172
+	{
173
+		return $this->getApi()->request(sprintf('/setup/api/maintenance -d maintenance=%s', $maintenance),
174
+			Request::METHOD_POST);
175
+	}
176
+
177
+	/**
178
+	 * Retrieve authorized SSH keys
179
+	 *
180
+	 * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-authorized-ssh-keys
181
+	 * @return array
182
+	 */
183
+	public function retrieveAuthorizedSshKeys(): array
184
+	{
185
+		return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys'));
186
+	}
187
+
188
+	/**
189
+	 * Add a new authorized SSH key
190
+	 *
191
+	 * @link https://developer.github.com/v3/enterprise/management_console/#add-a-new-authorized-ssh-key
192
+	 *
193
+	 * @param string $authorizedKey
194
+	 *
195
+	 * @return array
196
+	 */
197
+	public function addNewAuthorizedSshKeys(string $authorizedKey): array
198
+	{
199
+		return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
200
+			$authorizedKey), Request::METHOD_POST);
201
+	}
202
+
203
+	/**
204
+	 * Remove an authorized SSH key
205
+	 *
206
+	 * @link https://developer.github.com/v3/enterprise/management_console/#remove-an-authorized-ssh-key
207
+	 *
208
+	 * @param string $authorizedKey
209
+	 *
210
+	 * @return array
211
+	 */
212
+	public function removeAuthorizedSshKeys(string $authorizedKey): array
213
+	{
214
+		return $this->getApi()->request(sprintf('/setup/api/settings/authorized-keys -F authorized_key=@%s',
215
+			$authorizedKey), Request::METHOD_DELETE);
216
+	}
217 217
 } 
218 218
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/Enterprise/SearchIndexing.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,19 +12,19 @@
 block discarded – undo
12 12
 class SearchIndexing extends AbstractEnterprise
13 13
 {
14 14
 
15
-    /**
16
-     * Queue an indexing job
17
-     *
18
-     * @link https://developer.github.com/v3/enterprise/search_indexing/#queue-an-indexing-job
19
-     *
20
-     * @param string $target
21
-     *
22
-     * @return array
23
-     */
24
-    public function queueIndexingJob(string $target): array
25
-    {
26
-        return $this->getApi()->request(sprintf('/staff/indexing_jobs'), Request::METHOD_POST, [
27
-                'target' => $target
28
-            ]);
29
-    }
15
+	/**
16
+	 * Queue an indexing job
17
+	 *
18
+	 * @link https://developer.github.com/v3/enterprise/search_indexing/#queue-an-indexing-job
19
+	 *
20
+	 * @param string $target
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function queueIndexingJob(string $target): array
25
+	{
26
+		return $this->getApi()->request(sprintf('/staff/indexing_jobs'), Request::METHOD_POST, [
27
+				'target' => $target
28
+			]);
29
+	}
30 30
 } 
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/Enterprise/AdminStats.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
 class AdminStats extends AbstractEnterprise
11 11
 {
12 12
 
13
-    /**
14
-     * Get statistics
15
-     *
16
-     * @link https://developer.github.com/v3/enterprise/admin_stats/#get-statistics
17
-     *
18
-     * @param string $type
19
-     *
20
-     * @return array
21
-     */
22
-    public function getStatistics(string $type): array
23
-    {
24
-        return $this->getApi()->request($this->getApi()->sprintf('/enterprise/stats/:type', $type));
25
-    }
13
+	/**
14
+	 * Get statistics
15
+	 *
16
+	 * @link https://developer.github.com/v3/enterprise/admin_stats/#get-statistics
17
+	 *
18
+	 * @param string $type
19
+	 *
20
+	 * @return array
21
+	 */
22
+	public function getStatistics(string $type): array
23
+	{
24
+		return $this->getApi()->request($this->getApi()->sprintf('/enterprise/stats/:type', $type));
25
+	}
26 26
 } 
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/Enterprise/AbstractEnterprise.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -12,66 +12,66 @@
 block discarded – undo
12 12
 abstract class AbstractEnterprise
13 13
 {
14 14
 
15
-    /** Properties */
16
-    protected $enterprise;
17
-    protected $api;
15
+	/** Properties */
16
+	protected $enterprise;
17
+	protected $api;
18 18
 
19
-    /**
20
-     * Constructor
21
-     *
22
-     * @param Enterprise $enterprise
23
-     */
24
-    public function __construct(Enterprise $enterprise)
25
-    {
26
-        $this->setEnterprise($enterprise);
27
-        $this->setApi($enterprise->getApi());
28
-    }
19
+	/**
20
+	 * Constructor
21
+	 *
22
+	 * @param Enterprise $enterprise
23
+	 */
24
+	public function __construct(Enterprise $enterprise)
25
+	{
26
+		$this->setEnterprise($enterprise);
27
+		$this->setApi($enterprise->getApi());
28
+	}
29 29
 
30
-    /**
31
-     * Get enterprise
32
-     *
33
-     * @return Enterprise
34
-     */
35
-    public function getEnterprise(): Enterprise
36
-    {
37
-        return $this->enterprise;
38
-    }
30
+	/**
31
+	 * Get enterprise
32
+	 *
33
+	 * @return Enterprise
34
+	 */
35
+	public function getEnterprise(): Enterprise
36
+	{
37
+		return $this->enterprise;
38
+	}
39 39
 
40
-    /**
41
-     * Set enterprise
42
-     *
43
-     * @param Enterprise $enterprise
44
-     *
45
-     * @return AbstractEnterprise
46
-     */
47
-    public function setEnterprise(Enterprise $enterprise): AbstractEnterprise
48
-    {
49
-        $this->enterprise = $enterprise;
40
+	/**
41
+	 * Set enterprise
42
+	 *
43
+	 * @param Enterprise $enterprise
44
+	 *
45
+	 * @return AbstractEnterprise
46
+	 */
47
+	public function setEnterprise(Enterprise $enterprise): AbstractEnterprise
48
+	{
49
+		$this->enterprise = $enterprise;
50 50
 
51
-        return $this;
52
-    }
51
+		return $this;
52
+	}
53 53
 
54
-    /**
55
-     * Get api
56
-     *
57
-     * @return AbstractApi
58
-     */
59
-    public function getApi(): AbstractApi
60
-    {
61
-        return $this->api;
62
-    }
54
+	/**
55
+	 * Get api
56
+	 *
57
+	 * @return AbstractApi
58
+	 */
59
+	public function getApi(): AbstractApi
60
+	{
61
+		return $this->api;
62
+	}
63 63
 
64
-    /**
65
-     * Set api
66
-     *
67
-     * @param AbstractApi $api
68
-     *
69
-     * @return AbstractEnterprise
70
-     */
71
-    public function setApi(AbstractApi $api): AbstractEnterprise
72
-    {
73
-        $this->api = $api;
64
+	/**
65
+	 * Set api
66
+	 *
67
+	 * @param AbstractApi $api
68
+	 *
69
+	 * @return AbstractEnterprise
70
+	 */
71
+	public function setApi(AbstractApi $api): AbstractEnterprise
72
+	{
73
+		$this->api = $api;
74 74
 
75
-        return $this;
76
-    }
75
+		return $this;
76
+	}
77 77
 } 
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/Issues.php 1 patch
Indentation   +195 added lines, -195 removed lines patch added patch discarded remove patch
@@ -14,206 +14,206 @@
 block discarded – undo
14 14
 class Issues extends AbstractReceiver
15 15
 {
16 16
 
17
-    /** Available sub-Receiver */
18
-    const ASSIGNEES  = 'Assignees';
19
-    const COMMENTS   = 'Comments';
20
-    const EVENTS     = 'Events';
21
-    const LABELS     = 'Labels';
22
-    const MILESTONES = 'Milestones';
17
+	/** Available sub-Receiver */
18
+	const ASSIGNEES  = 'Assignees';
19
+	const COMMENTS   = 'Comments';
20
+	const EVENTS     = 'Events';
21
+	const LABELS     = 'Labels';
22
+	const MILESTONES = 'Milestones';
23 23
 
24
-    /**
25
-     * List issues
26
-     *
27
-     * @link https://developer.github.com/v3/issues/#list-issues
28
-     *
29
-     * @param string $filter
30
-     * @param string $state
31
-     * @param string $labels
32
-     * @param string $sort
33
-     * @param string $direction
34
-     * @param string $since
35
-     *
36
-     * @return array
37
-     */
38
-    public function listIssues(string $filter = AbstractApi::FILTER_ASSIGNED, string $state = AbstractApi::STATE_OPEN,
39
-                               string $labels = '', string $sort = AbstractApi::SORT_CREATED,
40
-                               string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
41
-    {
42
-        return $this->getApi()->request($this->getApi()->sprintf('/issues?:args', http_build_query([
43
-                'filter'    => $filter,
44
-                'state'     => $state,
45
-                'labels'    => $labels,
46
-                'sort'      => $sort,
47
-                'direction' => $direction,
48
-                'since'     => (new DateTime($since))->format(DateTime::ATOM)
49
-            ])));
50
-    }
24
+	/**
25
+	 * List issues
26
+	 *
27
+	 * @link https://developer.github.com/v3/issues/#list-issues
28
+	 *
29
+	 * @param string $filter
30
+	 * @param string $state
31
+	 * @param string $labels
32
+	 * @param string $sort
33
+	 * @param string $direction
34
+	 * @param string $since
35
+	 *
36
+	 * @return array
37
+	 */
38
+	public function listIssues(string $filter = AbstractApi::FILTER_ASSIGNED, string $state = AbstractApi::STATE_OPEN,
39
+							   string $labels = '', string $sort = AbstractApi::SORT_CREATED,
40
+							   string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
41
+	{
42
+		return $this->getApi()->request($this->getApi()->sprintf('/issues?:args', http_build_query([
43
+				'filter'    => $filter,
44
+				'state'     => $state,
45
+				'labels'    => $labels,
46
+				'sort'      => $sort,
47
+				'direction' => $direction,
48
+				'since'     => (new DateTime($since))->format(DateTime::ATOM)
49
+			])));
50
+	}
51 51
 
52
-    /**
53
-     * List all issues across owned and member repositories for the authenticated user
54
-     *
55
-     * @link https://developer.github.com/v3/issues/#list-issues
56
-     *
57
-     * @param string $filter
58
-     * @param string $state
59
-     * @param string $labels
60
-     * @param string $sort
61
-     * @param string $direction
62
-     * @param string $since
63
-     *
64
-     * @return array
65
-     */
66
-    public function listUserIssues(string $filter = AbstractApi::FILTER_ASSIGNED,
67
-                                   string $state = AbstractApi::STATE_OPEN, string $labels = '',
68
-                                   string $sort = AbstractApi::SORT_CREATED,
69
-                                   string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
70
-    {
71
-        return $this->getApi()->request($this->getApi()->sprintf('/user/issues?:args', http_build_query([
72
-                'filter'    => $filter,
73
-                'state'     => $state,
74
-                'labels'    => $labels,
75
-                'sort'      => $sort,
76
-                'direction' => $direction,
77
-                'since'     => (new DateTime($since))->format(DateTime::ATOM)
78
-            ])));
79
-    }
52
+	/**
53
+	 * List all issues across owned and member repositories for the authenticated user
54
+	 *
55
+	 * @link https://developer.github.com/v3/issues/#list-issues
56
+	 *
57
+	 * @param string $filter
58
+	 * @param string $state
59
+	 * @param string $labels
60
+	 * @param string $sort
61
+	 * @param string $direction
62
+	 * @param string $since
63
+	 *
64
+	 * @return array
65
+	 */
66
+	public function listUserIssues(string $filter = AbstractApi::FILTER_ASSIGNED,
67
+								   string $state = AbstractApi::STATE_OPEN, string $labels = '',
68
+								   string $sort = AbstractApi::SORT_CREATED,
69
+								   string $direction = AbstractApi::DIRECTION_DESC, string $since = '1970-01-01'): array
70
+	{
71
+		return $this->getApi()->request($this->getApi()->sprintf('/user/issues?:args', http_build_query([
72
+				'filter'    => $filter,
73
+				'state'     => $state,
74
+				'labels'    => $labels,
75
+				'sort'      => $sort,
76
+				'direction' => $direction,
77
+				'since'     => (new DateTime($since))->format(DateTime::ATOM)
78
+			])));
79
+	}
80 80
 
81
-    /**
82
-     * List all issues for a given organization for the authenticated user
83
-     *
84
-     * @link https://developer.github.com/v3/issues/#list-issues
85
-     *
86
-     * @param string $organization
87
-     * @param string $filter
88
-     * @param string $state
89
-     * @param string $labels
90
-     * @param string $sort
91
-     * @param string $direction
92
-     * @param string $since
93
-     *
94
-     * @return array
95
-     */
96
-    public function listOrganizationIssues(string $organization, string $filter = AbstractApi::FILTER_ASSIGNED,
97
-                                           string $state = AbstractApi::STATE_OPEN, string $labels = '',
98
-                                           string $sort = AbstractApi::SORT_CREATED,
99
-                                           string $direction = AbstractApi::DIRECTION_DESC,
100
-                                           string $since = '1970-01-01'): array
101
-    {
102
-        return $this->getApi()->request($this->getApi()
103
-                                             ->sprintf('/orgs/:org/issues?:args', $organization, http_build_query([
104
-                                                     'filter'    => $filter,
105
-                                                     'state'     => $state,
106
-                                                     'labels'    => $labels,
107
-                                                     'sort'      => $sort,
108
-                                                     'direction' => $direction,
109
-                                                     'since'     => (new DateTime($since))->format(DateTime::ATOM)
110
-                                                 ])));
111
-    }
81
+	/**
82
+	 * List all issues for a given organization for the authenticated user
83
+	 *
84
+	 * @link https://developer.github.com/v3/issues/#list-issues
85
+	 *
86
+	 * @param string $organization
87
+	 * @param string $filter
88
+	 * @param string $state
89
+	 * @param string $labels
90
+	 * @param string $sort
91
+	 * @param string $direction
92
+	 * @param string $since
93
+	 *
94
+	 * @return array
95
+	 */
96
+	public function listOrganizationIssues(string $organization, string $filter = AbstractApi::FILTER_ASSIGNED,
97
+										   string $state = AbstractApi::STATE_OPEN, string $labels = '',
98
+										   string $sort = AbstractApi::SORT_CREATED,
99
+										   string $direction = AbstractApi::DIRECTION_DESC,
100
+										   string $since = '1970-01-01'): array
101
+	{
102
+		return $this->getApi()->request($this->getApi()
103
+											 ->sprintf('/orgs/:org/issues?:args', $organization, http_build_query([
104
+													 'filter'    => $filter,
105
+													 'state'     => $state,
106
+													 'labels'    => $labels,
107
+													 'sort'      => $sort,
108
+													 'direction' => $direction,
109
+													 'since'     => (new DateTime($since))->format(DateTime::ATOM)
110
+												 ])));
111
+	}
112 112
 
113
-    /**
114
-     * List issues for a repository
115
-     *
116
-     * @link https://developer.github.com/v3/issues/#list-issues-for-a-repository
117
-     *
118
-     * @param string $milestone
119
-     * @param string $state
120
-     * @param string $assignee
121
-     * @param string $creator
122
-     * @param string $mentioned
123
-     * @param string $labels
124
-     * @param string $sort
125
-     * @param string $direction
126
-     * @param string $since
127
-     *
128
-     * @return array
129
-     */
130
-    public function listRepositoryIssues(string $milestone = '*', string $state = AbstractApi::STATE_OPEN,
131
-                                         string $assignee = '*', string $creator = '', string $mentioned = '',
132
-                                         string $labels = '', string $sort = AbstractApi::SORT_CREATED,
133
-                                         string $direction = AbstractApi::DIRECTION_DESC,
134
-                                         string $since = '1970-01-01'): array
135
-    {
136
-        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues?:args', $this->getOwner(),
137
-            $this->getRepo(), http_build_query([
138
-                'milestone' => $milestone,
139
-                'state'     => $state,
140
-                'assignee'  => $assignee,
141
-                'creator'   => $creator,
142
-                'mentioned' => $mentioned,
143
-                'labels'    => $labels,
144
-                'sort'      => $sort,
145
-                'direction' => $direction,
146
-                'since'     => (new DateTime($since))->format(DateTime::ATOM)
147
-            ])));
148
-    }
113
+	/**
114
+	 * List issues for a repository
115
+	 *
116
+	 * @link https://developer.github.com/v3/issues/#list-issues-for-a-repository
117
+	 *
118
+	 * @param string $milestone
119
+	 * @param string $state
120
+	 * @param string $assignee
121
+	 * @param string $creator
122
+	 * @param string $mentioned
123
+	 * @param string $labels
124
+	 * @param string $sort
125
+	 * @param string $direction
126
+	 * @param string $since
127
+	 *
128
+	 * @return array
129
+	 */
130
+	public function listRepositoryIssues(string $milestone = '*', string $state = AbstractApi::STATE_OPEN,
131
+										 string $assignee = '*', string $creator = '', string $mentioned = '',
132
+										 string $labels = '', string $sort = AbstractApi::SORT_CREATED,
133
+										 string $direction = AbstractApi::DIRECTION_DESC,
134
+										 string $since = '1970-01-01'): array
135
+	{
136
+		return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues?:args', $this->getOwner(),
137
+			$this->getRepo(), http_build_query([
138
+				'milestone' => $milestone,
139
+				'state'     => $state,
140
+				'assignee'  => $assignee,
141
+				'creator'   => $creator,
142
+				'mentioned' => $mentioned,
143
+				'labels'    => $labels,
144
+				'sort'      => $sort,
145
+				'direction' => $direction,
146
+				'since'     => (new DateTime($since))->format(DateTime::ATOM)
147
+			])));
148
+	}
149 149
 
150
-    /**
151
-     * Get a single issue
152
-     *
153
-     * @link https://developer.github.com/v3/issues/#get-a-single-issue
154
-     *
155
-     * @param int $number
156
-     *
157
-     * @return array
158
-     */
159
-    public function getIssue(int $number): array
160
-    {
161
-        return $this->getApi()->request($this->getApi()
162
-                                             ->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(),
163
-                                                 $this->getRepo(), $number));
164
-    }
150
+	/**
151
+	 * Get a single issue
152
+	 *
153
+	 * @link https://developer.github.com/v3/issues/#get-a-single-issue
154
+	 *
155
+	 * @param int $number
156
+	 *
157
+	 * @return array
158
+	 */
159
+	public function getIssue(int $number): array
160
+	{
161
+		return $this->getApi()->request($this->getApi()
162
+											 ->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(),
163
+												 $this->getRepo(), $number));
164
+	}
165 165
 
166
-    /**
167
-     * Create an issue
168
-     *
169
-     * @link https://developer.github.com/v3/issues/#create-an-issue
170
-     *
171
-     * @param string $title
172
-     * @param string $body
173
-     * @param string $assignee
174
-     * @param int    $milestone
175
-     * @param array  $labels
176
-     *
177
-     * @return array
178
-     */
179
-    public function createIssue(string $title, string $body = '', string $assignee = '', int $milestone = 0,
180
-                                array $labels = []): array
181
-    {
182
-        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues', $this->getOwner(),
183
-            $this->getRepo()), Request::METHOD_POST, [
184
-                'title'     => $title,
185
-                'body'      => $body,
186
-                'assignee'  => $assignee,
187
-                'milestone' => $milestone,
188
-                'labels'    => $labels
189
-            ]);
190
-    }
166
+	/**
167
+	 * Create an issue
168
+	 *
169
+	 * @link https://developer.github.com/v3/issues/#create-an-issue
170
+	 *
171
+	 * @param string $title
172
+	 * @param string $body
173
+	 * @param string $assignee
174
+	 * @param int    $milestone
175
+	 * @param array  $labels
176
+	 *
177
+	 * @return array
178
+	 */
179
+	public function createIssue(string $title, string $body = '', string $assignee = '', int $milestone = 0,
180
+								array $labels = []): array
181
+	{
182
+		return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues', $this->getOwner(),
183
+			$this->getRepo()), Request::METHOD_POST, [
184
+				'title'     => $title,
185
+				'body'      => $body,
186
+				'assignee'  => $assignee,
187
+				'milestone' => $milestone,
188
+				'labels'    => $labels
189
+			]);
190
+	}
191 191
 
192
-    /**
193
-     * Edit an issue
194
-     *
195
-     * @link https://developer.github.com/v3/issues/#edit-an-issue
196
-     *
197
-     * @param int    $number
198
-     * @param string $title
199
-     * @param string $body
200
-     * @param string $assignee
201
-     * @param int    $milestone
202
-     * @param array  $labels
203
-     *
204
-     * @return array
205
-     */
206
-    public function editIssue(int $number, string $title = '', string $body = '', string $assignee = '',
207
-                              int $milestone = 0, array $labels = []): array
208
-    {
209
-        return $this->getApi()->request($this->getApi()
210
-                                             ->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(),
211
-                                                 $this->getRepo(), $number), Request::METHOD_PATCH, [
212
-                'title'     => $title,
213
-                'body'      => $body,
214
-                'assignee'  => $assignee,
215
-                'milestone' => $milestone,
216
-                'labels'    => $labels
217
-            ]);
218
-    }
192
+	/**
193
+	 * Edit an issue
194
+	 *
195
+	 * @link https://developer.github.com/v3/issues/#edit-an-issue
196
+	 *
197
+	 * @param int    $number
198
+	 * @param string $title
199
+	 * @param string $body
200
+	 * @param string $assignee
201
+	 * @param int    $milestone
202
+	 * @param array  $labels
203
+	 *
204
+	 * @return array
205
+	 */
206
+	public function editIssue(int $number, string $title = '', string $body = '', string $assignee = '',
207
+							  int $milestone = 0, array $labels = []): array
208
+	{
209
+		return $this->getApi()->request($this->getApi()
210
+											 ->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(),
211
+												 $this->getRepo(), $number), Request::METHOD_PATCH, [
212
+				'title'     => $title,
213
+				'body'      => $body,
214
+				'assignee'  => $assignee,
215
+				'milestone' => $milestone,
216
+				'labels'    => $labels
217
+			]);
218
+	}
219 219
 } 
220 220
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/Receiver/PullRequests.php 1 patch
Indentation   +162 added lines, -162 removed lines patch added patch discarded remove patch
@@ -14,176 +14,176 @@
 block discarded – undo
14 14
 class PullRequests extends AbstractReceiver
15 15
 {
16 16
 
17
-    /** Available sub-Receiver */
18
-    const REVIEW_COMMENTS = 'ReviewComments';
17
+	/** Available sub-Receiver */
18
+	const REVIEW_COMMENTS = 'ReviewComments';
19 19
 
20
-    /**
21
-     * List pull requests
22
-     *
23
-     * @link https://developer.github.com/v3/pulls/#list-pull-requests
24
-     *
25
-     * @param string $state
26
-     * @param string $head
27
-     * @param string $base
28
-     * @param string $sort
29
-     * @param string $direction
30
-     *
31
-     * @return array
32
-     * @throws \Exception
33
-     */
34
-    public function listPullRequests(string $state = AbstractApi::STATE_OPEN, string $head = null, string $base = null,
35
-                                     string $sort = AbstractApi::SORT_CREATED,
36
-                                     string $direction = AbstractApi::DIRECTION_ASC): array
37
-    {
38
-        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls?:args', $this->getOwner(),
39
-            $this->getRepo(), http_build_query([
40
-                'state'     => $state,
41
-                'head'      => $head,
42
-                'base'      => $base,
43
-                'sort'      => $sort,
44
-                'direction' => $direction
45
-            ])));
46
-    }
20
+	/**
21
+	 * List pull requests
22
+	 *
23
+	 * @link https://developer.github.com/v3/pulls/#list-pull-requests
24
+	 *
25
+	 * @param string $state
26
+	 * @param string $head
27
+	 * @param string $base
28
+	 * @param string $sort
29
+	 * @param string $direction
30
+	 *
31
+	 * @return array
32
+	 * @throws \Exception
33
+	 */
34
+	public function listPullRequests(string $state = AbstractApi::STATE_OPEN, string $head = null, string $base = null,
35
+									 string $sort = AbstractApi::SORT_CREATED,
36
+									 string $direction = AbstractApi::DIRECTION_ASC): array
37
+	{
38
+		return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls?:args', $this->getOwner(),
39
+			$this->getRepo(), http_build_query([
40
+				'state'     => $state,
41
+				'head'      => $head,
42
+				'base'      => $base,
43
+				'sort'      => $sort,
44
+				'direction' => $direction
45
+			])));
46
+	}
47 47
 
48
-    /**
49
-     * Get a single pull request
50
-     *
51
-     * @link https://developer.github.com/v3/pulls/#get-a-single-pull-request
52
-     *
53
-     * @param int $number
54
-     *
55
-     * @return array
56
-     * @throws \Exception
57
-     */
58
-    public function getSinglePullRequest(int $number): array
59
-    {
60
-        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
61
-            $this->getRepo(), $number));
62
-    }
48
+	/**
49
+	 * Get a single pull request
50
+	 *
51
+	 * @link https://developer.github.com/v3/pulls/#get-a-single-pull-request
52
+	 *
53
+	 * @param int $number
54
+	 *
55
+	 * @return array
56
+	 * @throws \Exception
57
+	 */
58
+	public function getSinglePullRequest(int $number): array
59
+	{
60
+		return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
61
+			$this->getRepo(), $number));
62
+	}
63 63
 
64
-    /**
65
-     * Create a pull request
66
-     *
67
-     * @link https://developer.github.com/v3/pulls/#create-a-pull-request
68
-     *
69
-     * @param string $title
70
-     * @param string $head
71
-     * @param string $base
72
-     * @param string $body
73
-     *
74
-     * @return array
75
-     * @throws \Exception
76
-     */
77
-    public function createPullrequest(string $title, string $head, string $base, string $body): array
78
-    {
79
-        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls', $this->getOwner(),
80
-            $this->getRepo()), Request::METHOD_POST, [
81
-                'title' => $title,
82
-                'head'  => $head,
83
-                'base'  => $base,
84
-                'body'  => $body
85
-            ]);
86
-    }
64
+	/**
65
+	 * Create a pull request
66
+	 *
67
+	 * @link https://developer.github.com/v3/pulls/#create-a-pull-request
68
+	 *
69
+	 * @param string $title
70
+	 * @param string $head
71
+	 * @param string $base
72
+	 * @param string $body
73
+	 *
74
+	 * @return array
75
+	 * @throws \Exception
76
+	 */
77
+	public function createPullrequest(string $title, string $head, string $base, string $body): array
78
+	{
79
+		return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls', $this->getOwner(),
80
+			$this->getRepo()), Request::METHOD_POST, [
81
+				'title' => $title,
82
+				'head'  => $head,
83
+				'base'  => $base,
84
+				'body'  => $body
85
+			]);
86
+	}
87 87
 
88
-    /**
89
-     * Update a pull request
90
-     *
91
-     * @link https://developer.github.com/v3/pulls/#update-a-pull-request
92
-     *
93
-     * @param int    $number
94
-     * @param string $title
95
-     * @param string $body
96
-     * @param string $state
97
-     *
98
-     * @return array
99
-     * @throws \Exception
100
-     */
101
-    public function updatePullRequest(int $number, string $title = null, string $body = null,
102
-                                      string $state = null): array
103
-    {
104
-        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
105
-            $this->getRepo(), $number), Request::METHOD_PATCH, [
106
-                'title' => $title,
107
-                'body'  => $body,
108
-                'state' => $state
109
-            ]);
110
-    }
88
+	/**
89
+	 * Update a pull request
90
+	 *
91
+	 * @link https://developer.github.com/v3/pulls/#update-a-pull-request
92
+	 *
93
+	 * @param int    $number
94
+	 * @param string $title
95
+	 * @param string $body
96
+	 * @param string $state
97
+	 *
98
+	 * @return array
99
+	 * @throws \Exception
100
+	 */
101
+	public function updatePullRequest(int $number, string $title = null, string $body = null,
102
+									  string $state = null): array
103
+	{
104
+		return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number', $this->getOwner(),
105
+			$this->getRepo(), $number), Request::METHOD_PATCH, [
106
+				'title' => $title,
107
+				'body'  => $body,
108
+				'state' => $state
109
+			]);
110
+	}
111 111
 
112
-    /**
113
-     * List commits on a pull request
114
-     *
115
-     * @link https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
116
-     *
117
-     * @param int $number
118
-     *
119
-     * @return array
120
-     * @throws \Exception
121
-     */
122
-    public function listCommits(int $number): array
123
-    {
124
-        return $this->getApi()->request($this->getApi()
125
-                                             ->sprintf('/repos/:owner/:repo/pulls/:number/commits', $this->getOwner(),
126
-                                                 $this->getRepo(), $number));
127
-    }
112
+	/**
113
+	 * List commits on a pull request
114
+	 *
115
+	 * @link https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
116
+	 *
117
+	 * @param int $number
118
+	 *
119
+	 * @return array
120
+	 * @throws \Exception
121
+	 */
122
+	public function listCommits(int $number): array
123
+	{
124
+		return $this->getApi()->request($this->getApi()
125
+											 ->sprintf('/repos/:owner/:repo/pulls/:number/commits', $this->getOwner(),
126
+												 $this->getRepo(), $number));
127
+	}
128 128
 
129
-    /**
130
-     * List pull requests files
131
-     *
132
-     * @link https://developer.github.com/v3/pulls/#list-pull-requests-files
133
-     *
134
-     * @param int $number
135
-     *
136
-     * @return array
137
-     * @throws \Exception
138
-     */
139
-    public function listPullRequestsFiles(int $number): array
140
-    {
141
-        return $this->getApi()->request($this->getApi()
142
-                                             ->sprintf('/repos/:owner/:repo/pulls/:number/files', $this->getOwner(),
143
-                                                 $this->getRepo(), $number));
144
-    }
129
+	/**
130
+	 * List pull requests files
131
+	 *
132
+	 * @link https://developer.github.com/v3/pulls/#list-pull-requests-files
133
+	 *
134
+	 * @param int $number
135
+	 *
136
+	 * @return array
137
+	 * @throws \Exception
138
+	 */
139
+	public function listPullRequestsFiles(int $number): array
140
+	{
141
+		return $this->getApi()->request($this->getApi()
142
+											 ->sprintf('/repos/:owner/:repo/pulls/:number/files', $this->getOwner(),
143
+												 $this->getRepo(), $number));
144
+	}
145 145
 
146
-    /**
147
-     * Get if a pull request has been merged
148
-     *
149
-     * @link https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged
150
-     *
151
-     * @param int $number
152
-     *
153
-     * @return bool
154
-     * @throws \Exception
155
-     */
156
-    public function checkPullRequestsMerged(int $number): bool
157
-    {
158
-        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number/merge', $this->getOwner(),
159
-            $this->getRepo(), $number));
146
+	/**
147
+	 * Get if a pull request has been merged
148
+	 *
149
+	 * @link https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged
150
+	 *
151
+	 * @param int $number
152
+	 *
153
+	 * @return bool
154
+	 * @throws \Exception
155
+	 */
156
+	public function checkPullRequestsMerged(int $number): bool
157
+	{
158
+		$this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/pulls/:number/merge', $this->getOwner(),
159
+			$this->getRepo(), $number));
160 160
 
161
-        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
162
-            return true;
163
-        }
161
+		if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
162
+			return true;
163
+		}
164 164
 
165
-        return false;
166
-    }
165
+		return false;
166
+	}
167 167
 
168
-    /**
169
-     * Merge a pull request (Merge Button)
170
-     *
171
-     * @link https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button
172
-     *
173
-     * @param int    $number
174
-     * @param string $commitMessage
175
-     * @param string $sha
176
-     *
177
-     * @return array
178
-     * @throws \Exception
179
-     */
180
-    public function mergePullRequest(int $number, string $commitMessage = null, string $sha = null): array
181
-    {
182
-        return $this->getApi()->request($this->getApi()
183
-                                             ->sprintf('/repos/:owner/:repo/pulls/:number/merge', $this->getOwner(),
184
-                                                 $this->getRepo(), $number), Request::METHOD_PUT, [
185
-                'commit_message' => $commitMessage,
186
-                'sha'            => $sha
187
-            ]);
188
-    }
168
+	/**
169
+	 * Merge a pull request (Merge Button)
170
+	 *
171
+	 * @link https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button
172
+	 *
173
+	 * @param int    $number
174
+	 * @param string $commitMessage
175
+	 * @param string $sha
176
+	 *
177
+	 * @return array
178
+	 * @throws \Exception
179
+	 */
180
+	public function mergePullRequest(int $number, string $commitMessage = null, string $sha = null): array
181
+	{
182
+		return $this->getApi()->request($this->getApi()
183
+											 ->sprintf('/repos/:owner/:repo/pulls/:number/merge', $this->getOwner(),
184
+												 $this->getRepo(), $number), Request::METHOD_PUT, [
185
+				'commit_message' => $commitMessage,
186
+				'sha'            => $sha
187
+			]);
188
+	}
189 189
 }
190 190
\ No newline at end of file
Please login to merge, or discard this patch.
lib/GitHub/WebHook.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -12,24 +12,24 @@
 block discarded – undo
12 12
 class WebHook extends AbstractApi
13 13
 {
14 14
 
15
-    /** Constants */
16
-    const PAYLOAD = 'Payload';
15
+	/** Constants */
16
+	const PAYLOAD = 'Payload';
17 17
 
18
-    /**
19
-     * Returns Event object
20
-     *
21
-     * @param string $event
22
-     *
23
-     * @return null|EventInterface
24
-     */
25
-    public function getEvent(string $event)
26
-    {
27
-        $class = (string)$this->sprintf(':namespace\Event\:event', __NAMESPACE__, $event);
18
+	/**
19
+	 * Returns Event object
20
+	 *
21
+	 * @param string $event
22
+	 *
23
+	 * @return null|EventInterface
24
+	 */
25
+	public function getEvent(string $event)
26
+	{
27
+		$class = (string)$this->sprintf(':namespace\Event\:event', __NAMESPACE__, $event);
28 28
 
29
-        if (class_exists($class)) {
30
-            return new $class($this);
31
-        }
29
+		if (class_exists($class)) {
30
+			return new $class($this);
31
+		}
32 32
 
33
-        return null;
34
-    }
33
+		return null;
34
+	}
35 35
 } 
36 36
\ No newline at end of file
Please login to merge, or discard this patch.