Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Web/UI/ActiveControls/TActiveControlAdapter.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -175,6 +175,7 @@
 block discarded – undo
175 175
 
176 176
 	/**
177 177
 	 * @param string state tracker class.
178
+	 * @param string $value
178 179
 	 */
179 180
 	public function setStateTracker($value)
180 181
 	{
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,8 +76,7 @@
 block discarded – undo
76 76
 				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveCallbackControl';
77 77
 			else
78 78
 				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveControl';
79
-		}
80
-		else
79
+		} else
81 80
 			$this->_activeControlType = $type;
82 81
 	}
83 82
 
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @var string view state tracker class.
54 54
 	 */
55
-	private $_stateTrackerClass = 'TCallbackPageStateTracker';
55
+	private $_stateTrackerClass='TCallbackPageStateTracker';
56 56
 
57 57
 	/**
58 58
 	 * Constructor.
59 59
 	 * @param IActiveControl active control to adapt.
60 60
 	 * @param string Base active control class name.
61 61
 	 */
62
-	public function __construct(IActiveControl $control, $baseCallbackClass = null)
62
+	public function __construct(IActiveControl $control, $baseCallbackClass=null)
63 63
 	{
64 64
 		parent::__construct($control);
65 65
 		$this->setBaseControlClass($baseCallbackClass);
@@ -70,15 +70,15 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	protected function setBaseControlClass($type)
72 72
 	{
73
-		if($type === null)
73
+		if($type===null)
74 74
 		{
75 75
 			if($this->getControl() instanceof ICallbackEventHandler)
76
-				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveCallbackControl';
76
+				$this->_activeControlType='Prado\\Web\UI\\ActiveControls\\TBaseActiveCallbackControl';
77 77
 			else
78
-				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveControl';
78
+				$this->_activeControlType='Prado\\Web\UI\\ActiveControls\\TBaseActiveControl';
79 79
 		}
80 80
 		else
81
-			$this->_activeControlType = $type;
81
+			$this->_activeControlType=$type;
82 82
 	}
83 83
 
84 84
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		{
100 100
 			parent::render($writer);
101 101
 		} else {
102
-			$writer->write("<span id=\"" . $this->_control->getClientID() . "\" style=\"display:none\"></span>");
102
+			$writer->write("<span id=\"".$this->_control->getClientID()."\" style=\"display:none\"></span>");
103 103
 		}
104 104
 	}
105 105
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	public function setBaseActiveControl($control)
110 110
 	{
111
-		$this->_baseActiveControl = $control;
111
+		$this->_baseActiveControl=$control;
112 112
 	}
113 113
 
114 114
 	/**
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function getBaseActiveControl()
118 118
 	{
119
-		if($this->_baseActiveControl === null)
119
+		if($this->_baseActiveControl===null)
120 120
 		{
121
-			$type = $this->_activeControlType;
122
-			$this->_baseActiveControl = new $type($this->getControl());
121
+			$type=$this->_activeControlType;
122
+			$this->_baseActiveControl=new $type($this->getControl());
123 123
 		}
124 124
 		return $this->_baseActiveControl;
125 125
 	}
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 	{
132 132
 		if($this->getPage()->getIsCallback())
133 133
 		{
134
-			$target = $this->getPage()->getCallbackEventTarget();
134
+			$target=$this->getPage()->getCallbackEventTarget();
135 135
 			if($target instanceof ICallbackEventHandler)
136 136
 			{
137
-				$client = $target->getActiveControl()->getClientSide();
137
+				$client=$target->getActiveControl()->getClientSide();
138 138
 				return $client->getEnablePageStateUpdate();
139 139
 			}
140 140
 		}
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 	{
149 149
 		if($this->getIsTrackingPageState())
150 150
 		{
151
-		  $stateTrackerClass = $this->_stateTrackerClass;
152
-			$this->_stateTracker = new $stateTrackerClass($this->getControl());
151
+		  $stateTrackerClass=$this->_stateTrackerClass;
152
+			$this->_stateTracker=new $stateTrackerClass($this->getControl());
153 153
 			$this->_stateTracker->trackChanges();
154 154
 		}
155 155
 		parent::onLoad($param);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	public function saveState()
163 163
 	{
164
-		if(($this->_stateTracker !== null)
164
+		if(($this->_stateTracker!==null)
165 165
 			&& $this->getControl()->getActiveControl()->canUpdateClientSide(true))
166 166
 		{
167 167
 			$this->_stateTracker->respondToChanges();
@@ -182,6 +182,6 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	public function setStateTracker($value)
184 184
 	{
185
-		$this->_stateTrackerClass = TPropertyValue::ensureString($value);
185
+		$this->_stateTrackerClass=TPropertyValue::ensureString($value);
186 186
 	}
187 187
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDropDownList.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 	/**
67 67
 	 * No client class for this control.
68 68
 	 * This method overrides the parent implementation.
69
-	 * @return null no javascript class name.
69
+	 * @return string no javascript class name.
70 70
 	 */
