@@ -75,13 +75,13 @@ |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | if (empty($segments)) { |
78 | - throw new InvalidArgumentException('Missing data for URL segment: ' . $segmentName); |
|
78 | + throw new InvalidArgumentException('Missing data for URL segment: '.$segmentName); |
|
79 | 79 | } |
80 | 80 | $url = implode('', $segments); |
81 | 81 | |
82 | 82 | $params = array_merge(array_diff_key($data, $segmentKeys), $queryParams); |
83 | 83 | if ($params) { |
84 | - $url .= '?' . http_build_query($params); |
|
84 | + $url .= '?'.http_build_query($params); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | return $url; |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @param \Slim\Router $router Slim router object |
33 | 33 | * @param array Associative list of fixed parameters that should be available for all routes |
34 | 34 | */ |
35 | - public function __construct( \Aimeos\MW\View\Iface $view, \Slim\Router $router, array $fixed ) |
|
35 | + public function __construct(\Aimeos\MW\View\Iface $view, \Slim\Router $router, array $fixed) |
|
36 | 36 | { |
37 | - parent::__construct( $view ); |
|
37 | + parent::__construct($view); |
|
38 | 38 | |
39 | 39 | $this->router = $router; |
40 | 40 | $this->fixed = $fixed; |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | * @param array $config Additional configuration parameter per URL |
53 | 53 | * @return string Complete URL that can be used in the template |
54 | 54 | */ |
55 | - public function transform( $target = null, $controller = null, $action = null, array $params = array(), array $trailing = array(), array $config = array() ) |
|
55 | + public function transform($target = null, $controller = null, $action = null, array $params = array(), array $trailing = array(), array $config = array()) |
|
56 | 56 | { |
57 | - $params = $this->sanitize( $params ); |
|
57 | + $params = $this->sanitize($params); |
|
58 | 58 | |
59 | - if( isset( $config['absoluteUri'] ) && (bool) $config['absoluteUri'] === true ) { |
|
60 | - return $this->router->pathFor( $target, $this->fixed + $params ); |
|
59 | + if (isset($config['absoluteUri']) && (bool) $config['absoluteUri'] === true) { |
|
60 | + return $this->router->pathFor($target, $this->fixed + $params); |
|
61 | 61 | } |
62 | 62 | |
63 | - return $this->router->relativePathFor( $target, $this->fixed + $params ); |
|
63 | + return $this->router->relativePathFor($target, $this->fixed + $params); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | \ No newline at end of file |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | $methods = ['GET']; |
26 | 26 | $pattern = '/hello/{first:\w+}/{last}'; |
27 | - $callable = function ($request, $response, $args) { |
|
27 | + $callable = function($request, $response, $args) { |
|
28 | 28 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
29 | 29 | }; |
30 | 30 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $methods = ['GET']; |
44 | 44 | $pattern = '/hello/{first:\w+}/{last}'; |
45 | - $callable = function ($request, $response, $args) { |
|
45 | + $callable = function($request, $response, $args) { |
|
46 | 46 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
47 | 47 | }; |
48 | 48 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $methods = ['GET']; |
60 | 60 | $pattern = '/hello/{first:\w+}/{last}'; |
61 | - $callable = function ($request, $response, $args) { |
|
61 | + $callable = function($request, $response, $args) { |
|
62 | 62 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
63 | 63 | }; |
64 | 64 | $this->router->setBasePath('/base/path'); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $methods = ['GET']; |
77 | 77 | $pattern = '/archive/{year}[/{month:[\d:{2}]}[/d/{day}]]'; |
78 | - $callable = function ($request, $response, $args) { |
|
78 | + $callable = function($request, $response, $args) { |
|
79 | 79 | return $response; |
80 | 80 | }; |
81 | 81 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $methods = ['GET']; |
101 | 101 | $pattern = '/hello/{name}'; |
102 | - $callable = function ($request, $response, $args) { |
|
102 | + $callable = function($request, $response, $args) { |
|
103 | 103 | echo sprintf('Hello %s', $args['name']); |
104 | 104 | }; |
105 | 105 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | { |
119 | 119 | $methods = ['GET']; |
120 | 120 | $pattern = '/hello/{first}/{last}'; |
121 | - $callable = function ($request, $response, $args) { |
|
121 | + $callable = function($request, $response, $args) { |
|
122 | 122 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
123 | 123 | }; |
124 | 124 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | $methods = ['GET']; |
136 | 136 | $pattern = '/hello/{first}/{last}'; |
137 | - $callable = function ($request, $response, $args) { |
|
137 | + $callable = function($request, $response, $args) { |
|
138 | 138 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
139 | 139 | }; |
140 | 140 | $route = $this->router->map($methods, $pattern, $callable); |