Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix coding standar errors in Routing/

  • Loading branch information...
commit 4640b8ea23d6a6fd946e65c699234a7f9b47d1e0 1 parent dc2f6ef
@markstory markstory authored
View
6 lib/Cake/Routing/Dispatcher.php
@@ -64,8 +64,7 @@ public function __construct($base = false) {
* @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 @@ protected function _deliverAsset(CakeResponse $response, $assetFile, $ext) {
$response->send();
ob_clean();
if ($ext === 'css' || $ext === 'js') {
- include($assetFile);
+ include $assetFile;
} else {
readfile($assetFile);
}
@@ -325,4 +324,5 @@ protected function _deliverAsset(CakeResponse $response, $assetFile, $ext) {
ob_end_flush();
}
}
+
}
View
6 lib/Cake/Routing/Route/CakeRoute.php
@@ -185,7 +185,7 @@ public function parse($url) {
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 @@ public function parse($url) {
}
$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);
View
3  lib/Cake/Routing/Route/PluginShortRoute.php
@@ -54,4 +54,5 @@ public function match($url) {
unset($this->defaults['controller']);
return $result;
}
-}
+
+}
View
1  lib/Cake/Routing/Route/RedirectRoute.php
@@ -113,4 +113,5 @@ protected function _stop($code = 0) {
exit($code);
}
}
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.