Completed
Push — remove_deprecates ( 1de955...c03db3 )
by Fabio
16:32 queued 07:25
created
framework/Web/UI/ActiveControls/TActiveCheckBox.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function setText($value)
90 90
 	{
91
-		if(parent::getText() === $value)
91
+		if(parent::getText()===$value)
92 92
 			return;
93 93
 
94 94
 		parent::setText($value);
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function setChecked($value)
107 107
 	{
108
-		$value = TPropertyValue::ensureBoolean($value);
109
-		if(parent::getChecked() === $value)
108
+		$value=TPropertyValue::ensureBoolean($value);
109
+		if(parent::getChecked()===$value)
110 110
 			return;
111 111
 
112 112
 		parent::setChecked($value);
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
 	 * @param string checkbox id
133 133
 	 * @param string onclick js
134 134
 	 */
135
-	protected function renderInputTag($writer,$clientID,$onclick)
135
+	protected function renderInputTag($writer, $clientID, $onclick)
136 136
 	{
137
-		parent::renderInputTag($writer,$clientID,$onclick);
138
-		if ($this->getAutoPostBack())
137
+		parent::renderInputTag($writer, $clientID, $onclick);
138
+		if($this->getAutoPostBack())
139 139
 			$this->getActiveControl()->registerCallbackClientScript(
140 140
 				$this->getClientClassName(), $this->getPostBackOptions());
141 141
 	}
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function getLabelAttributes()
156 156
 	{
157
-		$attributes = parent::getLabelAttributes();
158
-		$attributes['id'] = $this->getDefaultLabelID();
157
+		$attributes=parent::getLabelAttributes();
158
+		$attributes['id']=$this->getDefaultLabelID();
159 159
 		return $attributes;
160 160
 	}
161 161
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @param string checkbox id
166 166
 	 * @param string label text
167 167
 	 */
168
-	protected function renderLabel($writer,$clientID,$text)
168
+	protected function renderLabel($writer, $clientID, $text)
169 169
 	{
170 170
 		$writer->addAttribute('id', $this->getDefaultLabelID());
171 171
 		parent::renderLabel($writer, $clientID, $text);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	protected function getDefaultLabelID()
178 178
 	{
179
-		if($attributes=$this->getViewState('LabelAttributes',null))
179
+		if($attributes=$this->getViewState('LabelAttributes', null))
180 180
 			return TCheckBox::getLabelAttributes()->itemAt('id');
181 181
 		else
182 182
 			return $this->getClientID().'_label';
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveListBox.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	protected function createListItemCollection()
64 64
 	{
65
-		$collection  = new TActiveListItemCollection;
65
+		$collection=new TActiveListItemCollection;
66 66
 		$collection->setControl($this);
67 67
 		return $collection;
68 68
 	}
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function setSelectionMode($value)
87 87
 	{
88
-		if(parent::getSelectionMode() === $value)
88
+		if(parent::getSelectionMode()===$value)
89 89
 			return;
90 90
 
91 91
 		parent::setSelectionMode($value);
92
-		$multiple = $this->getIsMultiSelect();
93
-		$id = $this->getUniqueID(); $multi_id = $id.'[]';
92
+		$multiple=$this->getIsMultiSelect();
93
+		$id=$this->getUniqueID(); $multi_id=$id.'[]';
94 94
 		if($this->getActiveControl()->canUpdateClientSide())
95 95
 		{
96
-			$client = $this->getPage()->getCallbackClient();
96
+			$client=$this->getPage()->getCallbackClient();
97 97
 			$client->setAttribute($this, 'multiple', $multiple ? 'multiple' : false);
98 98
 			$client->setAttribute($this, 'name', $multiple ? $multi_id : $id);
99 99
 		}
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 	protected function addAttributesToRender($writer)
147 147
 	{
148 148
 		parent::addAttributesToRender($writer);
149
-		$writer->addAttribute('id',$this->getClientID());
150
-		if ($this->getAutoPostBack())
149
+		$writer->addAttribute('id', $this->getClientID());
150
+		if($this->getAutoPostBack())
151 151
 			$this->getActiveControl()->registerCallbackClientScript(
152 152
 				$this->getClientClassName(), $this->getPostBackOptions());
153 153
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveImageButton.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	public function setAlternateText($value)
60 60
 	{
61
-		if(parent::getAlternateText() === $value)
61
+		if(parent::getAlternateText()===$value)
62 62
 			return;
63 63
 
64 64
 		parent::setAlternateText($value);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function setImageAlign($value)
77 77
 	{
78
-		if(parent::getImageAlign() === $value)
78
+		if(parent::getImageAlign()===$value)
79 79
 			return;
80 80
 
81 81
 		parent::setImageAlign($value);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function setImageUrl($value)
90 90
 	{
91
-		if(parent::getImageUrl() === $value)
91
+		if(parent::getImageUrl()===$value)
92 92
 			return;
93 93
 
94 94
 		parent::setImageUrl($value);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function setDescriptionUrl($value)
103 103
 	{
104
-		if(parent::getDescriptionUrl() === $value)
104
+		if(parent::getDescriptionUrl()===$value)
105 105
 			return;
106 106
 
107 107
 		parent::setDescriptionUrl($value);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	protected function addAttributesToRender($writer)
152 152
 	{
153 153
 		parent::addAttributesToRender($writer);
154
-		$writer->addAttribute('id',$this->getClientID());
154
+		$writer->addAttribute('id', $this->getClientID());
155 155
 		$this->getActiveControl()->registerCallbackClientScript(
156 156
 			$this->getClientClassName(), $this->getPostBackOptions());
157 157
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TInPlaceTextBox.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function setDisplayTextBox($value)
76 76
 	{
77
-		$value = TPropertyValue::ensureBoolean($value);
78
-		$this->setViewState('DisplayTextBox', $value,false);
77
+		$value=TPropertyValue::ensureBoolean($value);
78
+		$this->setViewState('DisplayTextBox', $value, false);
79 79
 		if($this->getActiveControl()->canUpdateClientSide())
80
-			$this->callClientFunction('setDisplayTextBox',$value);
80
+			$this->callClientFunction('setDisplayTextBox', $value);
81 81
 	}
82 82
 
83 83
 	/**
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
 	 * @param string static method name
94 94
 	 * @param mixed method parmaeter
95 95
 	 */
96
-	protected function callClientFunction($func,$value)
96
+	protected function callClientFunction($func, $value)
97 97
 	{
98
-		$client = $this->getPage()->getCallbackClient();
99
-		$code = $this->getClientClassName().'.'.$func;
100
-		$client->callClientFunction($code,array($this,$value));
98
+		$client=$this->getPage()->getCallbackClient();
99
+		$code=$this->getClientClassName().'.'.$func;
100
+		$client->callClientFunction($code, array($this, $value));
101 101
 	}
102 102
 
103 103
 	/**
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	protected function getExternalControlID()
123 123
 	{
124
-		$extID = $this->getEditTriggerControlID();
124
+		$extID=$this->getEditTriggerControlID();
125 125
 		if($extID===null) return '';
126
-		if(($control = $this->findControl($extID))!==null)
126
+		if(($control=$this->findControl($extID))!==null)
127 127
 			return $control->getClientID();
128 128
 		return $extID;
129 129
 	}
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function setText($value)
137 137
 	{
138
-		if(TTextBox::getText() === $value)
138
+		if(TTextBox::getText()===$value)
139 139
 			return;
140 140
 
141 141
 		TTextBox::setText($value);
142 142
 		if($this->getActiveControl()->canUpdateClientSide())
143 143
 		{
144
-			$client = $this->getPage()->getCallbackClient();
144
+			$client=$this->getPage()->getCallbackClient();
145 145
 			$client->update($this->getLabelClientID(), $value);
146 146
 			$client->setValue($this, $value);
147 147
 		}
@@ -152,14 +152,14 @@  discard block
 block discarded – undo
152 152
 	 * @param boolean value
153 153
 	 * @since 3.1.2
154 154
 	 */
155
-	public function setReadOnly ($value)
155
+	public function setReadOnly($value)
156 156
 	{
157 157
 		$value=TPropertyValue::ensureBoolean($value);
158
-		if(TTextBox::getReadOnly() === $value)
158
+		if(TTextBox::getReadOnly()===$value)
159 159
 			return;
160 160
 
161 161
 		TTextBox::setReadOnly($value);
162
-		if ($this->getActiveControl()->canUpdateClientSide())
162
+		if($this->getActiveControl()->canUpdateClientSide())
163 163
 		{
164 164
 			$this->callClientFunction('setReadOnly', $value);
165 165
 		}
@@ -202,10 +202,10 @@  discard block
 block discarded – undo
202 202
 	 */
203 203
 	public function onCallback($param)
204 204
 	{
205
-		$action = $param->getCallbackParameter();
206
-		if(is_array($action) && $action[0] === '__InlineEditor_loadExternalText__')
205
+		$action=$param->getCallbackParameter();
206
+		if(is_array($action) && $action[0]==='__InlineEditor_loadExternalText__')
207 207
 		{
208
-			$parameter = new TCallbackEventParameter($this->getResponse(), $action[1]);
208
+			$parameter=new TCallbackEventParameter($this->getResponse(), $action[1]);
209 209
 			$this->onLoadingText($parameter);
210 210
 		}
211 211
 		$this->raiseEvent('OnCallback', $this, $param);
@@ -216,26 +216,26 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	protected function getPostBackOptions()
218 218
 	{
219
-		$options = parent::getPostBackOptions();
220
-		$options['ID'] = $this->getLabelClientID();
221
-		$options['TextBoxID'] = $this->getClientID();
222
-		$options['ExternalControl'] = $this->getExternalControlID();
223
-		$options['AutoHide'] = $this->getAutoHideTextBox() == false ? '' : true;
224
-		$options['AutoPostBack'] = $this->getAutoPostBack() == false ? '' : true;
225
-		$options['Columns'] = $this->getColumns();
219
+		$options=parent::getPostBackOptions();
220
+		$options['ID']=$this->getLabelClientID();
221
+		$options['TextBoxID']=$this->getClientID();
222
+		$options['ExternalControl']=$this->getExternalControlID();
223
+		$options['AutoHide']=$this->getAutoHideTextBox()==false ? '' : true;
224
+		$options['AutoPostBack']=$this->getAutoPostBack()==false ? '' : true;
225
+		$options['Columns']=$this->getColumns();
226 226
 		if($this->getTextMode()==='MultiLine')
227 227
 		{
228
-			$options['Rows'] = $this->getRows();
229
-			$options['Wrap'] = $this->getWrap()== false ? '' : true;
228
+			$options['Rows']=$this->getRows();
229
+			$options['Wrap']=$this->getWrap()==false ? '' : true;
230 230
 		}
231 231
 		else
232 232
 		{
233
-			$length = $this->getMaxLength();
234
-			$options['MaxLength'] = $length > 0 ? $length : '';
233
+			$length=$this->getMaxLength();
234
+			$options['MaxLength']=$length > 0 ? $length : '';
235 235
 		}
236 236
 
237 237
 		if($this->hasEventHandler('OnLoadingText'))
238
-			$options['LoadTextOnEdit'] = true;
238
+			$options['LoadTextOnEdit']=true;
239 239
 
240 240
 		$options['ReadOnly']=$this->getReadOnly();
241 241
 		return $options;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public function onLoadingText($param)
250 250
 	{
251
-		$this->raiseEvent('OnLoadingText',$this,$param);
251
+		$this->raiseEvent('OnLoadingText', $this, $param);
252 252
 	}
253 253
 
254 254
 	/**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	{
268 268
 		//calls the TWebControl to avoid rendering other attribute normally render for a textbox.
269 269
 		TWebControl::addAttributesToRender($writer);
270
-		$writer->addAttribute('id',$this->getLabelClientID());
270
+		$writer->addAttribute('id', $this->getLabelClientID());
271 271
 		$this->getActiveControl()->registerCallbackClientScript(
272 272
 			$this->getClientClassName(), $this->getPostBackOptions());
273 273
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TReCaptcha2Validator.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 class TReCaptcha2Validator extends TBaseValidator
31 31
 {
32
-    protected $_isvalid = null;
32
+    protected $_isvalid=null;
33 33
 
34 34
     protected function getClientClassName()
35 35
     {
@@ -41,17 +41,17 @@  discard block
 block discarded – undo
41 41
     }
42 42
     protected function getCaptchaControl()
43 43
     {
44
-        $control = $this->getValidationTarget();
45
-        if (!$control)
44
+        $control=$this->getValidationTarget();
45
+        if(!$control)
46 46
             throw new Exception('No target control specified for TReCaptcha2Validator');
47
-        if (!($control instanceof TReCaptcha2))
47
+        if(!($control instanceof TReCaptcha2))
48 48
             throw new Exception('TReCaptcha2Validator only works with TReCaptcha2 controls');
49 49
         return $control;
50 50
     }
51 51
     public function getClientScriptOptions()
52 52
     {
53
-        $options = parent::getClientScriptOptions();
54
-        $options['ResponseFieldName'] = $this->getCaptchaControl()->getResponseFieldName();
53
+        $options=parent::getClientScriptOptions();
54
+        $options['ResponseFieldName']=$this->getCaptchaControl()->getResponseFieldName();
55 55
         return $options;
56 56
     }
57 57
     /**
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
     protected function evaluateIsValid()
65 65
     {
66 66
         // check validity only once (if trying to evaulate multiple times, all redundant checks would fail)
67
-        if (is_null($this->_isvalid))
67
+        if(is_null($this->_isvalid))
68 68
         {
69
-            $control = $this->getCaptchaControl();
70
-            $this->_isvalid = $control->validate();
69
+            $control=$this->getCaptchaControl();
70
+            $this->_isvalid=$control->validate();
71 71
         }
72 72
         return ($this->_isvalid==true);
73 73
     }
@@ -75,19 +75,19 @@  discard block
 block discarded – undo
75 75
     {
76 76
         parent::onPreRender($param);
77 77
 
78
-        $cs = $this->Page->getClientScript();
78
+        $cs=$this->Page->getClientScript();
79 79
         $cs->registerPradoScript('validator');
80 80
 
81 81
         // communicate validation status to the client side
82
-        $value = $this->_isvalid===false ? '0' : '1';
83
-        $cs->registerHiddenField($this->getClientID().'_1',$value);
82
+        $value=$this->_isvalid===false ? '0' : '1';
83
+        $cs->registerHiddenField($this->getClientID().'_1', $value);
84 84
 
85 85
         // update validator display
86
-        if ($control = $this->getValidationTarget())
86
+        if($control=$this->getValidationTarget())
87 87
         {
88
-            $fn = 'captchaUpdateValidatorStatus_'.$this->getClientID();
88
+            $fn='captchaUpdateValidatorStatus_'.$this->getClientID();
89 89
 
90
-            $cs->registerEndScript($this->getClientID().'::validate', implode(' ',array(
90
+            $cs->registerEndScript($this->getClientID().'::validate', implode(' ', array(
91 91
                 // this function will be used to update the validator
92 92
                 'function '.$fn.'(valid)',
93 93
                 '{',
Please login to merge, or discard this patch.
framework/Data/TDbCommand.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * @param TDbConnection the database connection
46 46
 	 * @param string the SQL statement to be executed
47 47
 	 */
48
-	public function __construct(TDbConnection $connection,$text)
48
+	public function __construct(TDbConnection $connection, $text)
49 49
 	{
50 50
 		$this->_connection=$connection;
51 51
 		$this->setText($text);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public function __sleep()
58 58
 	{
59
-		return array_diff(parent::__sleep(),array("\0TDbCommand\0_statement"));
59
+		return array_diff(parent::__sleep(), array("\0TDbCommand\0_statement"));
60 60
 	}
61 61
 
62 62
 	/**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			}
113 113
 			catch(Exception $e)
114 114
 			{
115
-				throw new TDbException('dbcommand_prepare_failed',$e->getMessage(),$this->getText());
115
+				throw new TDbException('dbcommand_prepare_failed', $e->getMessage(), $this->getText());
116 116
 			}
117 117
 		}
118 118
 	}
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 	{
143 143
 		$this->prepare();
144 144
 		if($dataType===null)
145
-			$this->_statement->bindParam($name,$value);
145
+			$this->_statement->bindParam($name, $value);
146 146
 		else if($length===null)
147
-			$this->_statement->bindParam($name,$value,$dataType);
147
+			$this->_statement->bindParam($name, $value, $dataType);
148 148
 		else
149
-			$this->_statement->bindParam($name,$value,$dataType,$length);
149
+			$this->_statement->bindParam($name, $value, $dataType, $length);
150 150
 	}
151 151
 
152 152
 	/**
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 	{
164 164
 		$this->prepare();
165 165
 		if($dataType===null)
166
-			$this->_statement->bindValue($name,$value);
166
+			$this->_statement->bindValue($name, $value);
167 167
 		else
168
-			$this->_statement->bindValue($name,$value,$dataType);
168
+			$this->_statement->bindValue($name, $value, $dataType);
169 169
 	}
170 170
 
171 171
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 		}
193 193
 		catch(Exception $e)
194 194
 		{
195
-			throw new TDbException('dbcommand_execute_failed',$e->getMessage(),$this->getDebugStatementText());
195
+			throw new TDbException('dbcommand_execute_failed', $e->getMessage(), $this->getDebugStatementText());
196 196
 		}
197 197
 	}
198 198
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		}
227 227
 		catch(Exception $e)
228 228
 		{
229
-			throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
229
+			throw new TDbException('dbcommand_query_failed', $e->getMessage(), $this->getDebugStatementText());
230 230
 		}
231 231
 	}
232 232
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 		}
254 254
 		catch(Exception $e)
255 255
 		{
256
-			throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
256
+			throw new TDbException('dbcommand_query_failed', $e->getMessage(), $this->getDebugStatementText());
257 257
 		}
258 258
 	}
259 259
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 		}
283 283
 		catch(Exception $e)
284 284
 		{
285
-			throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
285
+			throw new TDbException('dbcommand_query_failed', $e->getMessage(), $this->getDebugStatementText());
286 286
 		}
287 287
 	}
288 288
 
Please login to merge, or discard this patch.
framework/I18N/core/TCache_Lite.php 1 patch
Spacing   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     *
55 55
     * @var string $_cacheDir
56 56
     */
57
-    protected $_cacheDir = '/tmp/';
57
+    protected $_cacheDir='/tmp/';
58 58
 
59 59
     /**
60 60
     * Enable / disable caching
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
     *
64 64
     * @var boolean $_caching
65 65
     */
66
-    protected $_caching = true;
66
+    protected $_caching=true;
67 67
 
68 68
     /**
69 69
     * Cache lifetime (in seconds)
70 70
     *
71 71
     * @var int $_lifeTime
72 72
     */
73
-    protected $_lifeTime = 3600;
73
+    protected $_lifeTime=3600;
74 74
 
75 75
     /**
76 76
     * Enable / disable fileLocking
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     *
80 80
     * @var boolean $_fileLocking
81 81
     */
82
-    protected $_fileLocking = true;
82
+    protected $_fileLocking=true;
83 83
 
84 84
     /**
85 85
     * Timestamp of the last valid cache
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     *
106 106
     * @var boolean $_writeControl
107 107
     */
108
-    protected $_writeControl = true;
108
+    protected $_writeControl=true;
109 109
 
110 110
     /**
111 111
     * Enable / disable read control
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     *
116 116
     * @var boolean $_writeControl
117 117
     */
118
-    protected $_readControl = true;
118
+    protected $_readControl=true;
119 119
 
120 120
     /**
121 121
     * Type of read control (only if read control is enabled)
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     *
129 129
     * @var boolean $_readControlType
130 130
     */
131
-    protected $_readControlType = 'crc32';
131
+    protected $_readControlType='crc32';
132 132
 
133 133
     /**
134 134
     * Current cache id
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     *
152 152
     * @var boolean $_memoryCaching
153 153
     */
154
-    protected $_memoryCaching = false;
154
+    protected $_memoryCaching=false;
155 155
 
156 156
     /**
157 157
     * Enable / Disable "Only Memory Caching"
@@ -159,28 +159,28 @@  discard block
 block discarded – undo
159 159
     *
160 160
     * @var boolean $_onlyMemoryCaching
161 161
     */
162
-    protected $_onlyMemoryCaching = false;
162
+    protected $_onlyMemoryCaching=false;
163 163
 
164 164
     /**
165 165
     * Memory caching array
166 166
     *
167 167
     * @var array $_memoryCachingArray
168 168
     */
169
-    protected $_memoryCachingArray = array();
169
+    protected $_memoryCachingArray=array();
170 170
 
171 171
     /**
172 172
     * Memory caching counter
173 173
     *
174 174
     * @var int $memoryCachingCounter
175 175
     */
176
-    protected $_memoryCachingCounter = 0;
176
+    protected $_memoryCachingCounter=0;
177 177
 
178 178
     /**
179 179
     * Memory caching limit
180 180
     *
181 181
     * @var int $memoryCachingLimit
182 182
     */
183
-    protected $_memoryCachingLimit = 1000;
183
+    protected $_memoryCachingLimit=1000;
184 184
 
185 185
     /**
186 186
     * File Name protection
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     *
193 193
     * @var boolean $fileNameProtection
194 194
     */
195
-    protected $_fileNameProtection = true;
195
+    protected $_fileNameProtection=true;
196 196
 
197 197
     /**
198 198
     * Enable / disable automatic serialization
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     *
203 203
     * @var boolean $_serialize
204 204
     */
205
-    protected $_automaticSerialization = false;
205
+    protected $_automaticSerialization=false;
206 206
 
207 207
     // --- Public methods ---
208 208
 
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
     * @param array $options options
229 229
     * @access public
230 230
     */
231
-    function __construct($options = array(null))
231
+    function __construct($options=array(null))
232 232
     {
233
-        $availableOptions = array(	'automaticSerialization',
233
+        $availableOptions=array('automaticSerialization',
234 234
         							'fileNameProtection',
235 235
         							'memoryCaching',
236 236
         							'onlyMemoryCaching',
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
         							'readControlType');
245 245
         foreach($options as $key => $value) {
246 246
             if(in_array($key, $availableOptions)) {
247
-                $property = '_'.$key;
248
-                $this->$property = $value;
247
+                $property='_'.$key;
248
+                $this->$property=$value;
249 249
             }
250 250
         }
251
-        $this->_refreshTime = time() - $this->_lifeTime;
251
+        $this->_refreshTime=time() - $this->_lifeTime;
252 252
 	}
253 253
 
254 254
     /**
@@ -261,41 +261,41 @@  discard block
 block discarded – undo
261 261
     * @return string data of the cache (or false if no cache available)
262 262
     * @access public
263 263
     */
264
-    function get($id, $group = 'default', $doNotTestCacheValidity = false)
264
+    function get($id, $group='default', $doNotTestCacheValidity=false)
265 265
     {
266
-        $this->_id = $id;
267
-        $this->_group = $group;
268
-        $data = false;
269
-        if ($this->_caching) {
266
+        $this->_id=$id;
267
+        $this->_group=$group;
268
+        $data=false;
269
+        if($this->_caching) {
270 270
             $this->_setFileName($id, $group);
271
-            if ($this->_memoryCaching) {
272
-                if (isset($this->_memoryCachingArray[$this->_file])) {
273
-                    if ($this->_automaticSerialization) {
271
+            if($this->_memoryCaching) {
272
+                if(isset($this->_memoryCachingArray[$this->_file])) {
273
+                    if($this->_automaticSerialization) {
274 274
                         return unserialize(
275 275
                         			$this->_memoryCachingArray[$this->_file]);
276 276
                     } else {
277 277
                         return $this->_memoryCachingArray[$this->_file];
278 278
                     }
279 279
                 } else {
280
-                    if ($this->_onlyMemoryCaching) {
280
+                    if($this->_onlyMemoryCaching) {
281 281
                         return false;
282 282
                     }
283 283
                 }
284 284
             }
285
-            if ($doNotTestCacheValidity) {
286
-                if (file_exists($this->_file)) {
287
-                    $data = $this->_read();
285
+            if($doNotTestCacheValidity) {
286
+                if(file_exists($this->_file)) {
287
+                    $data=$this->_read();
288 288
                 }
289 289
             } else {
290
-                if (@filemtime($this->_file) > $this->_refreshTime) {
291
-                    $data = $this->_read();
290
+                if(@filemtime($this->_file) > $this->_refreshTime) {
291
+                    $data=$this->_read();
292 292
                 }
293 293
             }
294
-            if (($data) and ($this->_memoryCaching)) {
294
+            if(($data) and ($this->_memoryCaching)) {
295 295
                 $this->_memoryCacheAdd($this->_file, $data);
296 296
             }
297
-            if ($this->_automaticSerialization && is_string($data)) {
298
-                $data = unserialize($data);
297
+            if($this->_automaticSerialization && is_string($data)) {
298
+                $data=unserialize($data);
299 299
             }
300 300
             return $data;
301 301
         }
@@ -312,24 +312,24 @@  discard block
 block discarded – undo
312 312
     * @return boolean true if no problem
313 313
     * @access public
314 314
     */
315
-    function save($data, $id = null, $group = 'default')
315
+    function save($data, $id=null, $group='default')
316 316
     {
317
-        if ($this->_caching) {
318
-            if ($this->_automaticSerialization) {
319
-                $data = serialize($data);
317
+        if($this->_caching) {
318
+            if($this->_automaticSerialization) {
319
+                $data=serialize($data);
320 320
             }
321
-            if (isset($id)) {
321
+            if(isset($id)) {
322 322
                 $this->_setFileName($id, $group);
323 323
             }
324
-            if ($this->_memoryCaching) {
324
+            if($this->_memoryCaching) {
325 325
                 $this->_memoryCacheAdd($this->_file, $data);
326
-                if ($this->_onlyMemoryCaching) {
326
+                if($this->_onlyMemoryCaching) {
327 327
                     return true;
328 328
                 }
329 329
             }
330
-            if ($this->_writeControl) {
331
-                if (!$this->_writeAndControl($data)) {
332
-                    @touch($this->_file, time() - 2*abs($this->_lifeTime));
330
+            if($this->_writeControl) {
331
+                if(!$this->_writeAndControl($data)) {
332
+                    @touch($this->_file, time() - 2 * abs($this->_lifeTime));
333 333
                     return false;
334 334
                 } else {
335 335
                     return true;
@@ -349,10 +349,10 @@  discard block
 block discarded – undo
349 349
     * @return boolean true if no problem
350 350
     * @access public
351 351
     */
352
-    function remove($id, $group = 'default')
352
+    function remove($id, $group='default')
353 353
     {
354 354
         $this->_setFileName($id, $group);
355
-        if (!@unlink($this->_file)) {
355
+        if(!@unlink($this->_file)) {
356 356
             $this->raiseError('TCache_Lite : Unable to remove cache !', -3);
357 357
             return false;
358 358
         }
@@ -369,35 +369,35 @@  discard block
 block discarded – undo
369 369
     * @return boolean true if no problem
370 370
     * @access public
371 371
     */
372
-    function clean($group = false)
372
+    function clean($group=false)
373 373
     {
374
-        if ($this->_fileNameProtection) {
375
-            $motif = ($group) ? 'cache_'.md5($group).'_' : 'cache_';
374
+        if($this->_fileNameProtection) {
375
+            $motif=($group) ? 'cache_'.md5($group).'_' : 'cache_';
376 376
         } else {
377
-            $motif = ($group) ? 'cache_'.$group.'_' : 'cache_';
377
+            $motif=($group) ? 'cache_'.$group.'_' : 'cache_';
378 378
         }
379
-        if ($this->_memoryCaching) {
380
-            while (list($key, $value) = each($this->_memoryCaching)) {
381
-                if (strpos($key, $motif, 0)) {
379
+        if($this->_memoryCaching) {
380
+            while(list($key, $value)=each($this->_memoryCaching)) {
381
+                if(strpos($key, $motif, 0)) {
382 382
                     unset($this->_memoryCaching[$key]);
383
-                    $this->_memoryCachingCounter =
383
+                    $this->_memoryCachingCounter=
384 384
                     		$this->_memoryCachingCounter - 1;
385 385
                 }
386 386
             }
387
-            if ($this->_onlyMemoryCaching) {
387
+            if($this->_onlyMemoryCaching) {
388 388
                 return true;
389 389
             }
390 390
         }
391
-        if (!($dh = opendir($this->_cacheDir))) {
391
+        if(!($dh=opendir($this->_cacheDir))) {
392 392
             $this->raiseError('TCache_Lite : Unable to open cache directory !');
393 393
             return false;
394 394
         }
395
-        while ($file = readdir($dh)) {
396
-            if (($file != '.') && ($file != '..')) {
397
-                $file = $this->_cacheDir . $file;
398
-                if (is_file($file)) {
399
-                    if (strpos($file, $motif, 0)) {
400
-                        if (!@unlink($file)) {
395
+        while($file=readdir($dh)) {
396
+            if(($file!='.') && ($file!='..')) {
397
+                $file=$this->_cacheDir.$file;
398
+                if(is_file($file)) {
399
+                    if(strpos($file, $motif, 0)) {
400
+                        if(!@unlink($file)) {
401 401
              $this->raiseError('Cache_Lite : Unable to remove cache !', -3);
402 402
                             return false;
403 403
                         }
@@ -416,22 +416,22 @@  discard block
 block discarded – undo
416 416
     */
417 417
     function setLifeTime($newLifeTime)
418 418
     {
419
-        $this->_lifeTime = $newLifeTime;
420
-        $this->_refreshTime = time() - $newLifeTime;
419
+        $this->_lifeTime=$newLifeTime;
420
+        $this->_refreshTime=time() - $newLifeTime;
421 421
     }
422 422
 
423 423
     /**
424 424
     *
425 425
     * @access public
426 426
     */
427
-    function saveMemoryCachingState($id, $group = 'default')
427
+    function saveMemoryCachingState($id, $group='default')
428 428
     {
429
-        if ($this->_caching) {
430
-            $array = array(
429
+        if($this->_caching) {
430
+            $array=array(
431 431
                 'counter' => $this->_memoryCachingCounter,
432 432
                 'array' => $this->_memoryCachingState
433 433
             );
434
-            $data = serialize($array);
434
+            $data=serialize($array);
435 435
             $this->save($data, $id, $group);
436 436
         }
437 437
     }
@@ -440,15 +440,15 @@  discard block
 block discarded – undo
440 440
     *
441 441
     * @access public
442 442
     */
443
-    function getMemoryCachingState($id, $group = 'default',
444
-    								$doNotTestCacheValidity = false)
443
+    function getMemoryCachingState($id, $group='default',
444
+    								$doNotTestCacheValidity=false)
445 445
     {
446
-        if ($this->_caching) {
447
-            if ($data = $this->get($id, $group, $doNotTestCacheValidity))
446
+        if($this->_caching) {
447
+            if($data=$this->get($id, $group, $doNotTestCacheValidity))
448 448
             {
449
-                $array = unserialize($data);
450
-                $this->_memoryCachingCounter = $array['counter'];
451
-                $this->_memoryCachingArray = $array['array'];
449
+                $array=unserialize($data);
450
+                $this->_memoryCachingCounter=$array['counter'];
451
+                $this->_memoryCachingArray=$array['array'];
452 452
             }
453 453
         }
454 454
     }
@@ -488,12 +488,12 @@  discard block
 block discarded – undo
488 488
     */
489 489
     function _memoryCacheAdd($id, $data)
490 490
     {
491
-        $this->_memoryCachingArray[$this->_file] = $data;
492
-        if ($this->_memoryCachingCounter >= $this->_memoryCachingLimit) {
493
-            list($key, $value) = each($this->_memoryCachingArray);
491
+        $this->_memoryCachingArray[$this->_file]=$data;
492
+        if($this->_memoryCachingCounter >= $this->_memoryCachingLimit) {
493
+            list($key, $value)=each($this->_memoryCachingArray);
494 494
             unset($this->_memoryCachingArray[$key]);
495 495
         } else {
496
-            $this->_memoryCachingCounter = $this->_memoryCachingCounter + 1;
496
+            $this->_memoryCachingCounter=$this->_memoryCachingCounter + 1;
497 497
         }
498 498
     }
499 499
 
@@ -506,11 +506,11 @@  discard block
 block discarded – undo
506 506
     */
507 507
     function _setFileName($id, $group)
508 508
     {
509
-        if ($this->_fileNameProtection) {
510
-            $this->_file = ($this->_cacheDir.'cache_'.md5($group).'_'
509
+        if($this->_fileNameProtection) {
510
+            $this->_file=($this->_cacheDir.'cache_'.md5($group).'_'
511 511
             						.md5($id));
512 512
         } else {
513
-            $this->_file = $this->_cacheDir.'cache_'.$group.'_'.$id;
513
+            $this->_file=$this->_cacheDir.'cache_'.$group.'_'.$id;
514 514
         }
515 515
     }
516 516
 
@@ -527,23 +527,23 @@  discard block
 block discarded – undo
527 527
     */
528 528
     function _read()
529 529
     {
530
-        $fp = @fopen($this->_file, "rb");
531
-        if ($this->_fileLocking) @flock($fp, LOCK_SH);
532
-        if ($fp) {
530
+        $fp=@fopen($this->_file, "rb");
531
+        if($this->_fileLocking) @flock($fp, LOCK_SH);
532
+        if($fp) {
533 533
         	// because the filesize can be cached by PHP itself...
534 534
             clearstatcache();
535
-            $length = @filesize($this->_file);
536
-            if ($this->_readControl) {
537
-                $hashControl = @fread($fp, 32);
538
-                $length = $length - 32;
535
+            $length=@filesize($this->_file);
536
+            if($this->_readControl) {
537
+                $hashControl=@fread($fp, 32);
538
+                $length=$length - 32;
539 539
             }
540
-            $data = @fread($fp, $length);
541
-            if ($this->_fileLocking) @flock($fp, LOCK_UN);
540
+            $data=@fread($fp, $length);
541
+            if($this->_fileLocking) @flock($fp, LOCK_UN);
542 542
             @fclose($fp);
543
-            if ($this->_readControl) {
544
-                $hashData = $this->_hash($data, $this->_readControlType);
545
-                if ($hashData != $hashControl) {
546
-                    @touch($this->_file, time() - 2*abs($this->_lifeTime));
543
+            if($this->_readControl) {
544
+                $hashData=$this->_hash($data, $this->_readControlType);
545
+                if($hashData!=$hashControl) {
546
+                    @touch($this->_file, time() - 2 * abs($this->_lifeTime));
547 547
                     return false;
548 548
                 }
549 549
             }
@@ -562,15 +562,15 @@  discard block
 block discarded – undo
562 562
     */
563 563
     function _write($data)
564 564
     {
565
-        $fp = @fopen($this->_file, "wb");
566
-        if ($fp) {
567
-            if ($this->_fileLocking) @flock($fp, LOCK_EX);
568
-            if ($this->_readControl) {
565
+        $fp=@fopen($this->_file, "wb");
566
+        if($fp) {
567
+            if($this->_fileLocking) @flock($fp, LOCK_EX);
568
+            if($this->_readControl) {
569 569
                 @fwrite($fp, $this->_hash($data, $this->_readControlType), 32);
570 570
             }
571
-            $len = strlen($data);
571
+            $len=strlen($data);
572 572
             @fwrite($fp, $data, $len);
573
-            if ($this->_fileLocking) @flock($fp, LOCK_UN);
573
+            if($this->_fileLocking) @flock($fp, LOCK_UN);
574 574
             @fclose($fp);
575 575
             return true;
576 576
         }
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
     function _writeAndControl($data)
590 590
     {
591 591
         $this->_write($data);
592
-        $dataRead = $this->_read($data);
592
+        $dataRead=$this->_read($data);
593 593
         return ($dataRead==$data);
594 594
     }
595 595
 
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
     */
604 604
     function _hash($data, $controlType)
605 605
     {
606
-        switch ($controlType) {
606
+        switch($controlType) {
607 607
         case 'md5':
608 608
             return md5($data);
609 609
         case 'crc32':
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TStyleSheet.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function getMediaType()
84 84
 	{
85
-		return $this->getViewState('MediaType','');
85
+		return $this->getViewState('MediaType', '');
86 86
 	}
87 87
 
88 88
 	/**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function setMediaType($value)
92 92
 	{
93
-		$this->setViewState('MediaType',$value,'');
93
+		$this->setViewState('MediaType', $value, '');
94 94
 	}
95 95
 
96 96
 	/**
@@ -100,17 +100,17 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function onPreRender($param)
102 102
 	{
103
-		$cs = $this->getPage()->getClientScript();
103
+		$cs=$this->getPage()->getClientScript();
104 104
 
105
-		$styles = preg_split('/,|\s+/', $this->getPradoStyles());
105
+		$styles=preg_split('/,|\s+/', $this->getPradoStyles());
106 106
 		foreach($styles as $style)
107 107
 		{
108
-			if(($style = trim($style))!=='')
108
+			if(($style=trim($style))!=='')
109 109
 				$cs->registerPradoStyle($style);
110 110
 		}
111 111
 
112 112
 		if(($url=$this->getStyleSheetUrl())!=='')
113
-			$cs->registerStyleSheetFile($url,$url,$this->getMediaType());
113
+			$cs->registerStyleSheetFile($url, $url, $this->getMediaType());
114 114
 	}
115 115
 
116 116
 	/**
Please login to merge, or discard this patch.
framework/TComponentReflection.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public function __construct($component)
48 48
 	{
49
-		if(is_string($component) && class_exists($component,false))
49
+		if(is_string($component) && class_exists($component, false))
50 50
 			$this->_className=$component;
51 51
 		else if(is_object($component))
52 52
 			$this->_className=get_class($component);
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
 	{
60 60
 		$methodName=$method->getName();
61 61
 		return $method->getNumberOfRequiredParameters()===0
62
-				&& strncasecmp($methodName,'get',3)===0
62
+				&& strncasecmp($methodName, 'get', 3)===0
63 63
 				&& isset($methodName[3]);
64 64
 	}
65 65
 
66 66
 	private function isEventMethod($method)
67 67
 	{
68 68
 		$methodName=$method->getName();
69
-		return strncasecmp($methodName,'on',2)===0
69
+		return strncasecmp($methodName, 'on', 2)===0
70 70
 				&& isset($methodName[2]);
71 71
 	}
72 72
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		$properties=array();
77 77
 		$events=array();
78 78
 		$methods=array();
79
-		$isComponent=is_subclass_of($this->_className,'TComponent') || strcasecmp($this->_className,'TComponent')===0;
79
+		$isComponent=is_subclass_of($this->_className, 'TComponent') || strcasecmp($this->_className, 'TComponent')===0;
80 80
 		foreach($class->getMethods() as $method)
81 81
 		{
82 82
 			if($method->isPublic() || $method->isProtected())
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 				if(!$method->isStatic() && $isComponent)
86 86
 				{
87 87
 					if($this->isPropertyMethod($method))
88
-						$properties[substr($methodName,3)]=$method;
88
+						$properties[substr($methodName, 3)]=$method;
89 89
 					else if($this->isEventMethod($method))
90 90
 					{
91 91
 						$methodName[0]='O';
92 92
 						$events[$methodName]=$method;
93 93
 					}
94 94
 				}
95
-				if(strncmp($methodName,'__',2)!==0)
95
+				if(strncmp($methodName, '__', 2)!==0)
96 96
 					$methods[$methodName]=$method;
97 97
 			}
98 98
 		}
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	protected function determinePropertyType($method)
143 143
 	{
144 144
 		$comment=$method->getDocComment();
145
-		if(preg_match('/@return\\s+(.*?)\\s+/',$comment,$matches))
145
+		if(preg_match('/@return\\s+(.*?)\\s+/', $comment, $matches))
146 146
 			return $matches[1];
147 147
 		else
148 148
 			return '{unknown}';
Please login to merge, or discard this patch.