Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed CS

  • Loading branch information...
commit 3ed400b75c0c2eae3e8f6f991210a8930bdd7467 1 parent 8a62d35
@fabpot fabpot authored
Showing with 84 additions and 88 deletions.
  1. +8 −8 Bundle/BundleInterface.php
  2. +1 −1  CacheClearer/CacheClearerInterface.php
  3. +1 −1  CacheWarmer/CacheWarmerInterface.php
  4. +1 −1  CacheWarmer/WarmableInterface.php
  5. +2 −2 Controller/ControllerResolverInterface.php
  6. +0 −1  DataCollector/DataCollector.php
  7. +2 −2 DataCollector/DataCollectorInterface.php
  8. +1 −1  Debug/ErrorHandler.php
  9. +1 −1  Debug/ExceptionHandler.php
  10. +1 −1  DependencyInjection/ConfigurableExtension.php
  11. +1 −1  DependencyInjection/Extension.php
  12. +1 −1  EventListener/EsiListener.php
  13. +1 −1  EventListener/ExceptionListener.php
  14. +1 −1  EventListener/LocaleListener.php
  15. +1 −1  EventListener/ProfilerListener.php
  16. +1 −1  EventListener/ResponseListener.php
  17. +1 −2  EventListener/RouterListener.php
  18. +1 −1  EventListener/StreamedResponseListener.php
  19. +1 −1  Exception/FlattenException.php
  20. +2 −2 Exception/HttpExceptionInterface.php
  21. +2 −2 HttpCache/EsiResponseCacheStrategyInterface.php
  22. +7 −7 HttpCache/StoreInterface.php
  23. +1 −1  HttpKernelInterface.php
  24. +1 −1  Kernel.php
  25. +17 −17 KernelInterface.php
  26. +2 −2 Log/DebugLoggerInterface.php
  27. +8 −8 Log/LoggerInterface.php
  28. +1 −1  Profiler/PdoProfilerStorage.php
  29. +4 −4 Profiler/ProfilerStorageInterface.php
  30. +0 −1  Profiler/SqliteProfilerStorage.php
  31. +1 −1  TerminableInterface.php
  32. +1 −1  Tests/Controller/ControllerResolverTest.php
  33. +2 −2 Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php
  34. +0 −1  Tests/Debug/StopwatchTest.php
  35. +2 −2 Tests/Fixtures/TestEventDispatcher.php
  36. +1 −1  Tests/HttpCache/HttpCacheTestCase.php
  37. +1 −1  Tests/HttpKernelTest.php
  38. +2 −2 Tests/Profiler/FileProfilerStorageTest.php
  39. +2 −2 Tests/Profiler/MongoDbProfilerStorageTest.php
