Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Web/UI/ActiveControls/TActiveTableRowEventParameter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * @var integer the zero-based index of the row.
35 35
 	 */
36
-	private $_selectedRowIndex = -1;
36
+	private $_selectedRowIndex=-1;
37 37
 
38 38
 	/**
39 39
 	 * Creates a new TActiveTableRowEventParameter.
40 40
 	 */
41
-	public function __construct($response, $parameter, $index = -1)
41
+	public function __construct($response, $parameter, $index=-1)
42 42
 	{
43 43
 		parent::__construct($response, $parameter);
44
-		$this->_selectedRowIndex = $index;
44
+		$this->_selectedRowIndex=$index;
45 45
 	}
46 46
 
47 47
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDataGrid.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
   /**
54 54
    * @var string the tag used to render the surrounding container
55 55
    */
56
-  protected $_surroundingTag = 'div';
56
+  protected $_surroundingTag='div';
57 57
 
58 58
 	/**
59 59
 	 * @return string Name of the class used in AutoGenerateColumns mode
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 * @param string $value container tag
108 108
 	 */
109 109
 	public function setSurroundingTag($value) {
110
-	$this->_surroundingTag = TPropertyValue::ensureString($value);
110
+	$this->_surroundingTag=TPropertyValue::ensureString($value);
111 111
 	}
112 112
 
113 113
 	/**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @return string container id
116 116
 	 */
117 117
 	public function getSurroundingTagID() {
118
-		return $this->getClientID() . '_Container';
118
+		return $this->getClientID().'_Container';
119 119
 	}
120 120
 
121 121
 	/**
@@ -133,17 +133,17 @@  discard block
 block discarded – undo
133 133
 	 * @return mixed the button instance
134 134
 	 */
