Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:58
created
framework/Web/UI/ActiveControls/TActiveDataGridPager.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	 */
32 32
 	public function getClientSide()
33 33
 	{
34
-		if($this->_callbackoptions === null)
34
+		if ($this->_callbackoptions === null)
35 35
 			$this->_callbackoptions = new TCallbackOptions;
36 36
 		return $this->_callbackoptions->getClientSide();
37 37
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@
 block discarded – undo
31 31
 	 */
32 32
 	public function getClientSide()
33 33
 	{
34
-		if($this->_callbackoptions === null)
35
-			$this->_callbackoptions = new TCallbackOptions;
34
+		if($this->_callbackoptions === null) {
35
+					$this->_callbackoptions = new TCallbackOptions;
36
+		}
36 37
 		return $this->_callbackoptions->getClientSide();
37 38
 	}
38 39
 }
39 40
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveCheckBoxList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * updated later.
73 73
 	 *@return boolean always true
74 74
 	 */
75
-	protected function getSpanNeeded ()
75
+	protected function getSpanNeeded()
76 76
 	{
77 77
 	  return true;
78 78
 	}
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	protected function addAttributesToRender($writer)
127 127
 	{
128 128
 		parent::addAttributesToRender($writer);
129
-		if($this->getEnableClientScript()
129
+		if ($this->getEnableClientScript()
130 130
 			&& $this->getAutoPostBack()
131 131
 			&& $this->getPage()->getClientSupportsJavaScript())
132 132
 		{
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TTriggeredCallback.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@
 block discarded – undo
50 50
 	protected function getTargetControl()
51 51
 	{
52 52
 		$id = $this->getControlID();
53
-		if(($control = $this->findControl($id)) instanceof TControl)
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));
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,9 @@
 block discarded – undo
50 50
 	protected function getTargetControl()
51 51
 	{
52 52
 		$id = $this->getControlID();
53
-		if(($control = $this->findControl($id)) instanceof TControl)
54
-			return $control->getClientID();
53
+		if(($control = $this->findControl($id)) instanceof TControl) {
54
+					return $control->getClientID();
55
+		}
55 56
 		if($id === '')
56 57
 		{
57 58
 			throw new TConfigurationException(
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveHyperLinkColumn.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 	{
38 38
 		$text = $this->getHeaderText();
39 39
 
40
-		if(($classPath = $this->getHeaderRenderer()) !== '')
40
+		if (($classPath = $this->getHeaderRenderer()) !== '')
41 41
 		{
42 42
 			$control = Prado::createComponent($classPath);
43
-			if($control instanceof \Prado\IDataRenderer)
43
+			if ($control instanceof \Prado\IDataRenderer)
44 44
 			{
45
-				if($control instanceof IItemDataRenderer)
45
+				if ($control instanceof IItemDataRenderer)
46 46
 				{
47 47
 					$item = $cell->getParent();
48 48
 					$control->setItemIndex($item->getItemIndex());
@@ -52,21 +52,21 @@  discard block
 block discarded – undo
52 52
 			}
53 53
 			$cell->getControls()->add($control);
54 54
 		}
55
-		elseif($this->getAllowSorting())
55
+		elseif ($this->getAllowSorting())
56 56
 		{
57 57
 			$sortExpression = $this->getSortExpression();
58
-			if(($url = $this->getHeaderImageUrl()) !== '')
58
+			if (($url = $this->getHeaderImageUrl()) !== '')
59 59
 			{
60 60
 				$button = new TActiveImageButton;
61 61
 				$button->setImageUrl($url);
62 62
 				$button->setCommandName(TDataGrid::CMD_SORT);
63 63
 				$button->setCommandParameter($sortExpression);
64
-				if($text !== '')
64
+				if ($text !== '')
65 65
 					$button->setAlternateText($text);
66 66
 				$button->setCausesValidation(false);
67 67
 				$cell->getControls()->add($button);
68 68
 			}
69
-			elseif($text !== '')
69
+			elseif ($text !== '')
70 70
 			{
71 71
 				$button = new TActiveLinkButton;
72 72
 				$button->setText($text);
@@ -80,15 +80,15 @@  discard block
 block discarded – undo
80 80
 		}
81 81
 		else
82 82
 		{
83
-			if(($url = $this->getHeaderImageUrl()) !== '')
83
+			if (($url = $this->getHeaderImageUrl()) !== '')
84 84
 			{
85 85
 				$image = new TActiveImage;
86 86
 				$image->setImageUrl($url);
87
-				if($text !== '')
87
+				if ($text !== '')
88 88
 					$image->setAlternateText($text);
89 89
 				$cell->getControls()->add($image);
90 90
 			}
91
-			elseif($text !== '')
91
+			elseif ($text !== '')
92 92
 				$cell->setText($text);
93 93
 			else
94 94
 				$cell->setText(' ');
Please login to merge, or discard this patch.
Braces   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@  discard block
 block discarded – undo
51 51
 				$control->setData($text);
52 52
 			}
53 53
 			$cell->getControls()->add($control);
54
-		}
55
-		elseif($this->getAllowSorting())
54
+		} elseif($this->getAllowSorting())
56 55
 		{
57 56
 			$sortExpression = $this->getSortExpression();
58 57
 			if(($url = $this->getHeaderImageUrl()) !== '')
@@ -61,12 +60,12 @@  discard block
 block discarded – undo
61 60
 				$button->setImageUrl($url);
62 61
 				$button->setCommandName(TDataGrid::CMD_SORT);
63 62
 				$button->setCommandParameter($sortExpression);
64
-				if($text !== '')
65
-					$button->setAlternateText($text);
63
+				if($text !== '') {
64
+									$button->setAlternateText($text);
65
+				}
66 66
 				$button->setCausesValidation(false);
67 67
 				$cell->getControls()->add($button);
68
-			}
69
-			elseif($text !== '')
68
+			} elseif($text !== '')
70 69
 			{
71 70
 				$button = new TActiveLinkButton;
72 71
 				$button->setText($text);
@@ -74,24 +73,24 @@  discard block
 block discarded – undo
74 73
 				$button->setCommandParameter($sortExpression);
75 74
 				$button->setCausesValidation(false);
76 75
 				$cell->getControls()->add($button);
76
+			} else {
77
+							$cell->setText(' ');
77 78
 			}
78
-			else
79
-				$cell->setText(' ');
80
-		}
81
-		else
79
+		} else
82 80
 		{
83 81
 			if(($url = $this->getHeaderImageUrl()) !== '')
84 82
 			{
85 83
 				$image = new TActiveImage;
86 84
 				$image->setImageUrl($url);
87
-				if($text !== '')
88
-					$image->setAlternateText($text);
85
+				if($text !== '') {
86
+									$image->setAlternateText($text);
87
+				}
89 88
 				$cell->getControls()->add($image);
89
+			} elseif($text !== '') {
90
+							$cell->setText($text);
91
+			} else {
92
+							$cell->setText(' ');
90 93
 			}
91
-			elseif($text !== '')
92
-				$cell->setText($text);
93
-			else
94
-				$cell->setText(' ');
95 94
 		}
96 95
 	}
97 96
 }
98 97
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableCell.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -129,8 +129,9 @@  discard block
 block discarded – undo
129 129
 	{
130 130
 		parent::addAttributesToRender($writer);
131 131
 		$writer->addAttribute('id', $this->getClientID());
132
-		if ($this->hasEventHandler('OnCellSelected'))
133
-			$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
132
+		if ($this->hasEventHandler('OnCellSelected')) {
133
+					$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
134
+		}
134 135
 	}
135 136
 
136 137
 	/**
@@ -145,17 +146,18 @@  discard block
 block discarded – undo
145 146
 		if ($this->getHasPreRendered())
146 147
 		{
147 148
 			parent::render($writer);
148
-			if ($this->getActiveControl()->canUpdateClientSide())
149
-				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
150
-		}
151
-		else {
149
+			if ($this->getActiveControl()->canUpdateClientSide()) {
150
+							$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
151
+			}
152
+		} else {
152 153
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
153 154
 			// If we update a TActiveTableCell on callback, we shouldn't update all childs,
154 155
 			// because the whole content will be replaced by the parent.
155 156
 			if ($this->getHasControls())
156 157
 			{
157
-				foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control)
158
-					$control->getActiveControl()->setEnableUpdate(false);
158
+				foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) {
159
+									$control->getActiveControl()->setEnableUpdate(false);
160
+				}
159 161
 			}
160 162
 		}
161 163
 	}
@@ -180,8 +182,9 @@  discard block
 block discarded – undo
180 182
 	 */
181 183
 	public function getCellIndex()
182 184
 	{
183
-		foreach ($this->getRow()->getCells() as $key => $row)
184
-			if ($row == $this) return $key;
185
+		foreach ($this->getRow()->getCells() as $key => $row) {
186
+					if ($row == $this) return $key;
187
+		}
185 188
 		throw new TConfigurationException('tactivetablecell_control_notincollection', get_class($this), $this->getUniqueID());
186 189
 	}
187 190
 
@@ -199,8 +202,11 @@  discard block
 block discarded – undo
199 202
 			{
200 203
 				$row = $row->getParent();
201 204
 			}
202
-			if ($row instanceof TTableRow) $this->_row = $row;
203
-			else throw new TConfigurationException('tactivetablecell_control_outoftable', get_class($this), $this->getUniqueID());
205
+			if ($row instanceof TTableRow) {
206
+				$this->_row = $row;
207
+			} else {
208
+				throw new TConfigurationException('tactivetablecell_control_outoftable', get_class($this), $this->getUniqueID());
209
+			}
204 210
 		}
