Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:58
created
framework/Web/UI/ActiveControls/TActivePanel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@
 block discarded – undo
77 77
 	 */
78 78
 	public function render($writer)
79 79
 	{
80
-		if($this->getHasPreRendered())
80
+		if ($this->getHasPreRendered())
81 81
 		{
82 82
 			parent::render($writer);
83
-			if($this->getActiveControl()->canUpdateClientSide())
83
+			if ($this->getActiveControl()->canUpdateClientSide())
84 84
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
85 85
 		}
86 86
 		else
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDataGridPager.php 1 patch
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.
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 1 patch
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.
framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
 	public function setInterval($value)
50 50
 	{
51 51
 		$interval = TPropertyValue::ensureFloat($value);
52
-		if($interval <= 0)
52
+		if ($interval <= 0)
53 53
 			throw new TConfigurationException('callback_interval_be_positive', $this->getID());
54 54
 
55
-		if($this->getInterval() === $value)
55
+		if ($this->getInterval() === $value)
56 56
 			return;
57 57
 
58 58
 		$this->setViewState('Interval', $interval, 1);
59
-		if ($this->getActiveControl()->canUpdateClientSide()){
59
+		if ($this->getActiveControl()->canUpdateClientSide()) {
60 60
 			$client = $this->getPage()->getCallbackClient();
61 61
 			$client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.setTimerInterval', [$this, $interval]);
62 62
 		}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		parent::render($writer);
118 118
 		$this->getActiveControl()->registerCallbackClientScript(
119 119
 			$this->getClientClassName(), $this->getTriggerOptions());
120
-		if($this->getStartTimerOnLoad()){
120
+		if ($this->getStartTimerOnLoad()) {
121 121
 			$id = $this->getClientID();
122 122
 			$code = "Prado.WebUI.TTimeTriggeredCallback.start('{$id}');";
123 123
 			$cs = $this->getPage()->getClientScript();
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveHyperLinkColumn.php 1 patch
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('&nbsp;');
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveClientScript.php 1 patch
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.
framework/Web/UI/ActiveControls/TActiveImageButton.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function setAlternateText($value)
64 64
 	{
65
-		if(parent::getAlternateText() === $value)
65
+		if (parent::getAlternateText() === $value)
66 66
 			return;
67 67
 
68 68
 		parent::setAlternateText($value);
69
-		if($this->getActiveControl()->canUpdateClientSide())
69
+		if ($this->getActiveControl()->canUpdateClientSide())
70 70
 			$this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value);
71 71
 	}
72 72
 
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setImageAlign($value)
81 81
 	{
82
-		if(parent::getImageAlign() === $value)
82
+		if (parent::getImageAlign() === $value)
83 83
 			return;
84 84
 
85 85
 		parent::setImageAlign($value);
86
-		if($this->getActiveControl()->canUpdateClientSide())
86
+		if ($this->getActiveControl()->canUpdateClientSide())
87 87
 			$this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value);
88 88
 	}
89 89
 
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	public function setImageUrl($value)
94 94
 	{
95
-		if(parent::getImageUrl() === $value)
95
+		if (parent::getImageUrl() === $value)
96 96
 			return;
97 97
 
98 98
 		parent::setImageUrl($value);
99
-		if($this->getActiveControl()->canUpdateClientSide())
99
+		if ($this->getActiveControl()->canUpdateClientSide())
100 100
 			$this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value);
101 101
 	}
102 102
 
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function setDescriptionUrl($value)
107 107
 	{
108
-		if(parent::getDescriptionUrl() === $value)
108
+		if (parent::getDescriptionUrl() === $value)
109 109
 			return;
110 110
 
111 111
 		parent::setDescriptionUrl($value);
112
-		if($this->getActiveControl()->canUpdateClientSide())
112
+		if ($this->getActiveControl()->canUpdateClientSide())
113 113
 			$this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value);
114 114
 	}
115 115
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDatePicker.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	/**
88 88
 	 * @return TBaseActiveCallbackControl standard callback control options.
89 89
 	 */
90
-	public function getActiveControl(){
90
+	public function getActiveControl() {
91 91
 		return $this->getAdapter()->getBaseActiveControl();
92 92
 	}
93 93
 
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
 	 * Client-side Text property can only be updated after the OnLoad stage.
96 96
 	 * @param string text content for the textbox
97 97
 	 */
98
-	public function setText($value){
99
-		if(parent::getText() === $value)
98
+	public function setText($value) {
99
+		if (parent::getText() === $value)
100 100
 			return;
101 101
 
102 102
 		parent::setText($value);
103
-		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){
103
+		if ($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) {
104 104
 			$cb = $this->getPage()->getCallbackClient();
105 105
 			$cb->setValue($this, $value);
106 106
 			if ($this->getInputMode() == TDatePickerInputMode::DropDownList)
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 				$dt = new \DateTime;
109 109
 				$dt->setTimeStamp($this->getTimeStampFromText());
110 110
 				$id = $this->getClientID();
111
-				$cb->select($id . TControl::CLIENT_ID_SEPARATOR . 'day', 'Value', $dt->format('j'), 'select');
112
-				$cb->select($id . TControl::CLIENT_ID_SEPARATOR . 'month', 'Value', $dt->format('n') - 1, 'select');
113
-				$cb->select($id . TControl::CLIENT_ID_SEPARATOR . 'year', 'Value', $dt->format('Y'), 'select');
111
+				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'day', 'Value', $dt->format('j'), 'select');
112
+				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $dt->format('n') - 1, 'select');
113
+				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'year', 'Value', $dt->format('Y'), 'select');
114 114
 
115 115
 			}
116 116
 		}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * This method is mainly used by framework and control developers.
123 123
 	 * @param TCallbackEventParameter the event parameter
124 124
 	 */
125
-	public function raiseCallbackEvent($param){
125
+	public function raiseCallbackEvent($param) {
126 126
 		$this->onCallback($param);
127 127
 	}
128 128
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * handler can be invoked.
134 134
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
135 135
 	 */
136
-	public function onCallback($param){
136
+	public function onCallback($param) {
137 137
 		$this->raiseEvent('OnCallback', $this, $param);
138 138
 	}
139 139
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	protected function renderClientControlScript($writer)
151 151
 	{
152 152
 		$cs = $this->getPage()->getClientScript();
153
-		if(!$cs->isEndScriptRegistered('TDatePicker.spacer'))
153
+		if (!$cs->isEndScriptRegistered('TDatePicker.spacer'))
154 154
 		{
155 155
 			$spacer = $this->getAssetUrl('spacer.gif');
156 156
 			$code = "Prado.WebUI.TDatePicker.spacer = '$spacer';";
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
 		$options = TJavaScript::encode($this->getDatePickerOptions());
161 161
 		$code = "new Prado.WebUI.TActiveDatePicker($options);";
162
-		$cs->registerEndScript("prado:" . $this->getClientID(), $code);
162
+		$cs->registerEndScript("prado:".$this->getClientID(), $code);
163 163
 	}
164 164
 
165 165
 	/**
Please login to merge, or discard this patch.