135 135
 	protected function createPagerButton($pager, $buttonType, $enabled, $text, $commandName, $commandParameter) {
136
-		if($buttonType === TDataGridPagerButtonType::LinkButton) {
136
+		if($buttonType===TDataGridPagerButtonType::LinkButton) {
137 137
 			if($enabled)
138
-				$button = new TActiveLinkButton;
138
+				$button=new TActiveLinkButton;
139 139
 			else {
140
-				$button = new TLabel;
140
+				$button=new TLabel;
141 141
 				$button->setText($text);
142 142
 				return $button;
143 143
 			}
144 144
 		}
145 145
 		else {
146
-			$button = new TActiveButton;
146
+			$button=new TActiveButton;
147 147
 			if(!$enabled)
148 148
 				$button->setEnabled(false);
149 149
 		}
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
 	protected function createPager()
161 161
 	{
162
-		$pager = new TActiveDataGridPager($this);
162
+		$pager=new TActiveDataGridPager($this);
163 163
 		$this->buildPager($pager);
164 164
 		$this->onPagerCreated(new TActiveDataGridPagerEventParameter($pager));
165 165
 		$this->getControls()->add($pager);
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
 	 * data source changed.
189 189
 	 */
190 190
 	private function renderPager() {
191
-		$pager = $this->getPage()->findControlsByType('Prado\Web\UI\ActiveControls\TActivePager', false);
191
+		$pager=$this->getPage()->findControlsByType('Prado\Web\UI\ActiveControls\TActivePager', false);
192 192
 		foreach($pager as $item) {
193
-			if($item->ControlToPaginate == $this->ID) {
194
-				$writer = $this->getResponse()->createHtmlWriter();
193
+			if($item->ControlToPaginate==$this->ID) {
194
+				$writer=$this->getResponse()->createHtmlWriter();
195 195
 				$this->getPage()->getAdapter()->registerControlToRender($item, $writer);
196 196
 			}
197 197
 		}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TStyleDiff.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		if(!($obj instanceof TStyle))
34 34
 			return [];
35
-		$style = $obj->getStyleFields();
36
-		$style = array_merge($style, $this->getStyleFromString($obj->getCustomStyle()));
35
+		$style=$obj->getStyleFields();
36
+		$style=array_merge($style, $this->getStyleFromString($obj->getCustomStyle()));
37 37
 		if($obj->hasFont())
38
-			$style = array_merge($style, $this->getStyleFromString($obj->getFont()->toString()));
38
+			$style=array_merge($style, $this->getStyleFromString($obj->getFont()->toString()));
39 39
 		return $style;
40 40
 	}
41 41
 
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	protected function getStyleFromString($string)
47 47
 	{
48
-		$style = [];
48
+		$style=[];
49 49
 		if(!is_string($string)) return $style;
50 50
 
51 51
 		foreach(explode(';', $string) as $sub)
52 52
 		{
53
-			$arr = explode(':', $sub);
54
-			if(isset($arr[1]) && trim($arr[0]) !== '')
55
-				$style[trim($arr[0])] = trim($arr[1]);
53
+			$arr=explode(':', $sub);
54
+			if(isset($arr[1]) && trim($arr[0])!=='')
55
+				$style[trim($arr[0])]=trim($arr[1]);
56 56
 		}
57 57
 		return $style;
58 58
 	}
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	protected function getCssClassDiff()
64 64
 	{
65
-		if($this->_old === null)
65
+		if($this->_old===null)
66 66
 		{
67
-			return ($this->_new !== null) && $this->_new->hasCssClass()
67
+			return ($this->_new!==null) && $this->_new->hasCssClass()
68 68
 						? $this->_new->getCssClass() : null;
69 69
 		}
70 70
 		else
71 71
 		{
72
-			return $this->_old->getCssClass() !== $this->_new->getCssClass() ?
72
+			return $this->_old->getCssClass()!==$this->_new->getCssClass() ?
73 73
 				$this->_new->getCssClass() : null;
74 74
 		}
75 75
 	}
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	protected function getStyleDiff()
81 81
 	{
82
-		$diff = array_diff_assoc(
82
+		$diff=array_diff_assoc(
83 83
 					$this->getCombinedStyle($this->_new),
84 84
 					$this->getCombinedStyle($this->_old));
85 85
 		return count($diff) > 0 ? $diff : null;
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function getDifference()
92 92
 	{
93
-		if($this->_new === null)
93
+		if($this->_new===null)
94 94
 			return $this->_null;
95 95
 		else
96 96
 		{
97
-			$css = $this->getCssClassDiff();
98
-			$style = $this->getStyleDiff();
99
-			if(($css !== null) || ($style !== null))
97
+			$css=$this->getCssClassDiff();
98
+			$style=$this->getStyleDiff();
99
+			if(($css!==null) || ($style!==null))
100 100
 				return ['CssClass' => $css, 'Style' => $style];
101 101
 			else
102 102
 				$this->_null;
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveRadioButton.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	public function setText($value)
94 94
 	{
95
-		if(parent::getText() === $value)
95
+		if(parent::getText()===$value)
96 96
 			return;
97 97
 
98 98
 		parent::setText($value);
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function setChecked($value)
111 111
 	{
112
-		$value = TPropertyValue::ensureBoolean($value);
113
-		if(parent::getChecked() === $value)
112
+		$value=TPropertyValue::ensureBoolean($value);
113
+		if(parent::getChecked()===$value)
114 114
 			return;
115 115
 
116 116
 		parent::setChecked($value);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	protected function renderInputTag($writer, $clientID, $onclick)
136 136
 	{
137 137
 		parent::renderInputTag($writer, $clientID, $onclick);
138
-		if ($this->getAutoPostBack())
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
 
@@ -176,10 +176,10 @@  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 $this->getLabelAttributes()->itemAt('id');
181 181
 		else
182
-			return $this->getClientID() . '_label';
182
+			return $this->getClientID().'_label';
183 183
 	}
184 184
 }
185 185
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackErrorHandler.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -40,30 +40,30 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	protected function displayException($exception)
42 42
 	{
43
-		if($this->getApplication()->getMode() === TApplicationMode::Debug)
43
+		if($this->getApplication()->getMode()===TApplicationMode::Debug)
44 44
 		{
45
-			$response = $this->getApplication()->getResponse();
46
-			$trace = $this->getExceptionStackTrace($exception);
45
+			$response=$this->getApplication()->getResponse();
46
+			$trace=$this->getExceptionStackTrace($exception);
47 47
 			// avoid error on non-utf8 strings
48 48
 			try {
49
-				$trace = TJavaScript::jsonEncode($trace);
50
-			} catch (Exception $e) {
49
+				$trace=TJavaScript::jsonEncode($trace);
50
+			} catch(Exception $e) {
51 51
 				// strip everythin not 7bit ascii
52
-				$trace = preg_replace('/[^(\x20-\x7F)]*/', '', serialize($trace));
52
+				$trace=preg_replace('/[^(\x20-\x7F)]*/', '', serialize($trace));
53 53
 			}
54 54
 
55 55
 			// avoid exception loop if headers have already been sent
56 56
 			try {
57 57
 				$response->setStatusCode(500, 'Internal Server Error');
58
-			} catch (Exception $e) { }
58
+			} catch(Exception $e) { }
59 59
 
60
-			$content = $response->createHtmlWriter();
60
+			$content=$response->createHtmlWriter();
61 61
 			$content->getWriter()->setBoundary(TActivePageAdapter::CALLBACK_ERROR_HEADER);
62 62
 			$content->write($trace);
63 63
 		}
64 64
 		else
65 65
 		{
66
-			error_log("Error happened while processing an existing error:\n" . $exception->__toString());
66
+			error_log("Error happened while processing an existing error:\n".$exception->__toString());
67 67
 			header('HTTP/1.0 500 Internal Server Error', true, 500);
68 68
 		}
69 69
 		$this->getApplication()->getResponse()->flush();
@@ -75,24 +75,24 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	private function getExceptionStackTrace($exception)
77 77
 	{
78
-		$data['code'] = $exception->getCode() > 0 ? $exception->getCode() : 500;
79
-		$data['file'] = $exception->getFile();
80
-		$data['line'] = $exception->getLine();
81
-		$data['trace'] = $exception->getTrace();
78
+		$data['code']=$exception->getCode() > 0 ? $exception->getCode() : 500;
79
+		$data['file']=$exception->getFile();
80
+		$data['line']=$exception->getLine();
81
+		$data['trace']=$exception->getTrace();
82 82
 		if($exception instanceof TPhpErrorException)
83 83
 		{
84 84
 			// if PHP exception, we want to show the 2nd stack level context
85 85
 			// because the 1st stack level is of little use (it's in error handler)
86 86
 			if(isset($trace[0]) && isset($trace[0]['file']) && isset($trace[0]['line']))
87 87
 			{
88
-				$data['file'] = $trace[0]['file'];
89
-				$data['line'] = $trace[0]['line'];
88
+				$data['file']=$trace[0]['file'];
89
+				$data['line']=$trace[0]['line'];
90 90
 			}
91 91
 		}
92
-		$data['type'] = get_class($exception);
93
-		$data['message'] = $exception->getMessage();
94
-		$data['version'] = $_SERVER['SERVER_SOFTWARE'] . ' ' . Prado::getVersion();
95
-		$data['time'] = @strftime('%Y-%m-%d %H:%M', time());
92
+		$data['type']=get_class($exception);
93
+		$data['message']=$exception->getMessage();
94
+		$data['version']=$_SERVER['SERVER_SOFTWARE'].' '.Prado::getVersion();
95
+		$data['time']=@strftime('%Y-%m-%d %H:%M', time());
96 96
 		return $data;
97 97
 	}
98 98
 }
99 99
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveClientScript.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  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 50
 			if($this->getPage()->getIsCallback())
51 51
 			{
52
-				$cs = $this->getPage()->getClientScript();
53
-				$uniqueid = $this->ClientID . '_custom';
52
+				$cs=$this->getPage()->getClientScript();
53
+				$uniqueid=$this->ClientID.'_custom';
54 54
 				if(!$cs->isScriptFileRegistered($uniqueid))
55 55
 					$cs->registerScriptFile($uniqueid, $scriptUrl);
56 56
 			} else {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		{
70 70
 			if($this->getPage()->getIsCallback())
71 71
 			{
72
-				$extWriter = $this->getPage()->getResponse()->createHtmlWriter();
72
+				$extWriter=$this->getPage()->getResponse()->createHtmlWriter();
73 73
 				$extWriter->write("/*<![CDATA[*/\n");
74 74
 				$this->renderChildren($extWriter);
75 75
 				$extWriter->write("\n/*]]>*/");
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTemplateColumn.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
  */
37 37
 class TActiveTemplateColumn extends TTemplateColumn {
38 38
 	protected function initializeHeaderCell($cell, $columnIndex) {
39
-		$text = $this->getHeaderText();
39
+		$text=$this->getHeaderText();
40 40
 
41
-		if(($classPath = $this->getHeaderRenderer()) !== '') {
42
-			$control = Prado::createComponent($classPath);
41
+		if(($classPath=$this->getHeaderRenderer())!=='') {
42
+			$control=Prado::createComponent($classPath);
43 43
 			if($control instanceof \Prado\IDataRenderer) {
44 44
 				if($control instanceof IItemDataRenderer) {
45
-					$item = $cell->getParent();
45
+					$item=$cell->getParent();
46 46
 					$control->setItemIndex($item->getItemIndex());
47 47
 					$control->setItemType($item->getItemType());
48 48
 				}
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
51 51
 			$cell->getControls()->add($control);
52 52
 		}
53 53
 		elseif($this->getAllowSorting()) {
54
-				$sortExpression = $this->getSortExpression();
55
-				if(($url = $this->getHeaderImageUrl()) !== '') {
56
-					$button = new TActiveImageButton;
54
+				$sortExpression=$this->getSortExpression();
55
+				if(($url=$this->getHeaderImageUrl())!=='') {
56
+					$button=new TActiveImageButton;
57 57
 					$button->setImageUrl($url);
58 58
 					$button->setCommandName(TDataGrid::CMD_SORT);
59 59
 					$button->setCommandParameter($sortExpression);
60
-					if($text !== '')
60
+					if($text!=='')
61 61
 						$button->setAlternateText($text);
62 62
 					$button->setCausesValidation(false);
63 63
 					$cell->getControls()->add($button);
64 64
 				}
65
-				elseif($text !== '') {
66
-						$button = new TActiveLinkButton;
65
+				elseif($text!=='') {
66
+						$button=new TActiveLinkButton;
67 67
 						$button->setText($text);
68 68
 						$button->setCommandName(TDataGrid::CMD_SORT);
69 69
 						$button->setCommandParameter($sortExpression);
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 						$cell->setText('&nbsp;');
75 75
 			}
76 76
 			else {
77
-				if(($url = $this->getHeaderImageUrl()) !== '') {
78
-					$image = new TActiveImage;
77
+				if(($url=$this->getHeaderImageUrl())!=='') {
78
+					$image=new TActiveImage;
79 79
 					$image->setImageUrl($url);
80
-					if($text !== '')
80
+					if($text!=='')
81 81
 						$image->setAlternateText($text);
82 82
 					$cell->getControls()->add($image);
83 83
 				}
84
-				elseif($text !== '')
84
+				elseif($text!=='')
85 85
 						$cell->setText($text);
86 86
 					else
87 87
 						$cell->setText('&nbsp;');
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveCheckBoxColumn.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function initializeCell($cell, $columnIndex, $itemType)
47 47
 	{
48
-		if($itemType === TListItemType::Item || $itemType === TListItemType::AlternatingItem || $itemType === TListItemType::SelectedItem || $itemType === TListItemType::EditItem)
48
+		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
49 49
 		{
50
-			$checkBox = new TActiveCheckBox;
51
-			if($this->getReadOnly() || $itemType !== TListItemType::EditItem)
50
+			$checkBox=new TActiveCheckBox;
51
+			if($this->getReadOnly() || $itemType!==TListItemType::EditItem)
52 52
 				$checkBox->setEnabled(false);
53 53
 			$cell->setHorizontalAlign('Center');
54 54
 			$cell->getControls()->add($checkBox);
55 55
 			$cell->registerObject('CheckBox', $checkBox);
56
-			if($this->getDataField() !== '')
57
-				$checkBox->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']);
56
+			if($this->getDataField()!=='')
57
+				$checkBox->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']);
58 58
 		}
59 59
 		else
60 60
 			parent::initializeCell($cell, $columnIndex, $itemType);
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 
63 63
 	protected function initializeHeaderCell($cell, $columnIndex)
64 64
 	{
65
-		$text = $this->getHeaderText();
65
+		$text=$this->getHeaderText();
66 66
 
67
-		if(($classPath = $this->getHeaderRenderer()) !== '')
67
+		if(($classPath=$this->getHeaderRenderer())!=='')
68 68
 		{
69
-			$control = Prado::createComponent($classPath);
69
+			$control=Prado::createComponent($classPath);
70 70
 			if($control instanceof \Prado\IDataRenderer)
71 71
 			{
72 72
 				if($control instanceof IItemDataRenderer)
73 73
 				{
74
-					$item = $cell->getParent();
74
+					$item=$cell->getParent();
75 75
 					$control->setItemIndex($item->getItemIndex());
76 76
 					$control->setItemType($item->getItemType());
77 77
 				}
@@ -81,21 +81,21 @@  discard block
 block discarded – undo
81 81
 		}
82 82
 		elseif($this->getAllowSorting())
83 83
 		{
84
-			$sortExpression = $this->getSortExpression();
85
-			if(($url = $this->getHeaderImageUrl()) !== '')
84
+			$sortExpression=$this->getSortExpression();
85
+			if(($url=$this->getHeaderImageUrl())!=='')
86 86
 			{
87
-				$button = new TActiveImageButton;
87
+				$button=new TActiveImageButton;
88 88
 				$button->setImageUrl($url);
89 89
 				$button->setCommandName(TDataGrid::CMD_SORT);
90 90
 				$button->setCommandParameter($sortExpression);
91
-				if($text !== '')
91
+				if($text!=='')
92 92
 					$button->setAlternateText($text);
93 93
 				$button->setCausesValidation(false);
94 94
 				$cell->getControls()->add($button);
95 95
 			}
96
-			elseif($text !== '')
96
+			elseif($text!=='')
97 97
 			{
98
-				$button = new TActiveLinkButton;
98
+				$button=new TActiveLinkButton;
99 99
 				$button->setText($text);
100 100
 				$button->setCommandName(TDataGrid::CMD_SORT);
101 101
 				$button->setCommandParameter($sortExpression);
@@ -107,15 +107,15 @@  discard block
 block discarded – undo
107 107
 		}
108 108
 		else
109 109
 		{
110
-			if(($url = $this->getHeaderImageUrl()) !== '')
110
+			if(($url=$this->getHeaderImageUrl())!=='')
111 111
 			{
112
-				$image = new TActiveImage;
112
+				$image=new TActiveImage;
113 113
 				$image->setImageUrl($url);
114
-				if($text !== '')
114
+				if($text!=='')
115 115
 					$image->setAlternateText($text);
116 116
 				$cell->getControls()->add($image);
117 117
 			}
118
-			elseif($text !== '')
118
+			elseif($text!=='')
119 119
 				$cell->setText($text);
120 120
 			else
121 121
 				$cell->setText('&nbsp;');
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackPageStateTracker.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function __construct($control)
50 50
 	{
51
-		$this->_control = $control;
52
-		$this->_existingState = new TMap;
53
-		$this->_nullObject = new stdClass;
54
-		$this->_states = new TMap;
51
+		$this->_control=$control;
52
+		$this->_existingState=new TMap;
53
+		$this->_nullObject=new stdClass;
54
+		$this->_states=new TMap;
55 55
 		$this->addStatesToTrack();
56 56
 	}
57 57
 
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	protected function addStatesToTrack()
67 67
 	{
68
-		$states = $this->getStatesToTrack();
69
-		$states['Visible'] = ['TScalarDiff', [$this, 'updateVisible']];
70
-		$states['Enabled'] = ['TScalarDiff', [$this, 'updateEnabled']];
71
-		$states['Attributes'] = ['TMapCollectionDiff', [$this, 'updateAttributes']];
72
-		$states['Style'] = ['TStyleDiff', [$this, 'updateStyle']];
73
-		$states['TabIndex'] = ['TScalarDiff', [$this, 'updateTabIndex']];
74
-		$states['ToolTip'] = ['TScalarDiff', [$this, 'updateToolTip']];
75
-		$states['AccessKey'] = ['TScalarDiff', [$this, 'updateAccessKey']];
68
+		$states=$this->getStatesToTrack();
69
+		$states['Visible']=['TScalarDiff', [$this, 'updateVisible']];
70
+		$states['Enabled']=['TScalarDiff', [$this, 'updateEnabled']];
71
+		$states['Attributes']=['TMapCollectionDiff', [$this, 'updateAttributes']];
72
+		$states['Style']=['TStyleDiff', [$this, 'updateStyle']];
73
+		$states['TabIndex']=['TScalarDiff', [$this, 'updateTabIndex']];
74
+		$states['ToolTip']=['TScalarDiff', [$this, 'updateToolTip']];
75
+		$states['AccessKey']=['TScalarDiff', [$this, 'updateAccessKey']];
76 76
 	}
77 77
 
78 78
 	/**
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	{
92 92
 		foreach($this->_states as $name => $value)
93 93
 		{
94
-			$obj = $this->_control->getViewState($name);
95
-			$this->_existingState[$name] = is_object($obj) ? clone($obj) : $obj;
94
+			$obj=$this->_control->getViewState($name);
95
+			$this->_existingState[$name]=is_object($obj) ? clone($obj) : $obj;
96 96
 		}
97 97
 	}
98 98
 
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	protected function getChanges()
103 103
 	{
104
-		$changes = [];
104
+		$changes=[];
105 105
 		foreach($this->_states as $name => $details)
106 106
 		{
107
-			$new = $this->_control->getViewState($name);
108
-			$old = $this->_existingState[$name];
109
-			if($new !== $old)
107
+			$new=$this->_control->getViewState($name);
108
+			$old=$this->_existingState[$name];
109
+			if($new!==$old)
110 110
 			{
111
-				$diff = new $details[0]($new, $old, $this->_nullObject);
112
-				if(($change = $diff->getDifference()) !== $this->_nullObject)
113
-					$changes[] = [$details[1],[$change]];
111
+				$diff=new $details[0]($new, $old, $this->_nullObject);
112
+				if(($change=$diff->getDifference())!==$this->_nullObject)
113
+					$changes[]=[$details[1], [$change]];
114 114
 			}
115 115
 		}
116 116
 		return $changes;
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	protected function updateVisible($visible)
169 169
 	{
170
-		if($visible === false)
171
-			$this->client()->replaceContent($this->_control, "<span id=\"" . $this->_control->getClientID() . "\" style=\"display:none\" ></span>");
170
+		if($visible===false)
171
+			$this->client()->replaceContent($this->_control, "<span id=\"".$this->_control->getClientID()."\" style=\"display:none\" ></span>");
172 172
 		else
173 173
 			$this->client()->replaceContent($this->_control, $this->_control);
174 174
 	}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	protected function updateEnabled($enable)
181 181
 	{
182
-		$this->client()->setAttribute($this->_control, 'disabled', $enable === false);
182
+		$this->client()->setAttribute($this->_control, 'disabled', $enable===false);
183 183
 	}
184 184
 
185 185
 	/**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 */
189 189
 	protected function updateStyle($style)
190 190
 	{
191
-		if($style['CssClass'] !== null)
191
+		if($style['CssClass']!==null)
192 192
 			$this->client()->setAttribute($this->_control, 'class', $style['CssClass']);
193 193
 		if(is_array($style['Style']) && count($style['Style']) > 0)
194 194
 			$this->client()->setStyle($this->_control, $style['Style']);
Please login to merge, or discard this patch.