71 71
 	protected function getClientClassName()
72 72
 	{
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	protected function createListItemCollection()
88 88
 	{
89
-		$collection = new TActiveListItemCollection;
89
+		$collection=new TActiveListItemCollection;
90 90
 		$collection->setControl($this);
91 91
 		return $collection;
92 92
 	}
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	{
108 108
 		parent::addAttributesToRender($writer);
109 109
 		$writer->addAttribute('id', $this->getClientID());
110
-		if ($this->getAutoPostBack())
110
+		if($this->getAutoPostBack())
111 111
 			$this->getActiveControl()->registerCallbackClientScript(
112 112
 				$this->getClientClassName(), $this->getPostBackOptions());
113 113
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveListBox.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 	/**
71 71
 	 * Javascript client class for this control.
72 72
 	 * This method overrides the parent implementation.
73
-	 * @return null no javascript class name.
73
+	 * @return string no javascript class name.
74 74
 	 */
75 75
 	protected function getClientClassName()
76 76
 	{
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	protected function createListItemCollection()
68 68
 	{
69
-		$collection = new TActiveListItemCollection;
69
+		$collection=new TActiveListItemCollection;
70 70
 		$collection->setControl($this);
71 71
 		return $collection;
72 72
 	}
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	public function setSelectionMode($value)
91 91
 	{
92
-		if(parent::getSelectionMode() === $value)
92
+		if(parent::getSelectionMode()===$value)
93 93
 			return;
94 94
 
95 95
 		parent::setSelectionMode($value);
96
-		$multiple = $this->getIsMultiSelect();
97
-		$id = $this->getUniqueID(); $multi_id = $id . '[]';
96
+		$multiple=$this->getIsMultiSelect();
97
+		$id=$this->getUniqueID(); $multi_id=$id.'[]';
98 98
 		if($this->getActiveControl()->canUpdateClientSide())
99 99
 		{
100
-			$client = $this->getPage()->getCallbackClient();
100
+			$client=$this->getPage()->getCallbackClient();
101 101
 			$client->setAttribute($this, 'multiple', $multiple ? 'multiple' : false);
102 102
 			$client->setAttribute($this, 'name', $multiple ? $multi_id : $id);
103 103
 		}
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	{
152 152
 		parent::addAttributesToRender($writer);
153 153
 		$writer->addAttribute('id', $this->getClientID());
154
-		if ($this->getAutoPostBack())
154
+		if($this->getAutoPostBack())
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/TTriggeredCallback.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	/**
59
-	 * @return array list of trigger callback options.
59
+	 * @return string list of trigger callback options.
60 60
 	 */
61 61
 	protected function getTriggerOptions()
62 62
 	{
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	protected function getTargetControl()
51 51
 	{
52
-		$id = $this->getControlID();
53
-		if(($control = $this->findControl($id)) instanceof TControl)
52
+		$id=$this->getControlID();
53
+		if(($control=$this->findControl($id)) instanceof TControl)
54 54
 			return $control->getClientID();
55
-		if($id === '')
55
+		if($id==='')
56 56
 		{
57 57
 			throw new TConfigurationException(
58 58
 				'ttriggeredcallback_invalid_controlid', get_class($this));
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	protected function getTriggerOptions()
67 67
 	{
68
-		$options['ID'] = $this->getClientID();
69
-		$options['EventTarget'] = $this->getUniqueID();
70
-		$options['ControlID'] = $this->getTargetControl();
68
+		$options['ID']=$this->getClientID();
69
+		$options['EventTarget']=$this->getUniqueID();
70
+		$options['ControlID']=$this->getTargetControl();
71 71
 		return $options;
72 72
 	}
73 73
 }
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDialog.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -158,6 +158,9 @@
 block discarded – undo
158 158
 		$this->triggerClientMethod('close');
159 159
 	}
160 160
 
161
+	/**
162
+	 * @param string $method
163
+	 */
161 164
 	private function triggerClientMethod($method)
162 165
 	{
163 166
 		$cs = $this->getPage()->getClientScript();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,8 +193,7 @@
 block discarded – undo
193 193
 		{
194 194
 		  parent::renderContents($writer);
195 195
 			$this->getPage()->getCallbackClient()->replaceContent($this, $writer, false);
196
-		}
197
-		else
196
+		} else
198 197
 			parent::render($writer);
199 198
 	}
200 199
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	public function getOptions()
74 74
 	{
75
-		if (($options = $this->getViewState('JuiOptions')) === null)
75
+		if(($options=$this->getViewState('JuiOptions'))===null)
76 76
 		{
77
-		  $options = new TJuiControlOptions($this);
77
+		  $options=new TJuiControlOptions($this);
78 78
 		  $this->setViewState('JuiOptions', $options);
79 79
 		}
80 80
 		return $options;
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	protected function getPostBackOptions()
105 105
 	{
106
-		$options = $this->getOptions()->toArray();
106
+		$options=$this->getOptions()->toArray();
107 107
 		// always make the dialog a child of the form, or its inner inputs won't be collected
108 108
 		if(!isset($options['appendTo']))
109
-			$options['appendTo'] = 'form:first';
109
+			$options['appendTo']='form:first';
110 110
 
111 111
 		foreach($this->getControls() as $control)
112 112
 			if($control instanceof TJuiDialogButton)
113
-				$options['buttons'][] = $control->getPostBackOptions();
113
+				$options['buttons'][]=$control->getPostBackOptions();
114 114
 
115 115
 		return $options;
116 116
 	}
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 		parent::addAttributesToRender($writer);
125 125
 
126 126
 		$writer->addAttribute('id', $this->getClientID());
127
-		$options = TJavaScript::encode($this->getPostBackOptions());
128
-		$cs = $this->getPage()->getClientScript();
129
-		$code = "jQuery('#" . $this->getWidgetID() . "')." . $this->getWidget() . "(" . $options . ");";
127
+		$options=TJavaScript::encode($this->getPostBackOptions());
128
+		$cs=$this->getPage()->getClientScript();
129
+		$code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");";
130 130
 		$cs->registerEndScript(sprintf('%08X', crc32($code)), $code);
131 131
 	}
132 132
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	 * Raises the OnCreate event
145 145
 	 * @param object $params event parameters
146 146
 	 */
147
-	public function onOpen ($params)
147
+	public function onOpen($params)
148 148
 	{
149 149
 		$this->raiseEvent('OnOpen', $this, $params);
150 150
 	}
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 
168 168
 	private function triggerClientMethod($method)
169 169
 	{
170
-		$cs = $this->getPage()->getClientScript();
171
-		$code = "jQuery(document).ready(function() { jQuery('#" . $this->getClientId() . "').dialog('" . $method . "'); })";
170
+		$cs=$this->getPage()->getClientScript();
171
+		$code="jQuery(document).ready(function() { jQuery('#".$this->getClientId()."').dialog('".$method."'); })";
172 172
 		$cs->registerEndScript(sprintf('%08X', crc32($code)), $code);
173 173
 	}
174 174
 
Please login to merge, or discard this patch.
framework/Web/UI/TTemplateControlInheritable.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 	/**
77 77
 	 * This method creates the template object for the given class
78 78
 	 *
79
-	 * @param string $p_class The class to create the template from
79
+	 * @param string $parentClass
80 80
 	 * @return void
81 81
 	 * @throws TConfigurationException if a template control directive is invalid
82 82
 	 */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function createChildControls()
45 45
 	{
46
-		if(null === ($_template = $this->getTemplate())) {
46
+		if(null===($_template=$this->getTemplate())) {
47 47
 			return $this->doCreateChildControlsFor(get_class($this));
48 48
 		}
49 49
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function doCreateChildControlsFor($parentClass)
68 68
 	{
69
-		if(false !== ($_parentClass = get_parent_class($parentClass)) && 'TTemplateControl' != $_parentClass) {
69
+		if(false!==($_parentClass=get_parent_class($parentClass)) && 'TTemplateControl'!=$_parentClass) {
70 70
 			$this->doCreateChildControlsFor($_parentClass);
71 71
 		}
72 72
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function doTemplateForClass($parentClass)
84 84
 	{
85
-		if(null !== ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) {
85
+		if(null!==($_template=$this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) {
86 86
 			foreach($_template->getDirective() as $_name => $_value) {
87 87
 				if(!is_string($_value)) {
88 88
 					throw new TConfigurationException('templatecontrol_directive_invalid', get_class(this), $_name);
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function getIsSourceTemplateControl()
107 107
 	{
108
-		if(null !== ($_template = $this->getTemplate())) {
108
+		if(null!==($_template=$this->getTemplate())) {
109 109
 			return $_template->getIsSourceTemplate();
110 110
 		}
111 111
 
112
-		return ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this)))
112
+		return ($_template=$this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this)))
113 113
 			? $_template->getIsSourceTemplate()
114 114
 			: false;
115 115
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBaseDataList.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -166,6 +166,7 @@
 block discarded – undo
166 166
 	 * Otherwise, an exception will be raised.
167 167
 	 * @param mixed data item
168 168
 	 * @param mixed field name
169
+	 * @param string $field
169 170
 	 * @return mixed data value at the specified field
170 171
 	 * @throws TInvalidDataValueException if the data is invalid
171 172
 	 */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -149,9 +149,9 @@
 block discarded – undo
149 149
 	 */
150 150
 	public function getDataKeys()
151 151
 	{
152
-		if(($dataKeys = $this->getViewState('DataKeys', null)) === null)
152
+		if(($dataKeys=$this->getViewState('DataKeys', null))===null)
153 153
 		{
154
-			$dataKeys = new TList;
154
+			$dataKeys=new TList;
155 155
 			$this->setViewState('DataKeys', $dataKeys, null);
156 156
 		}
157 157
 		return $dataKeys;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCheckBox.php 3 patches
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 	/**
119 119
 	 * Returns the value of the property that needs validation.
120
-	 * @return mixed the property value to be validated
120
+	 * @return boolean the property value to be validated
121 121
 	 */
122 122
 	public function getValidationPropertyValue()
123 123
 	{
@@ -184,6 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	/**
186 186
 	 * @param TTextAlign the alignment of the text caption. Valid values include Left and Right.
187
+	 * @param TTextAlign $value
187 188
 	 */
188 189
 	public function setTextAlign($value)
189 190
 	{
@@ -244,6 +245,7 @@  discard block
 block discarded – undo
244 245
 	/**
245 246
 	 * Sets a value indicating whether clicking on the checkbox will post the page.
246 247
 	 * @param boolean whether clicking on the checkbox will post the page.
248
+	 * @param boolean $value
247 249
 	 */
248 250
 	public function setAutoPostBack($value)
249 251
 	{
@@ -261,6 +263,7 @@  discard block
 block discarded – undo
261 263
 	/**
262 264
 	 * Sets the value indicating whether postback event trigger by this checkbox will cause input validation.
263 265
 	 * @param boolean whether postback event trigger by this checkbox will cause input validation.
266
+	 * @param boolean $value
264 267
 	 */
265 268
 	public function setCausesValidation($value)
266 269
 	{
@@ -277,6 +280,7 @@  discard block
 block discarded – undo
277 280
 
278 281
 	/**
279 282
 	 * @param string the group of validators which the checkbox causes validation upon postback
283
+	 * @param string $value
280 284
 	 */
281 285
 	public function setValidationGroup($value)
282 286
 	{
@@ -410,6 +414,7 @@  discard block
 block discarded – undo
410 414
 
411 415
 	/**
412 416
 	 * @param boolean whether to render javascript.
417
+	 * @param boolean $value
413 418
 	 */
414 419
 	public function setEnableClientScript($value)
415 420
 	{
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
  */
46 46
 class TCheckBox extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\Web\UI\IValidatable, \Prado\IDataRenderer, \Prado\Web\UI\ISurroundable
47 47
 {
48
-	private $_dataChanged = false;
49
-	private $_isValid = true;
48
+	private $_dataChanged=false;
49
+	private $_isValid=true;
50 50
 
51 51
 	/**
52 52
 	 * @return string tag name of the button
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function loadPostData($key, $values)
67 67
 	{
68
-		$checked = $this->getChecked();
69
-		if($newChecked = isset($values[$key]))
68
+		$checked=$this->getChecked();
69
+		if($newChecked=isset($values[$key]))
70 70
 			$this->setValue($values[$key]);
71 71
 		$this->setChecked($newChecked);
72
-		return $this->_dataChanged = ($newChecked !== $checked);
72
+		return $this->_dataChanged=($newChecked!==$checked);
73 73
 	}
74 74
 
75 75
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setIsValid($value)
145 145
 	{
146
-		$this->_isValid = TPropertyValue::ensureBoolean($value);
146
+		$this->_isValid=TPropertyValue::ensureBoolean($value);
147 147
 	}
148 148
 
149 149
 	/**
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 */
302 302
 	public function getSurroundingTagID()
303 303
 	{
304
-	return $this->getSpanNeeded() ? $this->getClientID() . '_parent' : $this->getClientID();
304
+	return $this->getSpanNeeded() ? $this->getClientID().'_parent' : $this->getClientID();
305 305
 	}
306 306
 
307 307
 	/**
@@ -315,31 +315,31 @@  discard block
 block discarded – undo
315 315
 		$this->getPage()->ensureRenderInForm($this);
316 316
 		if($this->getHasStyle())
317 317
 			$this->getStyle()->addAttributesToRender($writer);
318
-		if(($tooltip = $this->getToolTip()) !== '')
318
+		if(($tooltip=$this->getToolTip())!=='')
319 319
 			$writer->addAttribute('title', $tooltip);
320 320
 		if($this->getHasAttributes())
321 321
 		{
322
-			$attributes = $this->getAttributes();
323
-			$value = $attributes->remove('value');
322
+			$attributes=$this->getAttributes();
323
+			$value=$attributes->remove('value');
324 324
 			// onclick js should only be added to input tag
325
-			if(($onclick = $attributes->remove('onclick')) === null)
326
-				$onclick = '';
325
+			if(($onclick=$attributes->remove('onclick'))===null)
326
+				$onclick='';
327 327
 			if($attributes->getCount())
328 328
 				$writer->addAttributes($attributes);
329
-			if($value !== null)
329
+			if($value!==null)
330 330
 				$attributes->add('value', $value);
331 331
 		}
332 332
 		else
333
-			$onclick = '';
334
-	if($needspan = $this->getSpanNeeded())
333
+			$onclick='';
334
+	if($needspan=$this->getSpanNeeded())
335 335
 	{
336 336
 	  $writer->addAttribute('id', $this->getSurroundingTagID());
337 337
 	  $writer->renderBeginTag($this->getSurroundingTag());
338 338
 	}
339
-		$clientID = $this->getClientID();
340
-		if(($text = $this->getText()) !== '')
339
+		$clientID=$this->getClientID();
340
+		if(($text=$this->getText())!=='')
341 341
 		{
342
-			if($this->getTextAlign() === TTextAlign::Left)
342
+			if($this->getTextAlign()===TTextAlign::Left)
343 343
 			{
344 344
 				$this->renderLabel($writer, $clientID, $text);
345 345
 				$this->renderInputTag($writer, $clientID, $onclick);
@@ -361,11 +361,11 @@  discard block
 block discarded – undo
361 361
 	 */
362 362
 	public function getLabelAttributes()
363 363
 	{
364
-		if($attributes = $this->getViewState('LabelAttributes', null))
364
+		if($attributes=$this->getViewState('LabelAttributes', null))
365 365
 			return $attributes;
366 366
 		else
367 367
 		{
368
-			$attributes = new TAttributeCollection;
368
+			$attributes=new TAttributeCollection;
369 369
 			$this->setViewState('LabelAttributes', $attributes, null);
370 370
 			return $attributes;
371 371
 		}
@@ -376,11 +376,11 @@  discard block
 block discarded – undo
376 376
 	 */
377 377
 	public function getInputAttributes()
378 378
 	{
379
-		if($attributes = $this->getViewState('InputAttributes', null))
379
+		if($attributes=$this->getViewState('InputAttributes', null))
380 380
 			return $attributes;
381 381
 		else
382 382
 		{
383
-			$attributes = new TAttributeCollection;
383
+			$attributes=new TAttributeCollection;
384 384
 			$this->setViewState('InputAttributes', $attributes, null);
385 385
 			return $attributes;
386 386
 		}
@@ -391,11 +391,11 @@  discard block
 block discarded – undo
391 391
 	 */
392 392
 	protected function getValueAttribute()
393 393
 	{
394
-		if(($value = $this->getValue()) !== '')
394
+		if(($value=$this->getValue())!=='')
395 395
 			return $value;
396 396
 		else
397 397
 		{
398
-			$attributes = $this->getViewState('InputAttributes', null);
398
+			$attributes=$this->getViewState('InputAttributes', null);
399 399
 			if($attributes && $attributes->contains('value'))
400 400
 				return $attributes->itemAt('value');
401 401
 			elseif($this->hasAttribute('value'))
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 	 * @return bool wether this control needs a surrounding span tag
429 429
 	 */
430 430
 	protected function getSpanNeeded() {
431
-		return $this->getText() !== '';
431
+		return $this->getText()!=='';
432 432
 	}
433 433
 
434 434
 	/**
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 	protected function renderLabel($writer, $clientID, $text)
441 441
 	{
442 442
 		$writer->addAttribute('for', $clientID);
443
-		if($attributes = $this->getViewState('LabelAttributes', null))
443
+		if($attributes=$this->getViewState('LabelAttributes', null))
444 444
 			$writer->addAttributes($attributes);
445 445
 		$writer->renderBeginTag('label');
446 446
 		$writer->write($text);
@@ -455,21 +455,21 @@  discard block
 block discarded – undo
455 455
 	 */
456 456
 	protected function renderInputTag($writer, $clientID, $onclick)
457 457
 	{
458
-		if($clientID !== '')
458
+		if($clientID!=='')
459 459
 			$writer->addAttribute('id', $clientID);
460 460
 		$writer->addAttribute('type', 'checkbox');
461
-		if(($value = $this->getValueAttribute()) !== '')
461
+		if(($value=$this->getValueAttribute())!=='')
462 462
 			$writer->addAttribute('value', $value);
463 463
 		if(!empty($onclick))
464 464
 			$writer->addAttribute('onclick', $onclick);
465
-		if(($uniqueID = $this->getUniqueID()) !== '')
465
+		if(($uniqueID=$this->getUniqueID())!=='')
466 466
 			$writer->addAttribute('name', $uniqueID);
467 467
 		if($this->getChecked())
468 468
 			$writer->addAttribute('checked', 'checked');
469 469
 		if(!$this->getEnabled(true))
470 470
 			$writer->addAttribute('disabled', 'disabled');
471 471
 
472
-		$page = $this->getPage();
472
+		$page=$this->getPage();
473 473
 		if($this->getEnabled(true)
474 474
 			&& $this->getEnableClientScript()
475 475
 			&& $this->getAutoPostBack()
@@ -478,11 +478,11 @@  discard block
 block discarded – undo
478 478
 			$this->renderClientControlScript($writer);
479 479
 		}
480 480
 
481
-		if(($accesskey = $this->getAccessKey()) !== '')
481
+		if(($accesskey=$this->getAccessKey())!=='')
482 482
 			$writer->addAttribute('accesskey', $accesskey);
483
-		if(($tabindex = $this->getTabIndex()) > 0)
483
+		if(($tabindex=$this->getTabIndex()) > 0)
484 484
 			$writer->addAttribute('tabindex', "$tabindex");
485
-		if($attributes = $this->getViewState('InputAttributes', null))
485
+		if($attributes=$this->getViewState('InputAttributes', null))
486 486
 			$writer->addAttributes($attributes);
487 487
 		$writer->renderBeginTag('input');
488 488
 		$writer->renderEndTag();
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 	 */
494 494
 	protected function renderClientControlScript($writer)
495 495
 	{
496
-		$cs = $this->getPage()->getClientScript();
496
+		$cs=$this->getPage()->getClientScript();
497 497
 		$cs->registerPostBackControl($this->getClientClassName(), $this->getPostBackOptions());
498 498
 	}
499 499
 
@@ -513,10 +513,10 @@  discard block
 block discarded – undo
513 513
 	 */
514 514
 	protected function getPostBackOptions()
515 515
 	{
516
-		$options['ID'] = $this->getClientID();
517
-		$options['ValidationGroup'] = $this->getValidationGroup();
518
-		$options['CausesValidation'] = $this->getCausesValidation();
519
-		$options['EventTarget'] = $this->getUniqueID();
516
+		$options['ID']=$this->getClientID();
517
+		$options['ValidationGroup']=$this->getValidationGroup();
518
+		$options['CausesValidation']=$this->getCausesValidation();
519
+		$options['EventTarget']=$this->getUniqueID();
520 520
 		return $options;
521 521
 	}
522 522
 }
523 523
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -328,8 +328,7 @@  discard block
 block discarded – undo
328 328
 				$writer->addAttributes($attributes);
329 329
 			if($value !== null)
330 330
 				$attributes->add('value', $value);
331
-		}
332
-		else
331
+		} else
333 332
 			$onclick = '';
334 333
 	if($needspan = $this->getSpanNeeded())
335 334
 	{
@@ -343,14 +342,12 @@  discard block
 block discarded – undo
343 342
 			{
344 343
 				$this->renderLabel($writer, $clientID, $text);
345 344
 				$this->renderInputTag($writer, $clientID, $onclick);
346
-			}
347
-			else
345
+			} else
348 346
 			{
349 347
 				$this->renderInputTag($writer, $clientID, $onclick);
350 348
 				$this->renderLabel($writer, $clientID, $text);
351 349
 			}
352
-		}
353
-		else
350
+		} else
354 351
 			$this->renderInputTag($writer, $clientID, $onclick);
355 352
 		if($needspan)
356 353
 			$writer->renderEndTag();
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCompareValidator.php 3 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -186,6 +186,8 @@
 block discarded – undo
186 186
 	 * Parse the pair of values into the appropriate value type.
187 187
 	 * @param string value one
188 188
 	 * @param string second value
189
+	 * @param string $value1
190
+	 * @param string $value2
189 191
 	 * @return array appropriate type of the value pair, array($value1, $value2);
190 192
 	 */
191 193
 	protected function getComparisonValues($value1, $value2)
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -151,26 +151,26 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function evaluateIsValid()
153 153
 	{
154
-		if(($value = $this->getValidationValue($this->getValidationTarget())) === '')
154
+		if(($value=$this->getValidationValue($this->getValidationTarget()))==='')
155 155
 			return true;
156 156
 
157
-		if(($controlToCompare = $this->getControlToCompare()) !== '')
157
+		if(($controlToCompare=$this->getControlToCompare())!=='')
158 158
 		{
159
-			if(($control2 = $this->findControl($controlToCompare)) === null)
159
+			if(($control2=$this->findControl($controlToCompare))===null)
160 160
 				throw new TInvalidDataValueException('comparevalidator_controltocompare_invalid');
161
-			if(($value2 = $this->getValidationValue($control2)) === '')
161
+			if(($value2=$this->getValidationValue($control2))==='')
162 162
 				return false;
163 163
 		}
164 164
 		else
165
-			$value2 = $this->getValueToCompare();
165
+			$value2=$this->getValueToCompare();
166 166
 
167
-		$values = $this->getComparisonValues($value, $value2);
167
+		$values=$this->getComparisonValues($value, $value2);
168 168
 		switch($this->getOperator())
169 169
 		{
170 170
 			case TValidationCompareOperator::Equal:
171
-				return $values[0] == $values[1];
171
+				return $values[0]==$values[1];
172 172
 			case TValidationCompareOperator::NotEqual:
173
-				return $values[0] != $values[1];
173
+				return $values[0]!=$values[1];
174 174
 			case TValidationCompareOperator::GreaterThan:
175 175
 				return $values[0] > $values[1];
176 176
 			case TValidationCompareOperator::GreaterThanEqual:
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
 			case TValidationDataType::Float:
200 200
 				return [floatval($value1), floatval($value2)];
201 201
 			case TValidationDataType::Date:
202
-				$dateFormat = $this->getDateFormat();
203
-				if($dateFormat !== '')
202
+				$dateFormat=$this->getDateFormat();
203
+				if($dateFormat!=='')
204 204
 				{
205
-					$formatter = new TSimpleDateFormatter($dateFormat);
205
+					$formatter=new TSimpleDateFormatter($dateFormat);
206 206
 					return [$formatter->parse($value1), $formatter->parse($value2)];
207 207
 				}
208 208
 				else
@@ -217,19 +217,19 @@  discard block
 block discarded – undo
217 217
 	 */
218 218
 	protected function getClientScriptOptions()
219 219
 	{
220
-		$options = parent::getClientScriptOptions();
221
-		if(($name = $this->getControlToCompare()) !== '')
220
+		$options=parent::getClientScriptOptions();
221
+		if(($name=$this->getControlToCompare())!=='')
222 222
 		{
223
-			if(($control = $this->findControl($name)) !== null)
224
-				$options['ControlToCompare'] = $control->getClientID();
223
+			if(($control=$this->findControl($name))!==null)
224
+				$options['ControlToCompare']=$control->getClientID();
225 225
 		}
226
-		if(($value = $this->getValueToCompare()) !== '')
227
-			$options['ValueToCompare'] = $value;
228
-		if(($operator = $this->getOperator()) !== TValidationCompareOperator::Equal)
229
-			$options['Operator'] = $operator;
230
-		$options['DataType'] = $this->getDataType();
231
-		if(($dateFormat = $this->getDateFormat()) !== '')
232
-			$options['DateFormat'] = $dateFormat;
226
+		if(($value=$this->getValueToCompare())!=='')
227
+			$options['ValueToCompare']=$value;
228
+		if(($operator=$this->getOperator())!==TValidationCompareOperator::Equal)
229
+			$options['Operator']=$operator;
230
+		$options['DataType']=$this->getDataType();
231
+		if(($dateFormat=$this->getDateFormat())!=='')
232
+			$options['DateFormat']=$dateFormat;
233 233
 		return $options;
234 234
 	}
235 235
 }
236 236
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 				throw new TInvalidDataValueException('comparevalidator_controltocompare_invalid');
161 161
 			if(($value2 = $this->getValidationValue($control2)) === '')
162 162
 				return false;
163
-		}
164
-		else
163
+		} else
165 164
 			$value2 = $this->getValueToCompare();
166 165
 
167 166
 		$values = $this->getComparisonValues($value, $value2);
@@ -204,8 +203,7 @@  discard block
 block discarded – undo
204 203
 				{
205 204
 					$formatter = new TSimpleDateFormatter($dateFormat);
206 205
 					return [$formatter->parse($value1), $formatter->parse($value2)];
207
-				}
208
-				else
206
+				} else
209 207
 					return [strtotime($value1), strtotime($value2)];
210 208
 		}
211 209
 		return [$value1, $value2];
Please login to merge, or discard this patch.