@@ -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 | } |
@@ -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; |
@@ -117,7 +117,7 @@ |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
120 | - * @return int |
|
120 | + * @return string|null |
|
121 | 121 | */ |
122 | 122 | public function getPort() { |
123 | 123 | if ($this->hasPort() && $this->port != 80) { |
@@ -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; |
@@ -7,8 +7,7 @@ |
||
7 | 7 | |
8 | 8 | use vsc\infrastructure\BaseObject; |
9 | 9 | |
10 | -class Url extends BaseObject |
|
11 | -{ |
|
10 | +class Url extends BaseObject { |
|
12 | 11 | static protected $queryEncodingType = PHP_QUERY_RFC1738; |
13 | 12 | static protected $validSchemes = ['http', 'https', 'file']; |
14 | 13 |
@@ -167,6 +167,7 @@ |
||
167 | 167 | |
168 | 168 | /** |
169 | 169 | * @param array ...$values |
170 | + * @param string $values |
|
170 | 171 | * @return string |
171 | 172 | */ |
172 | 173 | public static function d(...$values) { |
@@ -12,6 +12,7 @@ discard block |
||
12 | 12 | { |
13 | 13 | /** |
14 | 14 | * @param string $sTitle |
15 | + * @return void |
|
15 | 16 | */ |
16 | 17 | public function setTitle($sTitle); |
17 | 18 | |
@@ -21,6 +22,7 @@ discard block |
||
21 | 22 | public function getTitle(); |
22 | 23 | /** |
23 | 24 | * @param array $aResources |
25 | + * @return void |
|
24 | 26 | */ |
25 | 27 | public function setResources($aResources); |
26 | 28 | /** |
@@ -44,6 +46,7 @@ discard block |
||
44 | 46 | /** |
45 | 47 | * @param string $sPath |
46 | 48 | * @param string $sMedia |
49 | + * @return void |
|
47 | 50 | */ |
48 | 51 | public function addStyle($sPath, $sMedia = 'screen'); |
49 | 52 | |
@@ -51,6 +54,7 @@ discard block |
||
51 | 54 | * Adds a path for a JavaScript resource |
52 | 55 | * @param string $sPath |
53 | 56 | * @param bool $bInHead |
57 | + * @return void |
|
54 | 58 | */ |
55 | 59 | public function addScript($sPath, $bInHead = false); |
56 | 60 |
@@ -8,8 +8,7 @@ |
||
8 | 8 | namespace vsc\application\sitemaps; |
9 | 9 | |
10 | 10 | |
11 | -interface ResourceMapInterface |
|
12 | -{ |
|
11 | +interface ResourceMapInterface { |
|
13 | 12 | /** |
14 | 13 | * @param string $sTitle |
15 | 14 | */ |
@@ -96,6 +96,9 @@ |
||
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @return string |
|
101 | + */ |
|
99 | 102 | public function getViewPath() { |
100 | 103 | return $this->sViewPath; |
101 | 104 | } |
@@ -14,6 +14,9 @@ |
||
14 | 14 | return $this->iHttpRedirectCode; |
15 | 15 | } |
16 | 16 | |
17 | + /** |
|
18 | + * @return string |
|
19 | + */ |
|
17 | 20 | public function getLocation() { |
18 | 21 | return $this->sLocation; |
19 | 22 | } |
@@ -10,6 +10,9 @@ |
||
10 | 10 | interface XhtmlViewInterface { |
11 | 11 | function getScripts(); |
12 | 12 | |
13 | + /** |
|
14 | + * @return string |
|
15 | + */ |
|
13 | 16 | function getContent(); |
14 | 17 | |
15 | 18 | function getMetaHeaders(); |
@@ -15,8 +15,9 @@ |
||
15 | 15 | <ul> |
16 | 16 | <?php |
17 | 17 | foreach (get_included_files() as $sFileName) { |
18 | - if (stristr($sFileName, 'map.php') && stristr($sFileName, $this->getMap()->getModuleName())) |
|
19 | - echo '<li>' . $sFileName . '</li>'; |
|
18 | + if (stristr($sFileName, 'map.php') && stristr($sFileName, $this->getMap()->getModuleName())) { |
|
19 | + echo '<li>' . $sFileName . '</li>'; |
|
20 | + } |
|
20 | 21 | }; |
21 | 22 | ?> |
22 | 23 | </ul> |