View
16 Bundle/BundleInterface.php
@@ -29,14 +29,14 @@
*
* @api
*/
- function boot();
+ public function boot();
/**
* Shutdowns the Bundle.
*
* @api
*/
- function shutdown();
+ public function shutdown();
/**
* Builds the bundle.
@@ -47,7 +47,7 @@ function shutdown();
*
* @api
*/
- function build(ContainerBuilder $container);
+ public function build(ContainerBuilder $container);
/**
* Returns the container extension that should be implicitly loaded.
@@ -56,7 +56,7 @@ function build(ContainerBuilder $container);
*
* @api
*/
- function getContainerExtension();
+ public function getContainerExtension();
/**
* Returns the bundle parent name.
@@ -65,7 +65,7 @@ function getContainerExtension();
*
* @api
*/
- function getParent();
+ public function getParent();
/**
* Returns the bundle name (the class short name).
@@ -74,7 +74,7 @@ function getParent();
*
* @api
*/
- function getName();
+ public function getName();
/**
* Gets the Bundle namespace.
@@ -83,7 +83,7 @@ function getName();
*
* @api
*/
- function getNamespace();
+ public function getNamespace();
/**
* Gets the Bundle directory path.
@@ -94,5 +94,5 @@ function getNamespace();
*
* @api
*/
- function getPath();
+ public function getPath();
}
View
2  CacheClearer/CacheClearerInterface.php
@@ -23,5 +23,5 @@
*
* @param string $cacheDir The cache directory.
*/
- function clear($cacheDir);
+ public function clear($cacheDir);
}
View
2  CacheWarmer/CacheWarmerInterface.php
@@ -28,5 +28,5 @@
*
* @return Boolean true if the warmer is optional, false otherwise
*/
- function isOptional();
+ public function isOptional();
}
View
2  CacheWarmer/WarmableInterface.php
@@ -23,5 +23,5 @@
*
* @param string $cacheDir The cache directory
*/
- function warmUp($cacheDir);
+ public function warmUp($cacheDir);
}
View
4 Controller/ControllerResolverInterface.php
@@ -45,7 +45,7 @@
*
* @api
*/
- function getController(Request $request);
+ public function getController(Request $request);
/**
* Returns the arguments to pass to the controller.
@@ -59,5 +59,5 @@ function getController(Request $request);
*
* @api
*/
- function getArguments(Request $request, $controller);
+ public function getArguments(Request $request, $controller);
}
View
1  DataCollector/DataCollector.php
@@ -11,7 +11,6 @@
namespace Symfony\Component\HttpKernel\DataCollector;
-
/**
* DataCollector.
*
View
4 DataCollector/DataCollectorInterface.php
@@ -32,7 +32,7 @@
*
* @api
*/
- function collect(Request $request, Response $response, \Exception $exception = null);
+ public function collect(Request $request, Response $response, \Exception $exception = null);
/**
* Returns the name of the collector.
@@ -41,5 +41,5 @@ function collect(Request $request, Response $response, \Exception $exception = n
*
* @api
*/
- function getName();
+ public function getName();
}
View
2  Debug/ErrorHandler.php
@@ -39,7 +39,7 @@ class ErrorHandler
*
* @return The registered error handler
*/
- static public function register($level = null)
+ public static function register($level = null)
{
$handler = new static();
$handler->setLevel($level);
View
2  Debug/ExceptionHandler.php
@@ -45,7 +45,7 @@ public function __construct($debug = true, $charset = 'UTF-8')
*
* @return The registered exception handler
*/
- static public function register($debug = true)
+ public static function register($debug = true)
{
$handler = new static($debug);
View
2  DependencyInjection/ConfigurableExtension.php
@@ -30,7 +30,7 @@
/**
* {@inheritDoc}
*/
- public final function load(array $configs, ContainerBuilder $container)
+ final public function load(array $configs, ContainerBuilder $container)
{
$this->loadInternal($this->processConfiguration($this->getConfiguration(array(), $container), $configs), $container);
}
View
2  DependencyInjection/Extension.php
@@ -96,7 +96,7 @@ public function getAlias()
return Container::underscore($classBaseName);
}
- protected final function processConfiguration(ConfigurationInterface $configuration, array $configs)
+ final protected function processConfiguration(ConfigurationInterface $configuration, array $configs)
{
$processor = new Processor();
View
2  EventListener/EsiListener.php
@@ -51,7 +51,7 @@ public function onKernelResponse(FilterResponseEvent $event)
$this->esi->addSurrogateControl($event->getResponse());
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
KernelEvents::RESPONSE => 'onKernelResponse',
View
2  EventListener/ExceptionListener.php
@@ -104,7 +104,7 @@ public function onKernelException(GetResponseForExceptionEvent $event)
$handling = false;
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
KernelEvents::EXCEPTION => array('onKernelException', -128),
View
2  EventListener/LocaleListener.php
@@ -47,7 +47,7 @@ public function onKernelRequest(GetResponseEvent $event)
}
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
// must be registered after the Router to have access to the _locale
View
2  EventListener/ProfilerListener.php
@@ -134,7 +134,7 @@ public function onKernelResponse(FilterResponseEvent $event)
}
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
// kernel.request must be registered as early as possible to not break
View
2  EventListener/ResponseListener.php
@@ -50,7 +50,7 @@ public function onKernelResponse(FilterResponseEvent $event)
$response->prepare($event->getRequest());
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
KernelEvents::RESPONSE => 'onKernelResponse',
View
3  EventListener/RouterListener.php
@@ -12,7 +12,6 @@
namespace Symfony\Component\HttpKernel\EventListener;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
@@ -108,7 +107,7 @@ private function parametersToString(array $parameters)
return implode(', ', $pieces);
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
KernelEvents::REQUEST => array(array('onKernelRequest', 32)),
View
2  EventListener/StreamedResponseListener.php
@@ -43,7 +43,7 @@ public function onKernelResponse(FilterResponseEvent $event)
}
}
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array(
KernelEvents::RESPONSE => array('onKernelResponse', -1024),
View
2  Exception/FlattenException.php
@@ -30,7 +30,7 @@ class FlattenException
private $file;
private $line;
- static public function create(\Exception $exception, $statusCode = null, array $headers = array())
+ public static function create(\Exception $exception, $statusCode = null, array $headers = array())
{
$e = new static();
$e->setMessage($exception->getMessage());
View
4 Exception/HttpExceptionInterface.php
@@ -23,12 +23,12 @@
*
* @return integer An HTTP response status code
*/
- function getStatusCode();
+ public function getStatusCode();
/**
* Returns response headers.
*
* @return array Response headers
*/
- function getHeaders();
+ public function getHeaders();
}
View
4 HttpCache/EsiResponseCacheStrategyInterface.php
@@ -30,12 +30,12 @@
*
* @param Response $response
*/
- function add(Response $response);
+ public function add(Response $response);
/**
* Updates the Response HTTP headers based on the embedded Responses.
*
* @param Response $response
*/
- function update(Response $response);
+ public function update(Response $response);
}
View
14 HttpCache/StoreInterface.php
@@ -31,7 +31,7 @@
*
* @return Response|null A Response instance, or null if no cache entry was found
*/
- function lookup(Request $request);
+ public function lookup(Request $request);
/**
* Writes a cache entry to the store for the given Request and Response.
@@ -44,14 +44,14 @@ function lookup(Request $request);
*
* @return string The key under which the response is stored
*/
- function write(Request $request, Response $response);
+ public function write(Request $request, Response $response);
/**
* Invalidates all cache entries that match the request.
*
* @param Request $request A Request instance
*/
- function invalidate(Request $request);
+ public function invalidate(Request $request);
/**
* Locks the cache for a given Request.
@@ -60,14 +60,14 @@ function invalidate(Request $request);
*
* @return Boolean|string true if the lock is acquired, the path to the current lock otherwise
*/
- function lock(Request $request);
+ public function lock(Request $request);
/**
* Releases the lock for the given Request.
*
* @param Request $request A Request instance
*/
- function unlock(Request $request);
+ public function unlock(Request $request);
/**
* Purges data for the given URL.
@@ -76,10 +76,10 @@ function unlock(Request $request);
*
* @return Boolean true if the URL exists and has been purged, false otherwise
*/
- function purge($url);
+ public function purge($url);
/**
* Cleanups storage.
*/
- function cleanup();
+ public function cleanup();
}
View
2  HttpKernelInterface.php
@@ -43,5 +43,5 @@
*
* @api
*/
- function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true);
+ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true);
}
View
2  Kernel.php
@@ -748,7 +748,7 @@ protected function getContainerLoader(ContainerInterface $container)
*
* @return string The PHP string with the comments removed
*/
- static public function stripComments($source)
+ public static function stripComments($source)
{
if (!function_exists('token_get_all')) {
return $source;
View
34 KernelInterface.php
@@ -34,7 +34,7 @@
*
* @api
*/
- function registerBundles();
+ public function registerBundles();
/**
* Loads the container configuration
@@ -43,14 +43,14 @@ function registerBundles();
*
* @api
*/
- function registerContainerConfiguration(LoaderInterface $loader);
+ public function registerContainerConfiguration(LoaderInterface $loader);
/**
* Boots the current kernel.
*
* @api
*/
- function boot();
+ public function boot();
/**
* Shutdowns the kernel.
@@ -59,7 +59,7 @@ function boot();
*
* @api
*/
- function shutdown();
+ public function shutdown();
/**
* Gets the registered bundle instances.
@@ -68,7 +68,7 @@ function shutdown();
*
* @api
*/
- function getBundles();
+ public function getBundles();
/**
* Checks if a given class name belongs to an active bundle.
@@ -79,7 +79,7 @@ function getBundles();
*
* @api
*/
- function isClassInActiveBundle($class);
+ public function isClassInActiveBundle($class);
/**
* Returns a bundle and optionally its descendants by its name.
@@ -93,7 +93,7 @@ function isClassInActiveBundle($class);
*
* @api
*/
- function getBundle($name, $first = true);
+ public function getBundle($name, $first = true);
/**
* Returns the file path for a given resource.
@@ -123,7 +123,7 @@ function getBundle($name, $first = true);
*
* @api
*/
- function locateResource($name, $dir = null, $first = true);
+ public function locateResource($name, $dir = null, $first = true);
/**
* Gets the name of the kernel
@@ -132,7 +132,7 @@ function locateResource($name, $dir = null, $first = true);
*
* @api
*/
- function getName();
+ public function getName();
/**
* Gets the environment.
@@ -141,7 +141,7 @@ function getName();
*
* @api
*/
- function getEnvironment();
+ public function getEnvironment();
/**
* Checks if debug mode is enabled.
@@ -150,7 +150,7 @@ function getEnvironment();
*
* @api
*/
- function isDebug();
+ public function isDebug();
/**
* Gets the application root dir.
@@ -159,7 +159,7 @@ function isDebug();
*
* @api
*/
- function getRootDir();
+ public function getRootDir();
/**
* Gets the current container.
@@ -168,7 +168,7 @@ function getRootDir();
*
* @api
*/
- function getContainer();
+ public function getContainer();
/**
* Gets the request start time (not available if debug is disabled).
@@ -177,7 +177,7 @@ function getContainer();
*
* @api
*/
- function getStartTime();
+ public function getStartTime();
/**
* Gets the cache directory.
@@ -186,7 +186,7 @@ function getStartTime();
*
* @api
*/
- function getCacheDir();
+ public function getCacheDir();
/**
* Gets the log directory.
@@ -195,7 +195,7 @@ function getCacheDir();
*
* @api
*/
- function getLogDir();
+ public function getLogDir();
/**
* Gets the charset of the application.
@@ -204,5 +204,5 @@ function getLogDir();
*
* @api
*/
- function getCharset();
+ public function getCharset();
}
View
4 Log/DebugLoggerInterface.php
@@ -27,12 +27,12 @@
*
* @return array An array of logs
*/
- function getLogs();
+ public function getLogs();
/**
* Returns the number of errors.
*
* @return integer The number of errors
*/
- function countErrors();
+ public function countErrors();
}
View
16 Log/LoggerInterface.php
@@ -23,40 +23,40 @@
/**
* @api
*/
- function emerg($message, array $context = array());
+ public function emerg($message, array $context = array());
/**
* @api
*/
- function alert($message, array $context = array());
+ public function alert($message, array $context = array());
/**
* @api
*/
- function crit($message, array $context = array());
+ public function crit($message, array $context = array());
/**
* @api
*/
- function err($message, array $context = array());
+ public function err($message, array $context = array());
/**
* @api
*/
- function warn($message, array $context = array());
+ public function warn($message, array $context = array());
/**
* @api
*/
- function notice($message, array $context = array());
+ public function notice($message, array $context = array());
/**
* @api
*/
- function info($message, array $context = array());
+ public function info($message, array $context = array());
/**
* @api
*/
- function debug($message, array $context = array());
+ public function debug($message, array $context = array());
}
View
2  Profiler/PdoProfilerStorage.php
@@ -235,7 +235,7 @@ protected function readChildren($token, $parent)
return $profiles;
}
-
+
/**
* Returns whether data for the given token already exists in storage.
*
View
8 Profiler/ProfilerStorageInterface.php
@@ -28,7 +28,7 @@
*
* @return array An array of tokens
*/
- function find($ip, $url, $limit, $method);
+ public function find($ip, $url, $limit, $method);
/**
* Reads data associated with the given token.
@@ -39,7 +39,7 @@ function find($ip, $url, $limit, $method);
*
* @return Profile The profile associated with token
*/
- function read($token);
+ public function read($token);
/**
* Saves a Profile.
@@ -48,10 +48,10 @@ function read($token);
*
* @return Boolean Write operation successful
*/
- function write(Profile $profile);
+ public function write(Profile $profile);
/**
* Purges all data from the database.
*/
- function purge();
+ public function purge();
}
View
1  Profiler/SqliteProfilerStorage.php
@@ -11,7 +11,6 @@
namespace Symfony\Component\HttpKernel\Profiler;
-
/**
* SqliteProfilerStorage stores profiling information in a SQLite database.
*
View
2  TerminableInterface.php
@@ -35,5 +35,5 @@
*
* @api
*/
- function terminate(Request $request, Response $response);
+ public function terminate(Request $request, Response $response);
}
View
2  Tests/Controller/ControllerResolverTest.php
@@ -162,7 +162,7 @@ protected function controllerMethod3($foo, $bar = null, $foobar)
{
}
- static protected function controllerMethod4()
+ protected static function controllerMethod4()
{
}
View
4 Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php
@@ -71,9 +71,9 @@ public function testStaticCallable()
class StaticClassFixture
{
- static public $called = false;
+ public static $called = false;
- static public function staticListener($event)
+ public static function staticListener($event)
{
self::$called = true;
}
View
1  Tests/Debug/StopwatchTest.php
@@ -85,7 +85,6 @@ public function testSection()
$stopwatch->stop('foobar');
$stopwatch->stopSection('0');
-
// the section is an event by itself
$this->assertCount(3, $stopwatch->getSectionEvents('1'));
$this->assertCount(2, $stopwatch->getSectionEvents('2'));
View
4 Tests/Fixtures/TestEventDispatcher.php
@@ -16,12 +16,12 @@
class TestEventDispatcher extends EventDispatcher implements TraceableEventDispatcherInterface
{
- function getCalledListeners()
+ public function getCalledListeners()
{
return array('foo');
}
- function getNotCalledListeners()
+ public function getNotCalledListeners()
{
return array('bar');
}
View
2  Tests/HttpCache/HttpCacheTestCase.php
@@ -154,7 +154,7 @@ public function catchExceptions($catch = true)
$this->catch = $catch;
}
- static public function clearDirectory($directory)
+ public static function clearDirectory($directory)
{
if (!is_dir($directory)) {
return;
View
2  Tests/HttpKernelTest.php
@@ -225,7 +225,7 @@ public function controller()
return new Response('foo');
}
- static public function staticController()
+ public static function staticController()
{
return new Response('foo');
}
View
4 Tests/Profiler/FileProfilerStorageTest.php
@@ -62,7 +62,7 @@ protected function getStorage()
public function testMultiRowIndexFile()
{
$iteration = 3;
- for($i = 0; $i < $iteration; $i++) {
+ for ($i = 0; $i < $iteration; $i++) {
$profile = new Profile('token' . $i);
$profile->setIp('127.0.0.' . $i);
$profile->setUrl('http://foo.bar/' . $i);
@@ -74,7 +74,7 @@ public function testMultiRowIndexFile()
}
$handle = fopen(self::$tmpDir . '/index.csv', 'r');
- for($i = 0; $i < $iteration; $i++) {
+ for ($i = 0; $i < $iteration; $i++) {
$row = fgetcsv($handle);
$this->assertEquals('token' . $i, $row[0]);
$this->assertEquals('127.0.0.' . $i, $row[1]);
View
4 Tests/Profiler/MongoDbProfilerStorageTest.php
@@ -26,7 +26,7 @@ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest
{
protected static $storage;
- static public function setUpBeforeClass()
+ public static function setUpBeforeClass()
{
if (extension_loaded('mongo')) {
self::$storage = new DummyMongoDbProfilerStorage('mongodb://localhost/symfony_tests/profiler_data', '', '', 86400);
@@ -38,7 +38,7 @@ static public function setUpBeforeClass()
}
}
- static public function tearDownAfterClass()
+ public static function tearDownAfterClass()
{
if (self::$storage) {
self::$storage->purge();
Please sign in to comment.
Something went wrong with that request. Please try again.