mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fix coding standar errors in Routing/
This commit is contained in:
parent
dc2f6efe13
commit
4640b8ea23
4 changed files with 9 additions and 7 deletions
|
@ -64,8 +64,7 @@ class Dispatcher {
|
|||
* @param CakeResponse $response Response object to put the results of the dispatch into.
|
||||
* @param array $additionalParams Settings array ("bare", "return") which is melded with the GET and POST params
|
||||
* @return boolean Success
|
||||
* @throws MissingControllerException, MissingActionException, PrivateActionException if any of those error states
|
||||
* are encountered.
|
||||
* @throws MissingControllerException When the controller is missing.
|
||||
*/
|
||||
public function dispatch(CakeRequest $request, CakeResponse $response, $additionalParams = array()) {
|
||||
if ($this->asset($request->url, $response) || $this->cached($request->here())) {
|
||||
|
@ -316,7 +315,7 @@ class Dispatcher {
|
|||
$response->send();
|
||||
ob_clean();
|
||||
if ($ext === 'css' || $ext === 'js') {
|
||||
include($assetFile);
|
||||
include $assetFile;
|
||||
} else {
|
||||
readfile($assetFile);
|
||||
}
|
||||
|
@ -325,4 +324,5 @@ class Dispatcher {
|
|||
ob_end_flush();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ class CakeRoute {
|
|||
return false;
|
||||
}
|
||||
foreach ($this->defaults as $key => $val) {
|
||||
$key = (string) $key;
|
||||
$key = (string)$key;
|
||||
if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) {
|
||||
if (isset($this->_headerMap[$header[1]])) {
|
||||
$header = $this->_headerMap[$header[1]];
|
||||
|
@ -225,13 +225,13 @@ class CakeRoute {
|
|||
}
|
||||
$route[$key] = $value;
|
||||
}
|
||||
|
||||
|
||||
foreach ($this->keys as $key) {
|
||||
if (isset($route[$key])) {
|
||||
$route[$key] = rawurldecode($route[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($route['_args_'])) {
|
||||
list($pass, $named) = $this->_parseArgs($route['_args_'], $route);
|
||||
$route['pass'] = array_merge($route['pass'], $pass);
|
||||
|
|
|
@ -54,4 +54,5 @@ class PluginShortRoute extends CakeRoute {
|
|||
unset($this->defaults['controller']);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -113,4 +113,5 @@ class RedirectRoute extends CakeRoute {
|
|||
exit($code);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue