Skip to content

Commit c1c6362

Browse files
committed
Improve PSR-2 compatibility about static keyword.
From 4.5 of the PSR-2 specification: http://www.php-fig.org/psr/psr-2/ > When present, the static declaration MUST come after the visibility declaration.
1 parent 056bac4 commit c1c6362

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/OAuth2Demo/Client/Controllers/Homepage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Homepage
88
{
99
// Connects the routes in Silex
10-
static public function addRoutes($routing)
10+
public static function addRoutes($routing)
1111
{
1212
$routing->get('/', array(new self(), 'homepage'))->bind('homepage');
1313
$routing->post('/set-environment', array(new self(), 'setEnvironment'))->bind('set_environment');
@@ -30,4 +30,4 @@ public function setEnvironment(Application $app)
3030

3131
return $app->redirect($app['url_generator']->generate('homepage'));
3232
}
33-
}
33+
}

src/OAuth2Demo/Client/Controllers/ReceiveAuthorizationCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ReceiveAuthorizationCode
88
{
9-
static public function addRoutes($routing)
9+
public static function addRoutes($routing)
1010
{
1111
$routing->get('/client/receive_authcode', array(new self(), 'receiveAuthorizationCode'))->bind('authorize_redirect');
1212
}

src/OAuth2Demo/Client/Controllers/ReceiveImplicitToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ReceiveImplicitToken
88
{
9-
static public function addRoutes($routing)
9+
public static function addRoutes($routing)
1010
{
1111
$routing->get('/client/receive_implicit_token', array(new self(), 'receiveImplicitToken'))->bind('authorize_redirect_implicit');
1212
}

src/OAuth2Demo/Client/Controllers/RequestResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class RequestResource
88
{
9-
static public function addRoutes($routing)
9+
public static function addRoutes($routing)
1010
{
1111
$routing->get('/client/request_resource', array(new self(), 'requestResource'))->bind('request_resource');
1212
}
@@ -38,4 +38,4 @@ public function requestResource(Application $app)
3838

3939
return $twig->render('client/show_resource.twig', array('response' => $json ? $json : $response, 'resource_uri' => $resource_uri));
4040
}
41-
}
41+
}

src/OAuth2Demo/Client/Controllers/RequestToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class RequestToken
88
{
9-
static public function addRoutes($routing)
9+
public static function addRoutes($routing)
1010
{
1111
$routing->get('/client/request_token/authorization_code', array(new self(), 'requestTokenWithAuthCode'))->bind('request_token_with_authcode');
1212
$routing->get('/client/request_token/user_credentials', array(new self(), 'requestTokenWithUserCredentials'))->bind('request_token_with_usercredentials');
@@ -81,4 +81,4 @@ public function requestTokenWithUserCredentials(Application $app)
8181

8282
return $twig->render('client/failed_token_request.twig', array('response' => $json ? $json : $response));
8383
}
84-
}
84+
}

src/OAuth2Demo/Server/Controllers/Authorize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Authorize
88
{
99
// Connects the routes in Silex
10-
static public function addRoutes($routing)
10+
public static function addRoutes($routing)
1111
{
1212
$routing->get('/authorize', array(new self(), 'authorize'))->bind('authorize');
1313
$routing->post('/authorize', array(new self(), 'authorizeFormSubmit'))->bind('authorize_post');
@@ -55,4 +55,4 @@ public function authorizeFormSubmit(Application $app)
5555
// call the oauth server and return the response
5656
return $server->handleAuthorizeRequest($app['request'], $response, $authorized);
5757
}
58-
}
58+
}

src/OAuth2Demo/Server/Controllers/Resource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class Resource
99
{
1010
// Connects the routes in Silex
11-
static public function addRoutes($routing)
11+
public static function addRoutes($routing)
1212
{
1313
$routing->get('/resource', array(new self(), 'resource'))->bind('access');
1414
}
@@ -41,4 +41,4 @@ public function resource(Application $app)
4141
return new Response(json_encode($api_response));
4242
}
4343
}
44-
}
44+
}

src/OAuth2Demo/Server/Controllers/Token.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Token
88
{
99
// Connects the routes in Silex
10-
static public function addRoutes($routing)
10+
public static function addRoutes($routing)
1111
{
1212
$routing->post('/token', array(new self(), 'token'))->bind('grant');
1313
}
@@ -28,4 +28,4 @@ public function token(Application $app)
2828
// let the oauth2-server-php library do all the work!
2929
return $server->handleTokenRequest($app['request'], $response);
3030
}
31-
}
31+
}

0 commit comments

Comments
 (0)