@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @param \Illuminate\Contracts\Routing\UrlGenerator $builder Laravel URL builder 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, \Illuminate\Contracts\Routing\UrlGenerator $builder, array $fixed ) |
|
35 | + public function __construct(\Aimeos\MW\View\Iface $view, \Illuminate\Contracts\Routing\UrlGenerator $builder, array $fixed) |
|
36 | 36 | { |
37 | - parent::__construct( $view ); |
|
37 | + parent::__construct($view); |
|
38 | 38 | |
39 | 39 | $this->builder = $builder; |
40 | 40 | $this->fixed = $fixed; |
@@ -52,13 +52,13 @@ 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 $trailing = [], array $config = [] ) |
|
55 | + public function transform($target = null, $controller = null, $action = null, array $params = [], array $trailing = [], array $config = []) |
|
56 | 56 | { |
57 | - $params = $this->sanitize( $params ); |
|
58 | - $values = $this->getValues( $config ); |
|
59 | - $fragment = ( !empty( $trailing ) ? '#' . implode( '/', $trailing ) : '' ); |
|
57 | + $params = $this->sanitize($params); |
|
58 | + $values = $this->getValues($config); |
|
59 | + $fragment = (!empty($trailing) ? '#'.implode('/', $trailing) : ''); |
|
60 | 60 | |
61 | - return $this->builder->route( $target, $params + $this->fixed, $values['absoluteUri'] ) . $fragment; |
|
61 | + return $this->builder->route($target, $params + $this->fixed, $values['absoluteUri']).$fragment; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | * @param array $config Associative list of key/value pairs |
69 | 69 | * @return array Associative list of sanitized key/value pairs |
70 | 70 | */ |
71 | - protected function getValues( array $config ) |
|
71 | + protected function getValues(array $config) |
|
72 | 72 | { |
73 | 73 | $values = array( |
74 | 74 | 'absoluteUri' => false, |
75 | 75 | ); |
76 | 76 | |
77 | - if( isset( $config['absoluteUri'] ) ) { |
|
77 | + if (isset($config['absoluteUri'])) { |
|
78 | 78 | $values['absoluteUri'] = (bool) $config['absoluteUri']; |
79 | 79 | } |
80 | 80 |