@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function getPage() |
50 | 50 | { |
51 | - return $this->_control?$this->_control->getPage():null; |
|
51 | + return $this->_control ? $this->_control->getPage() : null; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -69,7 +69,7 @@ |
||
69 | 69 | */ |
70 | 70 | public function current() |
71 | 71 | { |
72 | - return isset($_SESSION[$this->_key])?$_SESSION[$this->_key]:null; |
|
72 | + return isset($_SESSION[$this->_key]) ? $_SESSION[$this->_key] : null; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -26,6 +26,6 @@ |
||
26 | 26 | { |
27 | 27 | public function toJavaScriptLiteral() |
28 | 28 | { |
29 | - return TJavaScript::jsonEncode((string)$this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); |
|
29 | + return TJavaScript::jsonEncode((string) $this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -41,6 +41,6 @@ |
||
41 | 41 | public function insertAt($index, $item) |
42 | 42 | { |
43 | 43 | if(!is_string($item)) // string is possible if property tag is used. we simply ignore it in this case |
44 | - parent::insertAt($index, $item); // this will generate an exception in parent implementation |
|
44 | + parent::insertAt($index, $item); // this will generate an exception in parent implementation |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -86,12 +86,12 @@ |
||
86 | 86 | else |
87 | 87 | { |
88 | 88 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
89 | - if ($this->getHasControls()) |
|
89 | + if($this->getHasControls()) |
|
90 | 90 | { |
91 | 91 | // If we update a TActivePanel on callback, |
92 | 92 | // We shouldn't update all childs, because the whole content will be replaced by |
93 | 93 | // the parent |
94 | - foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) |
|
94 | + foreach($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) |
|
95 | 95 | { |
96 | 96 | $control->getActiveControl()->setEnableUpdate(false); |
97 | 97 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function __destruct() |
115 | 115 | { |
116 | - if ($this->_cache instanceof \Redis) |
|
116 | + if($this->_cache instanceof \Redis) |
|
117 | 117 | $this->_cache->close(); |
118 | 118 | } |
119 | 119 | |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function init($config) |
128 | 128 | { |
129 | - if (!extension_loaded('redis') || !class_exists('\Redis', false)) |
|
129 | + if(!extension_loaded('redis') || !class_exists('\Redis', false)) |
|
130 | 130 | throw new TConfigurationException('rediscache_extension_required'); |
131 | 131 | $this->_cache = new \Redis(); |
132 | - if ($this->_socket !== null) |
|
132 | + if($this->_socket !== null) |
|
133 | 133 | $this->_cache->connect($this->_socket); |
134 | 134 | else |
135 | 135 | $this->_cache->connect($this->_host, $this->_port); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function setHost($value) |
159 | 159 | { |
160 | - if ($this->_initialized) |
|
160 | + if($this->_initialized) |
|
161 | 161 | throw new TInvalidOperationException('rediscache_host_unchangeable'); |
162 | 162 | else |
163 | 163 | $this->_host = $value; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public function setPort($value) |
179 | 179 | { |
180 | - if ($this->_initialized) |
|
180 | + if($this->_initialized) |
|
181 | 181 | throw new TInvalidOperationException('rediscache_port_unchangeable'); |
182 | 182 | else |
183 | 183 | $this->_port = TPropertyValue::ensureInteger($value); |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | public function setIndex($value) |
219 | 219 | { |
220 | - if ($this->_initialized) |
|
220 | + if($this->_initialized) |
|
221 | 221 | throw new TInvalidOperationException('rediscache_index_unchangeable'); |
222 | 222 | else |
223 | 223 | $this->_index = TPropertyValue::ensureInteger($value); |
@@ -56,8 +56,8 @@ |
||
56 | 56 | if(!function_exists('xcache_isset')) |
57 | 57 | throw new TConfigurationException('xcache_extension_required'); |
58 | 58 | |
59 | - $enabled = (int)ini_get('xcache.cacher') !== 0; |
|
60 | - $var_size = (int)ini_get('xcache.var_size'); |
|
59 | + $enabled = (int) ini_get('xcache.cacher') !== 0; |
|
60 | + $var_size = (int) ini_get('xcache.var_size'); |
|
61 | 61 | |
62 | 62 | if(!($enabled && $var_size > 0)) |
63 | 63 | throw new TConfigurationException('xcache_extension_not_enabled'); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | E_USER_NOTICE => "User Notice", |
47 | 47 | E_STRICT => "Runtime Notice" |
48 | 48 | ]; |
49 | - $errorType = isset($errorTypes[$errno])?$errorTypes[$errno]:'Unknown Error'; |
|
49 | + $errorType = isset($errorTypes[$errno]) ? $errorTypes[$errno] : 'Unknown Error'; |
|
50 | 50 | parent::__construct("[$errorType] $errstr (@line $errline in file $errfile)."); |
51 | 51 | } |
52 | 52 |
@@ -174,7 +174,7 @@ |
||
174 | 174 | */ |
175 | 175 | protected function getState($key, $defaultValue = null) |
176 | 176 | { |
177 | - return isset($this->_state[$key])?$this->_state[$key]:$defaultValue; |
|
177 | + return isset($this->_state[$key]) ? $this->_state[$key] : $defaultValue; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |