Permalink
Browse files

Some CS fixes in line with the Symfony2 standards

  • Loading branch information...
1 parent 8b7796f commit c6b63758271adcc6987a79704c760507d297e48c @catchamonkey catchamonkey committed Jun 7, 2012
@@ -605,7 +605,7 @@ public function onKernelException(GetResponseForExceptionEvent $event)
/**
* {@inheritdoc}
*/
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
KernelEvents::REQUEST => array(
@@ -25,5 +25,5 @@
*
* @return ControllerCollection A ControllerCollection instance
*/
- function connect(Application $app);
+ public function connect(Application $app);
}
@@ -32,7 +32,7 @@ public function onSilexError(GetResponseForErrorEvent $event)
/**
* {@inheritdoc}
*/
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(SilexEvents::ERROR => array('onSilexError', -255));
}
@@ -26,7 +26,7 @@
*
* @param Application $app An Application instance
*/
- function register(Application $app);
+ public function register(Application $app);
/**
* Bootstraps the application.
@@ -35,5 +35,5 @@ function register(Application $app);
* and should be used for "dynamic" configuration (whenever
* a service must be requested).
*/
- function boot(Application $app);
+ public function boot(Application $app);
}
@@ -160,7 +160,7 @@ protected function getStub()
*
* @return string The PHP string with the whitespace removed
*/
- static public function stripWhitespace($source)
+ public static function stripWhitespace($source)
{
if (!function_exists('token_get_all')) {
return $source;
@@ -43,7 +43,7 @@ public function setUp()
/**
* Creates a Client.
*
- * @param array $server An array of server parameters
+ * @param array $server An array of server parameters
*
* @return Client A Client instance
*/
@@ -273,6 +273,7 @@ public function testErrorHandlerWithStandardException()
// Since we throw a standard Exception above only
// the second error handler should fire
$app->error(function (\LogicException $e) { // Extends \Exception
+
return "Caught LogicException";
});
$app->error(function (\Exception $e) {
@@ -298,6 +299,7 @@ public function testErrorHandlerWithSpecifiedException()
// Since we throw a LogicException above
// the first error handler should fire
$app->error(function (\LogicException $e) { // Extends \Exception
+
return "Caught LogicException";
});
$app->error(function (\Exception $e) {
@@ -328,6 +330,7 @@ public function testErrorHandlerWithSpecifiedExceptionInReverseOrder()
return "Caught Exception";
});
$app->error(function (\LogicException $e) { // Extends \Exception
+
return "Caught LogicException";
});
@@ -13,7 +13,6 @@
use Silex\Application;
-
/**
* JSON test cases.
*
@@ -146,7 +146,8 @@ public function testMethodRouting()
$this->checkRouteResponse($app, '/resource', 'delete resource', 'delete');
}
- public function testRequestShouldBeStoredRegardlessOfRouting() {
+ public function testRequestShouldBeStoredRegardlessOfRouting()
+ {
$app = new Application();
$app->get('/foo', function () use ($app) {
@@ -240,7 +241,7 @@ public function getFoo()
return 'foo';
}
- static public function getBar()
+ public static function getBar()
{
return 'bar';
}
@@ -36,6 +36,7 @@ public function createApplication()
$app->match('/server', function () use ($app) {
$user = $app['request']->server->get('PHP_AUTH_USER');
$pass = $app['request']->server->get('PHP_AUTH_PW');
+
return "<h1>$user:$pass</h1>";
});

0 comments on commit c6b6375

Please sign in to comment.