mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 15:39:53 +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 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
|
* @param array $additionalParams Settings array ("bare", "return") which is melded with the GET and POST params
|
||||||
* @return boolean Success
|
* @return boolean Success
|
||||||
* @throws MissingControllerException, MissingActionException, PrivateActionException if any of those error states
|
* @throws MissingControllerException When the controller is missing.
|
||||||
* are encountered.
|
|
||||||
*/
|
*/
|
||||||
public function dispatch(CakeRequest $request, CakeResponse $response, $additionalParams = array()) {
|
public function dispatch(CakeRequest $request, CakeResponse $response, $additionalParams = array()) {
|
||||||
if ($this->asset($request->url, $response) || $this->cached($request->here())) {
|
if ($this->asset($request->url, $response) || $this->cached($request->here())) {
|
||||||
|
@ -316,7 +315,7 @@ class Dispatcher {
|
||||||
$response->send();
|
$response->send();
|
||||||
ob_clean();
|
ob_clean();
|
||||||
if ($ext === 'css' || $ext === 'js') {
|
if ($ext === 'css' || $ext === 'js') {
|
||||||
include($assetFile);
|
include $assetFile;
|
||||||
} else {
|
} else {
|
||||||
readfile($assetFile);
|
readfile($assetFile);
|
||||||
}
|
}
|
||||||
|
@ -325,4 +324,5 @@ class Dispatcher {
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ class CakeRoute {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach ($this->defaults as $key => $val) {
|
foreach ($this->defaults as $key => $val) {
|
||||||
$key = (string) $key;
|
$key = (string)$key;
|
||||||
if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) {
|
if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) {
|
||||||
if (isset($this->_headerMap[$header[1]])) {
|
if (isset($this->_headerMap[$header[1]])) {
|
||||||
$header = $this->_headerMap[$header[1]];
|
$header = $this->_headerMap[$header[1]];
|
||||||
|
|
|
@ -54,4 +54,5 @@ class PluginShortRoute extends CakeRoute {
|
||||||
unset($this->defaults['controller']);
|
unset($this->defaults['controller']);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -113,4 +113,5 @@ class RedirectRoute extends CakeRoute {
|
||||||
exit($code);
|
exit($code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue