Commit 727f5b7a authored by Luis Cordova's avatar Luis Cordova Committed by Fabien Potencier

[RFR] various clean ups

parent 8c6f5974
......@@ -13,7 +13,6 @@ namespace Silex;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\HttpFoundation\Request;
use Silex\Controller;
/**
* Builds Silex controllers.
......
......@@ -30,7 +30,8 @@ class ConverterListener implements EventSubscriberInterface
/**
* Constructor.
*
* @param RouteCollection $routes A RouteCollection instance
* @param RouteCollection $routes A RouteCollection instance
* @param CallbackResolver $callbackResolver A CallbackResolver instance
*/
public function __construct(RouteCollection $routes, CallbackResolver $callbackResolver)
{
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
use Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer;
use Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer;
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider;
use Symfony\Component\Security\Http\Firewall\RememberMeListener;
use Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices;
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Component\HttpFoundation\RequestMatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\SecurityContext;
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage;
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\MessageSelector;
use Symfony\Component\Translation\Loader\ArrayLoader;
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Bridge\Twig\Extension\RoutingExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Extension\FormExtension;
......
......@@ -13,7 +13,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Symfony\Component\Routing\Generator\UrlGenerator;
/**
......
......@@ -14,7 +14,6 @@ namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Silex\ConstraintValidatorFactory;
use Symfony\Component\Validator\Validator;
use Symfony\Component\Validator\DefaultTranslator;
use Symfony\Component\Validator\Mapping\ClassMetadataFactory;
......
......@@ -13,7 +13,6 @@ namespace Silex;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Matcher\RedirectableUrlMatcher as BaseRedirectableUrlMatcher;
use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface;
/**
* Implements the RedirectableUrlMatcherInterface for Silex.
......
......@@ -15,7 +15,6 @@ use Silex\Application;
use Silex\ControllerCollection;
use Silex\Route;
use Silex\Provider\MonologServiceProvider;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\Debug\ErrorHandler;
......
......@@ -12,7 +12,6 @@
namespace Silex\Tests;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
......
......@@ -12,7 +12,6 @@
namespace Silex\Tests;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
class LazyDispatcherTest extends \PHPUnit_Framework_TestCase
......
......@@ -85,7 +85,7 @@ class LazyUrlMatcherTest extends \PHPUnit_Framework_TestCase
$matcher = new LazyUrlMatcher(function () use ($urlMatcher) {
return $urlMatcher;
});
$result = $matcher->setContext($context);
$matcher->setContext($context);
}
/**
......
......@@ -12,7 +12,6 @@
namespace Silex\Tests;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
......
......@@ -13,7 +13,6 @@ namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\FormServiceProvider;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormTypeGuesserChain;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
......
......@@ -13,7 +13,6 @@ namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\HttpCacheServiceProvider;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
......
......@@ -17,7 +17,6 @@ use Silex\Provider\RememberMeServiceProvider;
use Silex\Provider\SecurityServiceProvider;
use Silex\Provider\SessionServiceProvider;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\HttpFoundation\Request;
/**
* SecurityServiceProvider
......
......@@ -13,9 +13,7 @@ namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\SwiftmailerServiceProvider;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class SwiftmailerServiceProviderTest extends \PHPUnit_Framework_TestCase
{
......
......@@ -14,8 +14,6 @@ namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\TranslationServiceProvider;
use Symfony\Component\HttpFoundation\Request;
/**
* TranslationProvider test cases.
*
......
......@@ -13,7 +13,6 @@ namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\TwigServiceProvider;
use Symfony\Component\HttpFoundation\Request;
/**
......
......@@ -13,7 +13,6 @@ namespace Silex\Tests\Provider;
use Silex\Application;
use Silex\Provider\UrlGeneratorServiceProvider;
use Symfony\Component\HttpFoundation\Request;
/**
......
......@@ -12,7 +12,6 @@
namespace Silex\Tests;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
......@@ -180,10 +179,6 @@ class RouterTest extends \PHPUnit_Framework_TestCase
public function testHostSpecification()
{
if (!method_exists('Symfony\Component\Routing\Route', 'setHost')) {
$this->markTestSkipped('host() is only supported in the Symfony Routing 2.2+');
}
$route = new \Silex\Route();
$this->assertSame($route, $route->host('{locale}.example.com'));
......@@ -250,7 +245,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
$this->checkRouteResponse($app, '/bar', 'bar');
}
protected function checkRouteResponse($app, $path, $expectedContent, $method = 'get', $message = null)
protected function checkRouteResponse(Application $app, $path, $expectedContent, $method = 'get', $message = null)
{
$request = Request::create($path, $method);
$response = $app->handle($request);
......
......@@ -33,7 +33,7 @@ class ServiceControllerResolverRouterTest extends RouterTest
$this->checkRouteResponse($app, '/bar', 'bar');
}
protected function checkRouteResponse($app, $path, $expectedContent, $method = 'get', $message = null)
protected function checkRouteResponse(Application $app, $path, $expectedContent, $method = 'get', $message = null)
{
$app->register(new ServiceControllerServiceProvider());
......
......@@ -12,7 +12,6 @@
namespace Silex\Tests;
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment