@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Check whether url matches the given patterns |
| 54 | - * @param string $patterns Patterns to match |
|
| 54 | + * @param string[] $patterns Patterns to match |
|
| 55 | 55 | * @return boolean |
| 56 | 56 | */ |
| 57 | 57 | public function checkUrlIs(...$patterns) |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Check whether url contains given strings |
| 64 | - * @param string $patterns |
|
| 64 | + * @param string[] $patterns |
|
| 65 | 65 | * @return boolean |
| 66 | 66 | */ |
| 67 | 67 | public function checkUrlHas(...$patterns) |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * Check if the current route name is the one given and the parameters match the current url |
| 79 | 79 | * @param string $route The route name to check |
| 80 | - * @param array $routeparameters The route parameters, used to build the url |
|
| 80 | + * @param array $routeParameters The route parameters, used to build the url |
|
| 81 | 81 | * @return boolean |
| 82 | 82 | */ |
| 83 | 83 | public function checkRouteIs($route, array $routeParameters = []) |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * Check whether the current route is one of the given routes |
| 103 | 103 | * @method checkRouteIn |
| 104 | - * @param string $routes |
|
| 104 | + * @param string[] $routes |
|
| 105 | 105 | * @return boolean |
| 106 | 106 | */ |
| 107 | 107 | public function checkRouteIn(...$routes) |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * Check if query parameters names are exactly the ones given in argument |
| 143 | 143 | * The order of the parameters does not matter |
| 144 | - * @param string $parameters string |
|
| 144 | + * @param string[] $parameters string |
|
| 145 | 145 | * @return boolean |
| 146 | 146 | */ |
| 147 | 147 | public function checkQueryHasOnly(...$parameters) |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | /** |
| 180 | 180 | * Returns activeValue or inactiveValue for checkUrlIs test |
| 181 | - * @param string $patterns |
|
| 181 | + * @param string[] $patterns |
|
| 182 | 182 | * @return string Active state string |
| 183 | 183 | * @see Active::checkUrl |
| 184 | 184 | */ |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | 191 | * Returns activeValue or inactiveValue for checkUrlHas test |
| 192 | - * @param string $patterns |
|
| 192 | + * @param string[] $patterns |
|
| 193 | 193 | * @return string Active state string |
| 194 | 194 | * @see Active::checkUrlHas() |
| 195 | 195 | */ |
@@ -212,8 +212,8 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | /** |
| 214 | 214 | * Return activeValue or inactiveValue for checkRouteIn test |
| 215 | - * @param string $routes |
|
| 216 | - * @return boolean |
|
| 215 | + * @param string[] $routes |
|
| 216 | + * @return string |
|
| 217 | 217 | * @see Active::checkRouteIn() |
| 218 | 218 | */ |
| 219 | 219 | public function ifRouteIn(...$routes) |
@@ -223,7 +223,6 @@ discard block |
||
| 223 | 223 | |
| 224 | 224 | /** |
| 225 | 225 | * Returns activeValue or inactiveValue for checkQuery test |
| 226 | - * @param string $patterns |
|
| 227 | 226 | * @return string Active state string |
| 228 | 227 | * @see Active::checkQueryIs() |
| 229 | 228 | */ |
@@ -234,7 +233,6 @@ discard block |
||
| 234 | 233 | |
| 235 | 234 | /** |
| 236 | 235 | * Returns activeValue or inactiveValue for checkQueryHas test |
| 237 | - * @param string $patterns |
|
| 238 | 236 | * @return string Active state string |
| 239 | 237 | * @see Active::checkQueryHas() |
| 240 | 238 | */ |
@@ -245,7 +243,6 @@ discard block |
||
| 245 | 243 | |
| 246 | 244 | /** |
| 247 | 245 | * Returns activeValue or inactiveValue for checkQueryHasOnly test |
| 248 | - * @param string $patterns |
|
| 249 | 246 | * @return string Active state string |
| 250 | 247 | * @see Active::checkQueryHasOnly() |
| 251 | 248 | */ |
@@ -3,9 +3,7 @@ |
||
| 3 | 3 | namespace Arcesilas\ActiveState; |
| 4 | 4 | |
| 5 | 5 | use Request; |
| 6 | -use Illuminate\Support\Str; |
|
| 7 | 6 | use Illuminate\Http\Request as HttpRequest; |
| 8 | -use Illuminate\Routing\Exceptions\UrlGenerationException; |
|
| 9 | 7 | |
| 10 | 8 | class Active |
| 11 | 9 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Arcesilas\ActiveState; |
| 4 | 4 | |
| 5 | 5 | use Active; |
| 6 | -use Request; |
|
| 7 | 6 | use Illuminate\Support\Facades\Blade; |
| 8 | 7 | use Illuminate\Support\ServiceProvider; |
| 9 | 8 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | if (! function_exists('active_url_has')) { |
| 16 | 16 | /** |
| 17 | 17 | * @see Arcesilas\ActiveState\Active::ifUrlHas() |
| 18 | - * @param string $urls |
|
| 18 | + * @param string[] $urls |
|
| 19 | 19 | * @return string |
| 20 | 20 | */ |
| 21 | 21 | function active_url_has(...$urls) |
@@ -40,7 +40,6 @@ discard block |
||
| 40 | 40 | if (! function_exists('active_route_in')) { |
| 41 | 41 | /** |
| 42 | 42 | * @see Arcesilas\ActiveState\Active::ifRouteIn() |
| 43 | - * @param string $urls |
|
| 44 | 43 | * @return string |
| 45 | 44 | */ |
| 46 | 45 | function active_route_in(...$routes) |
@@ -76,7 +75,7 @@ discard block |
||
| 76 | 75 | if (! function_exists('active_query_has_only')) { |
| 77 | 76 | /** |
| 78 | 77 | * @see Arcesilas\ActiveState\Active::ifQueryHasOnly() |
| 79 | - * @param string $parameters |
|
| 78 | + * @param string[] $parameters |
|
| 80 | 79 | * @return string |
| 81 | 80 | */ |
| 82 | 81 | function active_query_has_only(...$parameters) |