@@ -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 | } |
@@ -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')); |
@@ -74,8 +74,9 @@ |
||
74 | 74 | } |
75 | 75 | $sRet .= '</ul>'; |
76 | 76 | |
77 | - if ($e instanceof \Exception) |
|
78 | - $sRet .= '<p style="font-size:.8em">Triggered in <strong>' . $e->getFile() . '</strong> at line ' . $e->getLine() . '</p>'; |
|
77 | + if ($e instanceof \Exception) { |
|
78 | + $sRet .= '<p style="font-size:.8em">Triggered in <strong>' . $e->getFile() . '</strong> at line ' . $e->getLine() . '</p>'; |
|
79 | + } |
|
79 | 80 | |
80 | 81 | $sRet .= '<pre style="position:fixed;bottom:2em;display:' . (vsc::getEnv()->isDevelopment() ? 'block' : 'none') . ';font-size:.8em" id="trace">'; |
81 | 82 | } |
@@ -18,8 +18,9 @@ |
||
18 | 18 | |
19 | 19 | <?php |
20 | 20 | foreach (get_included_files() as $sFileName) { |
21 | - if (stristr($sFileName, 'map.php') && stristr($sFileName, $this->getMap()->getModuleName())) |
|
22 | - echo "\t" . '- ' . $sFileName . "\n"; |
|
21 | + if (stristr($sFileName, 'map.php') && stristr($sFileName, $this->getMap()->getModuleName())) { |
|
22 | + echo "\t" . '- ' . $sFileName . "\n"; |
|
23 | + } |
|
23 | 24 | }; |
24 | 25 | ?> |
25 | 26 |
@@ -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 |
@@ -17,8 +17,9 @@ |
||
17 | 17 | <ul> |
18 | 18 | <?php |
19 | 19 | foreach (get_included_files() as $sFileName) { |
20 | - if (stristr($sFileName, 'map.php') && stristr($sFileName, $this->getMap()->getModuleName())) |
|
21 | - echo '<li>' . $sFileName . '</li>'; |
|
20 | + if (stristr($sFileName, 'map.php') && stristr($sFileName, $this->getMap()->getModuleName())) { |
|
21 | + echo '<li>' . $sFileName . '</li>'; |
|
22 | + } |
|
22 | 23 | }; |
23 | 24 | ?> |
24 | 25 | </ul> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | /* @var $this \vsc\application\sitemaps\RwSiteMap */ |
14 | 14 | |
15 | 15 | // this will break if the current map is the first loaded |
16 | -$this->getCurrentModuleMap()->setMainTemplatePath(VSC_RES_PATH.'templates'); |
|
16 | +$this->getCurrentModuleMap()->setMainTemplatePath(VSC_RES_PATH . 'templates'); |
|
17 | 17 | $this->getCurrentModuleMap()->setMainTemplate('main.php'); |
18 | 18 | |
19 | 19 | //$oMap = $this->map ('.+', \vsc\application\processors\EmptyProcessor::class); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | // fallback 404 processor for everything |
30 | 30 | $oMap = $this->map('(.*)\Z', \vsc\application\processors\NotFoundProcessor::class); |
31 | -$oMap->setTemplatePath(VSC_RES_PATH.'templates'); |
|
31 | +$oMap->setTemplatePath(VSC_RES_PATH . 'templates'); |
|
32 | 32 | $oMap->setTemplate('404.php'); |
33 | 33 | |
34 | 34 | // front controllers |
@@ -37,8 +37,9 @@ discard block |
||
37 | 37 | * @param int $iTimes |
38 | 38 | */ |
39 | 39 | public static function _echo($sString, $iTimes = 1) { |
40 | - for ($i = 0; $i < $iTimes; $i++) |
|
41 | - echo $sString; |
|
40 | + for ($i = 0; $i < $iTimes; $i++) { |
|
41 | + echo $sString; |
|
42 | + } |
|
42 | 43 | } |
43 | 44 | |
44 | 45 | /** |
@@ -98,8 +99,9 @@ discard block |
||
98 | 99 | * @return string |
99 | 100 | */ |
100 | 101 | public static function truncate($sString, $iLength, $sEtc = '...') { |
101 | - if ($iLength == 0) |
|
102 | - return ''; |
|
102 | + if ($iLength == 0) { |
|
103 | + return ''; |
|
104 | + } |
|
103 | 105 | |
104 | 106 | if (strlen($sString) > $iLength) { |
105 | 107 | return substr($sString, 0, $iLength) . $sEtc; |