@@ -4,7 +4,7 @@ |
||
4 | 4 | $e = $model->getException(); |
5 | 5 | |
6 | 6 | $error = array( |
7 | - 'message' => $e->getCode().' '.$e->getMessage(), |
|
7 | + 'message' => $e->getCode() . ' ' . $e->getMessage(), |
|
8 | 8 | ); |
9 | 9 | |
10 | 10 | echo $this->outputModel($model); |
@@ -1,2 +1,2 @@ |
||
1 | 1 | <?php |
2 | -require_once (realpath(dirname(__FILE__).'/../xhtml/model.php')); |
|
3 | 2 | \ No newline at end of file |
3 | +require_once (realpath(dirname(__FILE__) . '/../xhtml/model.php')); |
|
4 | 4 | \ No newline at end of file |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @param string $sPath |
26 | 26 | * @return bool |
27 | 27 | */ |
28 | - public static function isValidMap ($sPath) { |
|
28 | + public static function isValidMap($sPath) { |
|
29 | 29 | return (basename($sPath) == 'map.php' && is_file($sPath)); |
30 | 30 | } |
31 | 31 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * @param HttpResponseA $oResponse |
29 | 29 | * @return HttpResponseA |
30 | 30 | */ |
31 | - public function addCacheHeaders (HttpRequestA $oRequest, ModelA $oModel, HttpResponseA $oResponse) { |
|
31 | + public function addCacheHeaders(HttpRequestA $oRequest, ModelA $oModel, HttpResponseA $oResponse) { |
|
32 | 32 | $iExpireTime = 600; // ten minute |
33 | 33 | $oNow = new \DateTime('now', new \DateTimeZone('GMT')); |
34 | 34 | $oResponse->setDate($oNow->format('r')); |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * @var array |
34 | 34 | */ |
35 | - protected $aAcceptEncoding = []; |
|
35 | + protected $aAcceptEncoding = []; |
|
36 | 36 | /** |
37 | 37 | * @var array |
38 | 38 | */ |
39 | - protected $aAcceptLanguage = []; |
|
39 | + protected $aAcceptLanguage = []; |
|
40 | 40 | /** |
41 | 41 | * @var string |
42 | 42 | */ |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * @var string |
54 | 54 | */ |
55 | - protected $sIfNoneMatch = ''; |
|
55 | + protected $sIfNoneMatch = ''; |
|
56 | 56 | /** |
57 | 57 | * @var string |
58 | 58 | */ |
59 | - protected $sContentType = ''; |
|
59 | + protected $sContentType = ''; |
|
60 | 60 | /** |
61 | 61 | * @var bool |
62 | 62 | */ |
@@ -12,6 +12,6 @@ |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | public function getChallenge() { |
15 | - return 'Digest realm="'.$this->sRealm.'",qop="auth",nonce="'.$this->sNonce.'",opaque="'.md5($this->sRealm).'"'; |
|
15 | + return 'Digest realm="' . $this->sRealm . '",qop="auth",nonce="' . $this->sNonce . '",opaque="' . md5($this->sRealm) . '"'; |
|
16 | 16 | } |
17 | 17 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | /** |
97 | 97 | * @return bool |
98 | 98 | */ |
99 | - public function outputStatusHeader () { |
|
99 | + public function outputStatusHeader() { |
|
100 | 100 | if (vsc::isCli()) { return false; } |
101 | 101 | if ($this->getStatus()) { |
102 | 102 | header(HttpResponseA::getHttpStatusString($this->getServerProtocol(), $this->getStatus())); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | /** |
186 | 186 | * @return bool |
187 | 187 | */ |
188 | - protected function outputCustomHeaders () { |
|
188 | + protected function outputCustomHeaders() { |
|
189 | 189 | if (vsc::isCli()) { return false; } |
190 | 190 | $aHeaders = $this->getCustomHeaders(); |
191 | 191 | if (is_array($aHeaders)) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | // this will break if the current map is the first loaded |
20 | -$this->getCurrentModuleMap()->setMainTemplatePath(VSC_SRC_PATH.'templates'); |
|
20 | +$this->getCurrentModuleMap()->setMainTemplatePath(VSC_SRC_PATH . 'templates'); |
|
21 | 21 | $this->getCurrentModuleMap()->setMainTemplate('main.php'); |
22 | 22 | |
23 | 23 | //$oMap = $this->map ('.+', \vsc\application\processors\EmptyProcessor::class); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | // fallback 404 processor for everything |
34 | 34 | $oMap = $this->map('(.*)\Z', \vsc\application\processors\NotFoundProcessor::class); |
35 | -$oMap->setTemplatePath(VSC_SRC_PATH.'templates'); |
|
35 | +$oMap->setTemplatePath(VSC_SRC_PATH . 'templates'); |
|
36 | 36 | $oMap->setTemplate('404.php'); |
37 | 37 | |
38 | 38 | // front controllers |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | if ($schPos === false) { |
59 | 59 | $this->host = $host; |
60 | 60 | } else { |
61 | - $this->host = substr($host, $schPos+2); |
|
61 | + $this->host = substr($host, $schPos + 2); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | if ($this->hasPath()) { |
135 | 135 | $path = UrlParserA::normalizePath($this->path); |
136 | 136 | } |
137 | - if (($this->hasHost() || !empty($path))&& !UrlParserA::hasGoodTermination($path)) { |
|
137 | + if (($this->hasHost() || !empty($path)) && !UrlParserA::hasGoodTermination($path)) { |
|
138 | 138 | $path .= '/'; |
139 | 139 | } |
140 | 140 | return $path; |