@@ -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 |
@@ -32,8 +32,7 @@ |
||
32 | 32 | * @param vscObject $mappedObject |
33 | 33 | * @return bool |
34 | 34 | */ |
35 | - public function maps(vscObject $mappedObject) |
|
36 | - { |
|
35 | + public function maps(vscObject $mappedObject) { |
|
37 | 36 | return (get_class($mappedObject) == $this->getPath()); |
38 | 37 | } |
39 | 38 | } |
@@ -9,8 +9,7 @@ |
||
9 | 9 | |
10 | 10 | use vsc\infrastructure\urls\UrlParserA; |
11 | 11 | |
12 | -trait ResourceMapTrait |
|
13 | -{ |
|
12 | +trait ResourceMapTrait { |
|
14 | 13 | /** |
15 | 14 | * @var string |
16 | 15 | */ |
@@ -3,8 +3,7 @@ |
||
3 | 3 | |
4 | 4 | use vsc\application\controllers\Html5Controller; |
5 | 5 | |
6 | -class RootMap extends ModuleMap |
|
7 | -{ |
|
6 | +class RootMap extends ModuleMap { |
|
8 | 7 | public function __construct($sPath, $sRegex = '') { |
9 | 8 | parent::__construct($sPath, $sRegex); |
10 | 9 | } |
@@ -8,8 +8,7 @@ |
||
8 | 8 | namespace vsc\application\sitemaps; |
9 | 9 | |
10 | 10 | |
11 | -trait ModuleMapTrait |
|
12 | -{ |
|
11 | +trait ModuleMapTrait { |
|
13 | 12 | /** |
14 | 13 | * @var MappingA |
15 | 14 | */ |
@@ -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)) { |
@@ -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 |
@@ -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 | } |
@@ -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 | } |