Skip to content

Commit be93d0f

Browse files
authored
Merge pull request #189 from symfony-cmf/styleci
enable more styleci checks
2 parents 2b91ef0 + 1177f4c commit be93d0f

26 files changed

+62
-57
lines changed

.styleci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
preset: symfony
2+
3+
enabled:
4+
- ordered_use
5+
- short_array_syntax

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ and licensed under the [MIT License](LICENSE).
2424

2525
## Requirements
2626

27-
* The Symfony Routing component (>= 2.2.0)
27+
* PHP 5.6 / 7
28+
* The Symfony Routing component (2.2.0 - 3.\*)
2829
* See also the `require` section of [composer.json](composer.json)
2930

3031

src/ChainRouter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111

1212
namespace Symfony\Cmf\Component\Routing;
1313

14-
use Symfony\Component\Routing\RouterInterface;
14+
use Psr\Log\LoggerInterface;
15+
use Symfony\Component\HttpFoundation\Request;
16+
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
17+
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
18+
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
19+
use Symfony\Component\Routing\Exception\RouteNotFoundException;
1520
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1621
use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
1722
use Symfony\Component\Routing\RequestContext;
1823
use Symfony\Component\Routing\RequestContextAwareInterface;
19-
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
20-
use Symfony\Component\Routing\Exception\RouteNotFoundException;
21-
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
2224
use Symfony\Component\Routing\RouteCollection;
23-
use Symfony\Component\HttpFoundation\Request;
24-
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
25-
use Psr\Log\LoggerInterface;
25+
use Symfony\Component\Routing\RouterInterface;
2626

2727
/**
2828
* The ChainRouter allows to combine several routers to try in a defined order.

src/ChainRouterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Cmf\Component\Routing;
1313

14-
use Symfony\Component\Routing\RouterInterface;
1514
use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
15+
use Symfony\Component\Routing\RouterInterface;
1616

1717
/**
1818
* Interface for a router that proxies routing to other routers.

src/ContentAwareGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
namespace Symfony\Cmf\Component\Routing;
1313

1414
use Doctrine\Common\Collections\Collection;
15+
use Symfony\Component\Routing\Exception\RouteNotFoundException;
1516
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1617
use Symfony\Component\Routing\Route as SymfonyRoute;
17-
use Symfony\Component\Routing\Exception\RouteNotFoundException;
1818
use Symfony\Component\Routing\RouteCollection;
1919

2020
/**

src/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
namespace Symfony\Cmf\Component\Routing\DependencyInjection\Compiler;
1313

14+
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1415
use Symfony\Component\DependencyInjection\ContainerBuilder;
1516
use Symfony\Component\DependencyInjection\Reference;
16-
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1717

1818
/**
1919
* This compiler pass adds additional route enhancers

src/DependencyInjection/Compiler/RegisterRoutersPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
namespace Symfony\Cmf\Component\Routing\DependencyInjection\Compiler;
1313

14+
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1415
use Symfony\Component\DependencyInjection\ContainerBuilder;
1516
use Symfony\Component\DependencyInjection\Reference;
16-
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1717

1818
/**
1919
* Compiler pass to register routers to the ChainRouter.

src/DynamicRouter.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111

1212
namespace Symfony\Cmf\Component\Routing;
1313

14+
use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface;
15+
use Symfony\Cmf\Component\Routing\Event\Events;
16+
use Symfony\Cmf\Component\Routing\Event\RouterGenerateEvent;
17+
use Symfony\Cmf\Component\Routing\Event\RouterMatchEvent;
18+
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
1419
use Symfony\Component\HttpFoundation\Request;
15-
use Symfony\Component\Routing\RequestContext;
16-
use Symfony\Component\Routing\Route;
17-
use Symfony\Component\Routing\RouteCollection;
18-
use Symfony\Component\Routing\RouterInterface;
20+
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
21+
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
22+
use Symfony\Component\Routing\Exception\RouteNotFoundException;
1923
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2024
use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
2125
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
26+
use Symfony\Component\Routing\RequestContext;
2227
use Symfony\Component\Routing\RequestContextAwareInterface;
23-
use Symfony\Component\Routing\Exception\RouteNotFoundException;
24-
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
25-
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
26-
use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface;
27-
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
28-
use Symfony\Cmf\Component\Routing\Event\Events;
29-
use Symfony\Cmf\Component\Routing\Event\RouterMatchEvent;
30-
use Symfony\Cmf\Component\Routing\Event\RouterGenerateEvent;
28+
use Symfony\Component\Routing\Route;
29+
use Symfony\Component\Routing\RouteCollection;
30+
use Symfony\Component\Routing\RouterInterface;
3131

3232
/**
3333
* A flexible router accepting matcher and generator through injection and

src/Enhancer/RouteContentEnhancer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Cmf\Component\Routing\Enhancer;
1313

14-
use Symfony\Component\HttpFoundation\Request;
1514
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
15+
use Symfony\Component\HttpFoundation\Request;
1616

1717
/**
1818
* This enhancer sets the content to target field if the route provides content.

src/LazyRouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
namespace Symfony\Cmf\Component\Routing;
1313

1414
use Symfony\Component\Routing\Exception\RouteNotFoundException;
15-
use Symfony\Component\Routing\RouteCollection;
1615
use Symfony\Component\Routing\Route;
16+
use Symfony\Component\Routing\RouteCollection;
1717

1818
class LazyRouteCollection extends RouteCollection
1919
{

0 commit comments

Comments
 (0)