@@ -35,13 +35,13 @@ class Authorization extends AbstractPackage
3535 * @since 1.0
3636 * @throws \DomainException
3737 */
38- public function create (array $ scopes = array () , $ note = '' , $ url = '' )
38+ public function create (array $ scopes = [] , $ note = '' , $ url = '' )
3939 {
4040 // Build the request path.
4141 $ path = '/authorizations ' ;
4242
4343 $ data = json_encode (
44- array ( 'scopes ' => $ scopes , 'note ' => $ note , 'note_url ' => $ url)
44+ [ 'scopes ' => $ scopes , 'note ' => $ note , 'note_url ' => $ url]
4545 );
4646
4747 // Send the request.
@@ -104,7 +104,7 @@ public function deleteGrant($id)
104104 * @throws \DomainException
105105 * @throws \RuntimeException
106106 */
107- public function edit ($ id , array $ scopes = array () , array $ addScopes = array () , array $ removeScopes = array () , $ note = '' , $ url = '' )
107+ public function edit ($ id , array $ scopes = [] , array $ addScopes = [] , array $ removeScopes = [] , $ note = '' , $ url = '' )
108108 {
109109 // Check if more than one scopes array contains data
110110 $ scopesCount = 0 ;
@@ -142,11 +142,11 @@ public function edit($id, array $scopes = array(), array $addScopes = array(), a
142142 $ path = '/authorizations/ ' . $ id ;
143143
144144 $ data = json_encode (
145- array (
145+ [
146146 $ scope => $ scopeData ,
147147 'note ' => $ note ,
148148 'note_url ' => $ url ,
149- )
149+ ]
150150 );
151151
152152 // Send the request.
@@ -250,7 +250,7 @@ public function getRateLimit()
250250 if ($ response ->code == 404 )
251251 {
252252 // Unlimited rate for Github Enterprise sites and trusted users.
253- return (object ) array ( 'limit ' => false , 'remaining ' => null ) ;
253+ return (object ) [ 'limit ' => false , 'remaining ' => null ] ;
254254 }
255255
256256 // Decode the error response and throw an exception.
@@ -316,18 +316,18 @@ public function requestToken($clientId, $clientSecret, $code, $redirectUri = '',
316316 {
317317 $ uri = 'https://github.com/login/oauth/access_token ' ;
318318
319- $ data = array (
319+ $ data = [
320320 'client_id ' => $ clientId ,
321321 'client_secret ' => $ clientSecret ,
322322 'code ' => $ code ,
323- ) ;
323+ ] ;
324324
325325 if ($ redirectUri )
326326 {
327327 $ data ['redirect_uri ' ] = $ redirectUri ;
328328 }
329329
330- $ headers = array () ;
330+ $ headers = [] ;
331331
332332 switch ($ format )
333333 {
0 commit comments