Passed
Branch develop (ee5356)
by nguereza
05:54
created
Category
src/Parameter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 namespace Platine\Route;
49 49
 
50
-class Parameter implements ParameterInterface
51
-{
50
+class Parameter implements ParameterInterface {
52 51
 
53 52
     /**
54 53
      * The parameter name
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * @param string $name  the name of the parameter
69 68
      * @param mixed $value the parameter value
70 69
      */
71
-    public function __construct(string $name, $value)
72
-    {
70
+    public function __construct(string $name, $value) {
73 71
         $this->name = $name;
74 72
         $this->value = $value;
75 73
     }
@@ -85,8 +83,7 @@  discard block
 block discarded – undo
85 83
     /**
86 84
      * {@inheritdoc}
87 85
      */
88
-    public function getValue()
89
-    {
86
+    public function getValue() {
90 87
         return $this->value;
91 88
     }
92 89
 
Please login to merge, or discard this patch.
src/Route.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 use Platine\Http\UriInterface;
54 54
 use Platine\Route\Exception\InvalidRouteParameterException;
55 55
 
56
-class Route
57
-{
56
+class Route {
58 57
 
59 58
     /**
60 59
      * Search through the given route looking for dynamic portions.
@@ -187,8 +186,7 @@  discard block
 block discarded – undo
187 186
      * Return the route handler
188 187
      * @return mixed
189 188
      */
190
-    public function getHandler()
191
-    {
189
+    public function getHandler() {
192 190
         return $this->handler;
193 191
     }
194 192
 
Please login to merge, or discard this patch.
src/Middleware/RouteMatchMiddleware.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
 use Platine\Route\Route;
56 56
 use Platine\Route\Router;
57 57
 
58
-class RouteMatchMiddleware implements MiddlewareInterface
59
-{
58
+class RouteMatchMiddleware implements MiddlewareInterface {
60 59
 
61 60
     /**
62 61
      * The Router instance
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
      * @param Router $router
76 75
      * @param array  $allowedMethods the default allowed methods
77 76
      */
78
-    public function __construct(Router $router, array $allowedMethods = ['HEAD'])
79
-    {
77
+    public function __construct(Router $router, array $allowedMethods = ['HEAD']) {
80 78
         $this->router = $router;
81 79
 
82 80
         foreach ($allowedMethods as $method) {
Please login to merge, or discard this patch.
src/Middleware/RouteDispatcherMiddleware.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
 use Platine\Http\ServerRequestInterface;
56 56
 use Platine\Route\Route;
57 57
 
58
-class RouteDispatcherMiddleware implements MiddlewareInterface
59
-{
58
+class RouteDispatcherMiddleware implements MiddlewareInterface {
60 59
 
61 60
     /**
62 61
      * The Middleware resolver instance
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * Create new instance
69 68
      * @param MiddlewareResolverInterface $resolver
70 69
      */
71
-    public function __construct(MiddlewareResolverInterface $resolver)
72
-    {
70
+    public function __construct(MiddlewareResolverInterface $resolver) {
73 71
         $this->resolver = $resolver;
74 72
     }
75 73
 
Please login to merge, or discard this patch.
src/RouteCollection.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@  discard block
 block discarded – undo
51 51
 use Platine\Route\Exception\RouteAlreadyExistsException;
52 52
 use Platine\Route\Exception\RouteNotFoundException;
53 53
 
54
-class RouteCollection implements RouteCollectionInterface
55
-{
54
+class RouteCollection implements RouteCollectionInterface {
56 55
 
57 56
     /**
58 57
      * The list of routes
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
      * Create new instance
71 70
      * @param array $routes
72 71
      */
73
-    public function __construct(array $routes = [])
74
-    {
72
+    public function __construct(array $routes = []) {
75 73
         foreach ($routes as $route) {
76 74
             if (!$route instanceof Route) {
77 75
                 throw new InvalidArgumentException(sprintf(
Please login to merge, or discard this patch.
src/Exception/RouteAlreadyExistsException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 
34 34
 namespace Platine\Route\Exception;
35 35
 
36
-class RouteAlreadyExistsException extends \Exception
37
-{
36
+class RouteAlreadyExistsException extends \Exception {
38 37
 
39 38
 }
Please login to merge, or discard this patch.
src/Exception/RouteNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 
34 34
 namespace Platine\Route\Exception;
35 35
 
36
-class RouteNotFoundException extends \Exception
37
-{
36
+class RouteNotFoundException extends \Exception {
38 37
 
39 38
 }
Please login to merge, or discard this patch.
src/Exception/InvalidRouteParameterException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 
34 34
 namespace Platine\Route\Exception;
35 35
 
36
-class InvalidRouteParameterException extends \Exception
37
-{
36
+class InvalidRouteParameterException extends \Exception {
38 37
 
39 38
 }
Please login to merge, or discard this patch.
src/ParameterCollection.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 use InvalidArgumentException;
51 51
 
52
-class ParameterCollection
53
-{
52
+class ParameterCollection {
54 53
 
55 54
     /**
56 55
      * The array of parameters
@@ -69,8 +68,7 @@  discard block
 block discarded – undo
69 68
      *
70 69
      * @param array $parameters  the route parameters
71 70
      */
72
-    public function __construct(array $parameters = [])
73
-    {
71
+    public function __construct(array $parameters = []) {
74 72
         foreach ($parameters as $parameter) {
75 73
             if (!$parameter instanceof ParameterInterface) {
76 74
                 throw new InvalidArgumentException(sprintf(
Please login to merge, or discard this patch.