@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } else { |
153 | 153 | $indexFile = substr($this->getEntranceFile(), strlen($this->getDocumentRoot())); |
154 | 154 | } |
155 | - return $this->indexFile = str_replace('\\', '/' ,$indexFile); |
|
155 | + return $this->indexFile = str_replace('\\', '/', $indexFile); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -165,26 +165,26 @@ discard block |
||
165 | 165 | { |
166 | 166 | $Url = $this->Uri; |
167 | 167 | |
168 | - $queryString=''; |
|
168 | + $queryString = ''; |
|
169 | 169 | // for /?/xx |
170 | 170 | if (\strpos($Url, '/?/') === 0) { |
171 | 171 | $Url = substr($Url, 2); |
172 | 172 | } |
173 | 173 | $indexFile = $this->getIndexFile(); |
174 | - if (\strpos($Url, $indexFile) ===0) { |
|
174 | + if (\strpos($Url, $indexFile) === 0) { |
|
175 | 175 | // for /index.php/ |
176 | - $Url = \substr($Url, strlen($indexFile));// for /index.php?/ |
|
176 | + $Url = \substr($Url, strlen($indexFile)); // for /index.php?/ |
|
177 | 177 | if (\strpos($Url, '?/') === 0) { |
178 | 178 | $Url = ltrim($Url, '?'); |
179 | 179 | } |
180 | 180 | // for /index.php |
181 | - elseif (\strpos($Url, '/')!== 0) { |
|
181 | + elseif (\strpos($Url, '/') !== 0) { |
|
182 | 182 | $Url = '/'.$Url; |
183 | 183 | } |
184 | 184 | } |
185 | 185 | $queryStart = \strpos($Url, '?'); |
186 | 186 | if ($queryStart !== false) { |
187 | - $queryString = \substr($Url, $queryStart+1); |
|
187 | + $queryString = \substr($Url, $queryStart + 1); |
|
188 | 188 | $Url = \substr($Url, 0, $queryStart); |
189 | 189 | } |
190 | 190 | $this->Url = $Url; |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | parse_str($queryString, $this->queryParameter); |
193 | 193 | } |
194 | 194 | if ($applyServer) { |
195 | - $_SERVER['PATH_INFO'] = $this->Url; |
|
195 | + $_SERVER['PATH_INFO'] = $this->Url; |
|
196 | 196 | $_SERVER['SCRIPT_NAME'] = $this->getIndexFile(); |
197 | 197 | $_SERVER['PHP_SELF'] = $this->getIndexFile(); |
198 | 198 | $_GET = $this->queryParameter; |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | } |
211 | 211 | $serverBasicUri = $this->getServerUri(); |
212 | 212 | $indexFile = $this->getIndexFile(); |
213 | - $isWindows = DIRECTORY_SEPARATOR === '\\'; |
|
214 | - $isRoot= in_array(substr($indexFile, 1), static::getDefaultIndexs()); |
|
213 | + $isWindows = DIRECTORY_SEPARATOR === '\\'; |
|
214 | + $isRoot = in_array(substr($indexFile, 1), static::getDefaultIndexs()); |
|
215 | 215 | if ($this->enabledRewrite && $isRoot) { |
216 | 216 | if ($isWindows && !$this->enabledBeautifyUrl) { |
217 | 217 | return $this->basicUri = $serverBasicUri.'/?/'; |