@@ -11,8 +11,7 @@ |
||
11 | 11 | /** |
12 | 12 | * @return int |
13 | 13 | */ |
14 | - public function count() |
|
15 | - { |
|
14 | + public function count() { |
|
16 | 15 | $mirror = new \ReflectionClass($this); |
17 | 16 | return count($mirror->getProperties(\ReflectionProperty::IS_PUBLIC)); |
18 | 17 | } |
@@ -40,8 +40,7 @@ discard block |
||
40 | 40 | * @param mixed $mValue |
41 | 41 | * @throws |
42 | 42 | */ |
43 | - public function offsetSet($sOffset, $mValue) |
|
44 | - { |
|
43 | + public function offsetSet($sOffset, $mValue) { |
|
45 | 44 | $this->__set($sOffset, $mValue); |
46 | 45 | } |
47 | 46 | |
@@ -49,16 +48,14 @@ discard block |
||
49 | 48 | * @param string $sOffset |
50 | 49 | * @return bool |
51 | 50 | */ |
52 | - public function offsetExists($sOffset) |
|
53 | - { |
|
51 | + public function offsetExists($sOffset) { |
|
54 | 52 | return in_array($sOffset, $this->getPropertyNames()); |
55 | 53 | } |
56 | 54 | |
57 | 55 | /** |
58 | 56 | * @param string $sOffset |
59 | 57 | */ |
60 | - public function offsetUnset($sOffset) |
|
61 | - { |
|
58 | + public function offsetUnset($sOffset) { |
|
62 | 59 | $oProperty = new \ReflectionProperty($this, $sOffset); |
63 | 60 | if ($oProperty->isPublic()) { |
64 | 61 | unset ($this->$sOffset); |
@@ -69,8 +66,7 @@ discard block |
||
69 | 66 | * @param string $sOffset |
70 | 67 | * @return mixed |
71 | 68 | */ |
72 | - public function offsetGet($sOffset) |
|
73 | - { |
|
69 | + public function offsetGet($sOffset) { |
|
74 | 70 | return $this->__get($sOffset); |
75 | 71 | } |
76 | 72 |
@@ -23,8 +23,9 @@ discard block |
||
23 | 23 | * @param string $sOffset |
24 | 24 | */ |
25 | 25 | protected function setCurrent($sOffset) { |
26 | - if ($this->offsetExists($sOffset)) |
|
27 | - $this->_current = $sOffset; |
|
26 | + if ($this->offsetExists($sOffset)) { |
|
27 | + $this->_current = $sOffset; |
|
28 | + } |
|
28 | 29 | } |
29 | 30 | |
30 | 31 | /** |
@@ -61,7 +62,9 @@ discard block |
||
61 | 62 | $mirror = new \ReflectionClass($this); |
62 | 63 | foreach ($mirror->getProperties() as $mirrorProperty) { |
63 | 64 | $name = $mirrorProperty->getName(); |
64 | - if ($name == '_current') continue; |
|
65 | + if ($name == '_current') { |
|
66 | + continue; |
|
67 | + } |
|
65 | 68 | $ret[] = $name; |
66 | 69 | } |
67 | 70 | |
@@ -72,8 +75,7 @@ discard block |
||
72 | 75 | * Iterator interface |
73 | 76 | * @return mixed |
74 | 77 | */ |
75 | - public function current() |
|
76 | - { |
|
78 | + public function current() { |
|
77 | 79 | if (is_null($this->_current)) { |
78 | 80 | $this->rewind(); |
79 | 81 | } |
@@ -83,8 +85,7 @@ discard block |
||
83 | 85 | /** |
84 | 86 | * @return string |
85 | 87 | */ |
86 | - public function key() |
|
87 | - { |
|
88 | + public function key() { |
|
88 | 89 | if (is_null($this->_current)) { |
89 | 90 | $this->rewind(); |
90 | 91 | } |
@@ -94,8 +95,7 @@ discard block |
||
94 | 95 | /** |
95 | 96 | * @return void |
96 | 97 | */ |
97 | - public function next() |
|
98 | - { |
|
98 | + public function next() { |
|
99 | 99 | $aKeys = $this->getPropertyNames(); |
100 | 100 | |
101 | 101 | $iCurrent = array_search($this->_current, $aKeys); |
@@ -110,8 +110,7 @@ discard block |
||
110 | 110 | /** |
111 | 111 | * @return void |
112 | 112 | */ |
113 | - public function rewind() |
|
114 | - { |
|
113 | + public function rewind() { |
|
115 | 114 | $aKeys = $this->getPropertyNames(); |
116 | 115 | |
117 | 116 | if (is_array($aKeys) && isset($aKeys[0])) { |
@@ -122,8 +121,7 @@ discard block |
||
122 | 121 | /** |
123 | 122 | * @return bool |
124 | 123 | */ |
125 | - public function valid() |
|
126 | - { |
|
124 | + public function valid() { |
|
127 | 125 | $aKeys = $this->getPropertyNames(); |
128 | 126 | |
129 | 127 | if (in_array($this->_current, $aKeys)) { |
@@ -500,8 +500,7 @@ |
||
500 | 500 | * @param \vsc\infrastructure\Object $mappedObject |
501 | 501 | * @return boolean |
502 | 502 | */ |
503 | - public function maps(Object $mappedObject) |
|
504 | - { |
|
503 | + public function maps(Object $mappedObject) { |
|
505 | 504 | return (bool)stristr(get_class($mappedObject), substr(basename($this->getPath()), 0, -4)); |
506 | 505 | } |
507 | 506 |
@@ -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 |
@@ -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> |
@@ -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; |
@@ -7,8 +7,7 @@ |
||
7 | 7 | |
8 | 8 | use vsc\infrastructure\Object; |
9 | 9 | |
10 | -class Url extends Object |
|
11 | -{ |
|
10 | +class Url extends Object { |
|
12 | 11 | static protected $queryEncodingType = PHP_QUERY_RFC1738; |
13 | 12 | static protected $validSchemes = ['http', 'https', 'file']; |
14 | 13 |