aboutsummaryrefslogtreecommitdiffstats
path: root/includes/PathRouter.php
diff options
context:
space:
mode:
authorumherirrender <umherirrender_de.wp@web.de>2013-04-21 00:49:30 +0200
committerGerrit Code Review <gerrit@wikimedia.org>2013-04-21 06:38:49 +0000
commitef2f507d23eb227194d5690518a2c3255dfcdca3 (patch)
treed83d762dc85f804ebc5e80662f9b37e6f92436b6 /includes/PathRouter.php
parentee31d378211184b783ca68f38cd6307e3fc4eb34 (diff)
downloadmediawikicore-ef2f507d23eb227194d5690518a2c3255dfcdca3.tar.gz
mediawikicore-ef2f507d23eb227194d5690518a2c3255dfcdca3.zip
Fixed spacing in files direct in includes folder
Added spaces before if, foreach Added some braces for one line statements Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
Diffstat (limited to 'includes/PathRouter.php')
-rw-r--r--includes/PathRouter.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/PathRouter.php b/includes/PathRouter.php
index fc891bb37550..435e09ef63d5 100644
--- a/includes/PathRouter.php
+++ b/includes/PathRouter.php
@@ -141,10 +141,10 @@ class PathRouter {
}
$pattern = (object)array(
- 'path' => $path,
- 'params' => $params,
+ 'path' => $path,
+ 'params' => $params,
'options' => $options,
- 'key' => $key,
+ 'key' => $key,
);
$pattern->weight = self::makeWeight( $pattern );
$this->patterns[] = $pattern;
@@ -185,7 +185,7 @@ class PathRouter {
*/
protected function sortByWeight() {
$weights = array();
- foreach( $this->patterns as $key => $pattern ) {
+ foreach ( $this->patterns as $key => $pattern ) {
$weights[$key] = $pattern->weight;
}
array_multisort( $weights, SORT_DESC, SORT_NUMERIC, $this->patterns );
@@ -203,7 +203,7 @@ class PathRouter {
$path = explode( '/', $pattern->path );
# For each level of the path
- foreach( $path as $piece ) {
+ foreach ( $path as $piece ) {
if ( preg_match( '/^\$(\d+|key)$/u', $piece ) ) {
# For a piece that is only a $1 variable add 1 points of weight
$weight += 1;