205 211
 		return $this->_row;
206 212
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveClientScript.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	protected function renderCustomScriptFile($writer)
47 47
 	{
48
-		if(($scriptUrl = $this->getScriptUrl()) !== '')
48
+		if (($scriptUrl = $this->getScriptUrl()) !== '')
49 49
 		{
50
-			if($this->getPage()->getIsCallback())
50
+			if ($this->getPage()->getIsCallback())
51 51
 			{
52 52
 				$cs = $this->getPage()->getClientScript();
53
-				$uniqueid = $this->ClientID . '_custom';
54
-				if(!$cs->isScriptFileRegistered($uniqueid))
53
+				$uniqueid = $this->ClientID.'_custom';
54
+				if (!$cs->isScriptFileRegistered($uniqueid))
55 55
 					$cs->registerScriptFile($uniqueid, $scriptUrl);
56 56
 			} else {
57 57
 				$writer->write("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n");
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	protected function renderCustomScript($writer)
67 67
 	{
68
-		if($this->getHasControls())
68
+		if ($this->getHasControls())
69 69
 		{
70
-			if($this->getPage()->getIsCallback())
70
+			if ($this->getPage()->getIsCallback())
71 71
 			{
72 72
 				$extWriter = $this->getPage()->getResponse()->createHtmlWriter();
73 73
 				$extWriter->write("/*<![CDATA[*/\n");
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
 			{
52 52
 				$cs = $this->getPage()->getClientScript();
53 53
 				$uniqueid = $this->ClientID . '_custom';
54
-				if(!$cs->isScriptFileRegistered($uniqueid))
55
-					$cs->registerScriptFile($uniqueid, $scriptUrl);
54
+				if(!$cs->isScriptFileRegistered($uniqueid)) {
55
+									$cs->registerScriptFile($uniqueid, $scriptUrl);
56
+				}
56 57
 			} else {
57 58
 				$writer->write("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n");
58 59
 			}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveMultiView.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	protected function getContainerID()
59 59
 	{
60
-		return $this->ClientID . '_Container';
60
+		return $this->ClientID.'_Container';
61 61
 	}
62 62
 
63 63
 	/**
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function render($writer)
70 70
 	{
71
-		if($this->getHasPreRendered()) {
71
+		if ($this->getHasPreRendered()) {
72 72
 			$this->renderMultiView($writer);
73
-			if($this->getActiveControl()->canUpdateClientSide())
73
+			if ($this->getActiveControl()->canUpdateClientSide())
74 74
 				$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
75 75
 		}
76 76
 		else
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	public function setActiveViewIndex($value)
98 98
 	{
99 99
 		parent::setActiveViewIndex($value);
100
-		if($this->getActiveControl()->canUpdateClientSide())
100
+		if ($this->getActiveControl()->canUpdateClientSide())
101 101
 			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
102 102
 	}
103 103
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	public function setActiveView($value)
109 109
 	{
110 110
 		parent::setActiveView($value);
111
-		if($this->getActiveControl()->canUpdateClientSide())
111
+		if ($this->getActiveControl()->canUpdateClientSide())
112 112
 			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
113 113
 	}
114 114
 }
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -70,11 +70,12 @@  discard block
 block discarded – undo
70 70
 	{
71 71
 		if($this->getHasPreRendered()) {
72 72
 			$this->renderMultiView($writer);
73
-			if($this->getActiveControl()->canUpdateClientSide())
74
-				$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
73
+			if($this->getActiveControl()->canUpdateClientSide()) {
74
+							$this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
75
+			}
76
+		} else {
77
+					$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
75 78
 		}
76
-		else
77
-			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
78 79
 	}
79 80
 
80 81
 	/**
@@ -97,8 +98,9 @@  discard block
 block discarded – undo
97 98
 	public function setActiveViewIndex($value)
98 99
 	{
99 100
 		parent::setActiveViewIndex($value);
100
-		if($this->getActiveControl()->canUpdateClientSide())
101
-			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
101
+		if($this->getActiveControl()->canUpdateClientSide()) {
102
+					$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
103
+		}
102 104
 	}
103 105
 
104 106
 	/**
@@ -108,7 +110,8 @@  discard block
 block discarded – undo
108 110
 	public function setActiveView($value)
109 111
 	{
110 112
 		parent::setActiveView($value);
111
-		if($this->getActiveControl()->canUpdateClientSide())
112
-			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
113
+		if($this->getActiveControl()->canUpdateClientSide()) {
114
+					$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
115
+		}
113 116
 	}
114 117
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TBaseActiveCallbackControl.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	public function getClientSide()
51 51
 	{
52
-		if(($client = $this->getOption('ClientSide')) === null)
52
+		if (($client = $this->getOption('ClientSide')) === null)
53 53
 		{
54 54
 			$client = $this->createClientSide();
55 55
 			$this->setOption('ClientSide', $client);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setClientSide($client)
65 65
 	{
66
-		if($this->getOption('ClientSide') === null)
66
+		if ($this->getOption('ClientSide') === null)
67 67
 			$this->setOption('ClientSide', $client);
68 68
 		else
69 69
 			throw new TConfigurationException(
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	protected function getDefaultClientSideOptions()
110 110
 	{
111
-		if(($id = $this->getCallbackOptions()) !== '')
111
+		if (($id = $this->getCallbackOptions()) !== '')
112 112
 		{
113
-			if(($pos = strrpos($id, '.')) !== false)
113
+			if (($pos = strrpos($id, '.')) !== false)
114 114
 			{
115 115
 				$control = $this->getControl()->getSubProperty(substr($id, 0, $pos));
116 116
 				$newid = substr($id, $pos + 1);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 				$control = $this->getControl()->findControl($id, true);
125 125
 			}
126 126
 
127
-			if($control instanceof TCallbackOptions)
127
+			if ($control instanceof TCallbackOptions)
128 128
 				return $control->getClientSide()->getOptions()->toArray();
129 129
 			else
130 130
 				throw new TConfigurationException('callback_invalid_callback_options', $this->getControl()->getID(), $id);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public function canCauseValidation()
177 177
 	{
178
-		if($this->getCausesValidation())
178
+		if ($this->getCausesValidation())
179 179
 		{
180 180
 			$group = $this->getValidationGroup();
181 181
 			return $this->getPage()->getValidators($group)->getCount() > 0;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 		$options['ValidationGroup'] = $this->getValidationGroup();
214 214
 		$options['CallbackParameter'] = $this->getCallbackParameter();
215 215
 		// needed for TCallback
216
-		if(!isset($options['EventTarget']))
216
+		if (!isset($options['EventTarget']))
217 217
 			$options['EventTarget'] = $this->getControl()->getUniqueID();
218 218
 		return $options;
219 219
 	}
@@ -230,13 +230,13 @@  discard block
 block discarded – undo
230 230
 	public function registerCallbackClientScript($class, $options = null)
231 231
 	{
232 232
 		$cs = $this->getPage()->getClientScript();
233
-		if(is_array($options))
233
+		if (is_array($options))
234 234
 			$options = array_merge($this->getClientSideOptions(), $options);
235 235
 		else
236 236
 			$options = $this->getClientSideOptions();
237 237
 
238 238
 		//remove true as default to save bytes
239
-		if($options['CausesValidation'] === true)
239
+		if ($options['CausesValidation'] === true)
240 240
 			$options['CausesValidation'] = '';
241 241
 		$cs->registerCallbackControl($class, $options);
242 242
 	}
Please login to merge, or discard this patch.
Braces   +27 added lines, -22 removed lines patch added patch discarded remove patch
@@ -63,11 +63,12 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setClientSide($client)
65 65
 	{
66
-		if($this->getOption('ClientSide') === null)
67
-			$this->setOption('ClientSide', $client);
68
-		else
69
-			throw new TConfigurationException(
66
+		if($this->getOption('ClientSide') === null) {
67
+					$this->setOption('ClientSide', $client);
68
+		} else {
69
+					throw new TConfigurationException(
70 70
 				'active_controls_client_side_exists', $this->getControl()->getID());
71
+		}
71 72
 	}
72 73
 
73 74
 	/**
@@ -114,20 +115,21 @@  discard block
 block discarded – undo
114 115
 			{
115 116
 				$control = $this->getControl()->getSubProperty(substr($id, 0, $pos));
116 117
 				$newid = substr($id, $pos + 1);
117
-				if ($control !== null)
118
-					$control = $control->$newid;
119
-			}
120
-			else
118
+				if ($control !== null) {
119
+									$control = $control->$newid;
120
+				}
121
+			} else
121 122
 			{
122 123
 				// TCheckBoxList overrides findControl() with a fake implementation
123 124
 				// but accepts a second parameter to use the standard one
124 125
 				$control = $this->getControl()->findControl($id, true);
125 126
 			}
126 127
 
127
-			if($control instanceof TCallbackOptions)
128
-				return $control->getClientSide()->getOptions()->toArray();
129
-			else
130
-				throw new TConfigurationException('callback_invalid_callback_options', $this->getControl()->getID(), $id);
128
+			if($control instanceof TCallbackOptions) {
129
+							return $control->getClientSide()->getOptions()->toArray();
130
+			} else {
131
+							throw new TConfigurationException('callback_invalid_callback_options', $this->getControl()->getID(), $id);
132
+			}
131 133
 		}
132 134
 
133 135
 		return [];
@@ -179,9 +181,9 @@  discard block
 block discarded – undo
179 181
 		{
180 182
 			$group = $this->getValidationGroup();
181 183
 			return $this->getPage()->getValidators($group)->getCount() > 0;
184
+		} else {
185
+					return false;
182 186
 		}
183
-		else
184
-			return false;
185 187
 	}
186 188
 
187 189
 	/**
@@ -213,8 +215,9 @@  discard block
 block discarded – undo
213 215
 		$options['ValidationGroup'] = $this->getValidationGroup();
214 216
 		$options['CallbackParameter'] = $this->getCallbackParameter();
215 217
 		// needed for TCallback
216
-		if(!isset($options['EventTarget']))
217
-			$options['EventTarget'] = $this->getControl()->getUniqueID();
218
+		if(!isset($options['EventTarget'])) {
219
+					$options['EventTarget'] = $this->getControl()->getUniqueID();
220
+		}
218 221
 		return $options;
219 222
 	}
220 223
 
@@ -230,14 +233,16 @@  discard block
 block discarded – undo
230 233
 	public function registerCallbackClientScript($class, $options = null)
231 234
 	{
232 235
 		$cs = $this->getPage()->getClientScript();
233
-		if(is_array($options))
234
-			$options = array_merge($this->getClientSideOptions(), $options);
235
-		else
236
-			$options = $this->getClientSideOptions();
236
+		if(is_array($options)) {
237
+					$options = array_merge($this->getClientSideOptions(), $options);
238
+		} else {
239
+					$options = $this->getClientSideOptions();
240
+		}
237 241
 
238 242
 		//remove true as default to save bytes
239
-		if($options['CausesValidation'] === true)
240
-			$options['CausesValidation'] = '';
243
+		if($options['CausesValidation'] === true) {
244
+					$options['CausesValidation'] = '';
245
+		}
241 246
 		$cs->registerCallbackControl($class, $options);
242 247
 	}
243 248
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackResponseWriter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@
 block discarded – undo
68 68
 	public function flush()
69 69
 	{
70 70
 		$content = parent::flush();
71
-		if(empty($content))
71
+		if (empty($content))
72 72
 			return "";
73
-		return '<!--' . $this->getBoundary() . '-->' . $content . '<!--//' . $this->getBoundary() . '-->';
73
+		return '<!--'.$this->getBoundary().'-->'.$content.'<!--//'.$this->getBoundary().'-->';
74 74
 	}
75 75
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,9 @@
 block discarded – undo
68 68
 	public function flush()
69 69
 	{
70 70
 		$content = parent::flush();
71
-		if(empty($content))
72
-			return "";
71
+		if(empty($content)) {
72
+					return "";
73
+		}
73 74
 		return '<!--' . $this->getBoundary() . '-->' . $content . '<!--//' . $this->getBoundary() . '-->';
74 75
 	}
75 76
 }
Please login to merge, or discard this patch.