@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Thinktomorrow\Locale\Detectors; |
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | -use Thinktomorrow\Locale\Values\Locale; |
|
7 | -use Thinktomorrow\Locale\Values\Config; |
|
8 | 6 | use Thinktomorrow\Locale\Scope; |
7 | +use Thinktomorrow\Locale\Values\Config; |
|
8 | +use Thinktomorrow\Locale\Values\Locale; |
|
9 | 9 | |
10 | 10 | class HiddenSegmentDetector implements Detector |
11 | 11 | { |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Thinktomorrow\Locale\Detectors; |
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | -use Thinktomorrow\Locale\Values\Locale; |
|
7 | -use Thinktomorrow\Locale\Values\Config; |
|
8 | 6 | use Thinktomorrow\Locale\Scope; |
7 | +use Thinktomorrow\Locale\Values\Config; |
|
8 | +use Thinktomorrow\Locale\Values\Locale; |
|
9 | 9 | |
10 | 10 | class QueryDetector implements Detector |
11 | 11 | { |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Thinktomorrow\Locale\Detectors; |
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | -use Thinktomorrow\Locale\Values\Locale; |
|
7 | -use Thinktomorrow\Locale\Values\Config; |
|
8 | 6 | use Thinktomorrow\Locale\Scope; |
7 | +use Thinktomorrow\Locale\Values\Config; |
|
8 | +use Thinktomorrow\Locale\Values\Locale; |
|
9 | 9 | |
10 | 10 | class SegmentDetector implements Detector |
11 | 11 | { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @param array $parameters |
60 | 60 | * @param null $secure |
61 | 61 | * |
62 | - * @return mixed |
|
62 | + * @return string |
|
63 | 63 | */ |
64 | 64 | public function to($url, $locale = null, $parameters = [], $secure = null) |
65 | 65 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @param null $locale |
86 | 86 | * @param array $parameters |
87 | 87 | * @param bool $asCanonical |
88 | - * @return mixed |
|
88 | + * @return string |
|
89 | 89 | */ |
90 | 90 | public function route($name, $locale = null, $parameters = [], $asCanonical = false) |
91 | 91 | { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Thinktomorrow\Locale\Parsers\LocaleSegmentParameter; |
6 | 6 | use Thinktomorrow\Locale\Parsers\RouteParser; |
7 | 7 | use Thinktomorrow\Locale\Parsers\UrlParser; |
8 | -use Thinktomorrow\Locale\CanonicalScope; |
|
9 | 8 | use Thinktomorrow\Locale\Values\Config; |
10 | 9 | |
11 | 10 | class LocaleUrl |
@@ -57,6 +57,9 @@ discard block |
||
57 | 57 | return $parser->get(); |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param boolean $secure |
|
62 | + */ |
|
60 | 63 | public function set(string $routename, array $parameters = [], $secure = null) |
61 | 64 | { |
62 | 65 | $this->reset(); |
@@ -98,6 +101,9 @@ discard block |
||
98 | 101 | return $this; |
99 | 102 | } |
100 | 103 | |
104 | + /** |
|
105 | + * @param string $routekey |
|
106 | + */ |
|
101 | 107 | public function resolveRoute($routekey, $parameters = []) |
102 | 108 | { |
103 | 109 | return $this->urlParser->resolveRoute($routekey, $parameters, true); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @param $uri |
14 | 14 | * @param array $parameters |
15 | - * @return mixed|string |
|
15 | + * @return string |
|
16 | 16 | */ |
17 | 17 | public static function replace($uri, $parameters = []) |
18 | 18 | { |
@@ -23,6 +23,9 @@ |
||
23 | 23 | return new static($config); |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $key |
|
28 | + */ |
|
26 | 29 | public function get($key) |
27 | 30 | { |
28 | 31 | if(!isset($this->config[$key])) throw new \InvalidArgumentException('No config value found by key ['.$key.']'); |