aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2016-01-09 09:08:14 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2016-01-09 09:08:14 +0100
commitd63357e98af63e080e3870f64de22af81b2bb260 (patch)
tree25fe09c06e12c7d15e102d918b2e288fc0534533
parentdaa1c30fbdb5e74018e9caba2bc1e188f7920c82 (diff)
downloadRouter-d63357e98af63e080e3870f64de22af81b2bb260.zip
Router-d63357e98af63e080e3870f64de22af81b2bb260.tar.gz
Router-d63357e98af63e080e3870f64de22af81b2bb260.tar.bz2
Quality: Run devtools:cs.
-rw-r--r--Cli.php14
-rw-r--r--Exception/Exception.php4
-rw-r--r--Exception/NotFound.php4
-rw-r--r--Generic.php16
-rw-r--r--Http/Dav.php4
-rw-r--r--Http/Http.php16
-rw-r--r--Router.php14
7 files changed, 36 insertions, 36 deletions
diff --git a/Cli.php b/Cli.php
index 42c722a..61d2a50 100644
--- a/Cli.php
+++ b/Cli.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,7 +43,7 @@ use Hoa\Zformat;
*
* CLI router.
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
class Cli extends Generic implements Zformat\Parameterizable
@@ -71,7 +71,7 @@ class Cli extends Generic implements Zformat\Parameterizable
*
* @return void
*/
- public function __construct(Array $parameters = [])
+ public function __construct(array $parameters = [])
{
$this->_parameters = new Zformat\Parameter(
$this,
@@ -137,10 +137,10 @@ class Cli extends Generic implements Zformat\Parameterizable
protected function _addRule(
$visibility,
$id,
- Array $methods,
+ array $methods,
$pattern,
$call, $able,
- Array $variables
+ array $variables
) {
if (true === $this->ruleExists($id)) {
throw new Exception(
@@ -272,14 +272,14 @@ class Cli extends Generic implements Zformat\Parameterizable
* @param array $variables Variables.
* @return string
*/
- public function unroute($id, Array $variables = [])
+ public function unroute($id, array $variables = [])
{
$rule = $this->getRule($id);
$pattern = $rule[Router::RULE_PATTERN];
$variables = array_merge($rule[Router::RULE_VARIABLES], $variables);
$out = preg_replace_callback(
'#\(\?\<([^>]+)>[^\)]*\)[\?\*\+]{0,2}#',
- function (Array $matches) use (&$variables) {
+ function (array $matches) use (&$variables) {
$m = strtolower($matches[1]);
if (!isset($variables[$m])) {
diff --git a/Exception/Exception.php b/Exception/Exception.php
index 4fef93b..72017eb 100644
--- a/Exception/Exception.php
+++ b/Exception/Exception.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -44,7 +44,7 @@ use Hoa\Exception as HoaException;
*
* Extending the \Hoa\Exception\Exception class.
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
class Exception extends HoaException
diff --git a/Exception/NotFound.php b/Exception/NotFound.php
index bf140d7..a695598 100644
--- a/Exception/NotFound.php
+++ b/Exception/NotFound.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,7 +41,7 @@ namespace Hoa\Router\Exception;
*
* Extending the \Hoa\Router\Exception class.
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
class NotFound extends Exception
diff --git a/Generic.php b/Generic.php
index 6b049c7..1023edd 100644
--- a/Generic.php
+++ b/Generic.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,7 +41,7 @@ namespace Hoa\Router;
*
* Generic router.
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
abstract class Generic implements Router
@@ -86,11 +86,11 @@ abstract class Generic implements Router
abstract protected function _addRule(
$visibility,
$id,
- Array $methods,
+ array $methods,
$pattern,
$call,
$able,
- Array $variables
+ array $variables
);
/**
@@ -107,11 +107,11 @@ abstract class Generic implements Router
*/
public function addRule(
$id,
- Array $methods,
+ array $methods,
$pattern,
$call = null,
$able = null,
- Array $variables = []
+ array $variables = []
) {
return $this->_addRule(
Router::VISIBILITY_PUBLIC,
@@ -138,11 +138,11 @@ abstract class Generic implements Router
*/
public function addPrivateRule(
$id,
- Array $methods,
+ array $methods,
$pattern,
$call = null,
$able = null,
- Array $variables = []
+ array $variables = []
) {
return $this->_addRule(
Router::VISIBILITY_PRIVATE,
diff --git a/Http/Dav.php b/Http/Dav.php
index 24427a8..33bad15 100644
--- a/Http/Dav.php
+++ b/Http/Dav.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,7 +41,7 @@ namespace Hoa\Router\Http;
*
* DAV router (extension of HTTP).
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
class Dav extends Http
diff --git a/Http/Http.php b/Http/Http.php
index 591fb4d..d56e21e 100644
--- a/Http/Http.php
+++ b/Http/Http.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,7 +45,7 @@ use Hoa\Zformat;
*
* HTTP router.
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
class Http extends Router\Generic implements Zformat\Parameterizable
@@ -136,7 +136,7 @@ class Http extends Router\Generic implements Zformat\Parameterizable
*
* @return void
*/
- public function __construct(Array $parameters = [])
+ public function __construct(array $parameters = [])
{
$this->_parameters = new Zformat\Parameter(
$this,
@@ -213,11 +213,11 @@ class Http extends Router\Generic implements Zformat\Parameterizable
protected function _addRule(
$visibility,
$id,
- Array $methods,
+ array $methods,
$pattern,
$call,
$able,
- Array $variables
+ array $variables
) {
if (true === $this->ruleExists($id)) {
throw new Router\Exception(
@@ -465,7 +465,7 @@ class Http extends Router\Generic implements Zformat\Parameterizable
*/
public function unroute(
$id,
- Array $variables = [],
+ array $variables = [],
$secured = null,
$prefix = null
) {
@@ -619,7 +619,7 @@ class Http extends Router\Generic implements Zformat\Parameterizable
protected function _unroute(
$id,
$pattern,
- Array $variables,
+ array $variables,
$allowEmpty = true
) {
$unusedVariables = [];
@@ -633,7 +633,7 @@ class Http extends Router\Generic implements Zformat\Parameterizable
// (?<named>…)
$out = preg_replace_callback(
'#\(\?\<([^>]+)>[^\)]*\)[\?\*\+]{0,2}#',
- function (Array $matches) use (&$id, &$variables, &$allowEmpty, &$unusedVariables) {
+ function (array $matches) use (&$id, &$variables, &$allowEmpty, &$unusedVariables) {
$m = strtolower($matches[1]);
if (!isset($variables[$m]) || '' === $variables[$m]) {
diff --git a/Router.php b/Router.php
index 73858dd..36c8c01 100644
--- a/Router.php
+++ b/Router.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Hoa community. All rights reserved.
+ * Copyright © 2007-2016, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,7 +43,7 @@ use Hoa\Consistency;
*
* Router interface.
*
- * @copyright Copyright © 2007-2015 Hoa community
+ * @copyright Copyright © 2007-2016 Hoa community
* @license New BSD License
*/
interface Router
@@ -124,11 +124,11 @@ interface Router
*/
public function addRule(
$id,
- Array $methods,
+ array $methods,
$pattern,
$call = null,
$able = null,
- Array $variables = []
+ array $variables = []
);
/**
@@ -144,11 +144,11 @@ interface Router
*/
public function addPrivateRule(
$id,
- Array $methods,
+ array $methods,
$pattern,
$call = null,
$able = null,
- Array $variables = []
+ array $variables = []
);
/**
@@ -189,7 +189,7 @@ interface Router
* @param array $variables Variables.
* @return string
*/
- public function unroute($id, Array $variables = []);
+ public function unroute($id, array $variables = []);
/**
* Get method or mode where the router is called.