Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/UI/WebControls/TPanelStyle.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
 	protected function __getZappableSleepProps(&$exprops)
55 55
 	{
56 56
 		parent::__getZappableSleepProps($exprops);
57
-		if ($this->_backImageUrl===null)
58
-			$exprops[] = "\0TPanelStyle\0_backImageUrl";
59
-		if ($this->_direction===null)
60
-			$exprops[] = "\0TPanelStyle\0_direction";
61
-		if ($this->_horizontalAlign===null)
62
-			$exprops[] = "\0TPanelStyle\0_horizontalAlign";
63
-		if ($this->_scrollBars===null)
64
-			$exprops[] = "\0TPanelStyle\0_scrollBars";
65
-		if ($this->_wrap===null)
66
-			$exprops[] = "\0TPanelStyle\0_wrap";
57
+		if($this->_backImageUrl===null)
58
+			$exprops[]="\0TPanelStyle\0_backImageUrl";
59
+		if($this->_direction===null)
60
+			$exprops[]="\0TPanelStyle\0_direction";
61
+		if($this->_horizontalAlign===null)
62
+			$exprops[]="\0TPanelStyle\0_horizontalAlign";
63
+		if($this->_scrollBars===null)
64
+			$exprops[]="\0TPanelStyle\0_scrollBars";
65
+		if($this->_wrap===null)
66
+			$exprops[]="\0TPanelStyle\0_wrap";
67 67
 	}
68 68
 
69 69
 	/**
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
 	public function addAttributesToRender($writer)
75 75
 	{
76 76
 		if(($url=trim($this->getBackImageUrl()))!=='')
77
-			$this->setStyleField('background-image','url('.$url.')');
77
+			$this->setStyleField('background-image', 'url('.$url.')');
78 78
 
79 79
 		switch($this->getScrollBars())
80 80
 		{
81
-			case TScrollBars::Horizontal: $this->setStyleField('overflow-x','scroll'); break;
82
-			case TScrollBars::Vertical: $this->setStyleField('overflow-y','scroll'); break;
83
-			case TScrollBars::Both: $this->setStyleField('overflow','scroll'); break;
84
-			case TScrollBars::Auto: $this->setStyleField('overflow','auto'); break;
81
+			case TScrollBars::Horizontal: $this->setStyleField('overflow-x', 'scroll'); break;
82
+			case TScrollBars::Vertical: $this->setStyleField('overflow-y', 'scroll'); break;
83
+			case TScrollBars::Both: $this->setStyleField('overflow', 'scroll'); break;
84
+			case TScrollBars::Auto: $this->setStyleField('overflow', 'auto'); break;
85 85
 		}
86 86
 
87 87
 		if(($align=$this->getHorizontalAlign())!==THorizontalAlign::NotSet)
88
-			$this->setStyleField('text-align',strtolower($align));
88
+			$this->setStyleField('text-align', strtolower($align));
89 89
 
90 90
 		if(!$this->getWrap())
91
-			$this->setStyleField('white-space','nowrap');
91
+			$this->setStyleField('white-space', 'nowrap');
92 92
 
93 93
 		if(($direction=$this->getDirection())!==TContentDirection::NotSet)
94 94
 		{
95 95
 			if($direction===TContentDirection::LeftToRight)
96
-				$this->setStyleField('direction','ltr');
96
+				$this->setStyleField('direction', 'ltr');
97 97
 			else
98
-				$this->setStyleField('direction','rtl');
98
+				$this->setStyleField('direction', 'rtl');
99 99
 		}
100 100
 
101 101
 		parent::addAttributesToRender($writer);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function getBackImageUrl()
108 108
 	{
109
-		return $this->_backImageUrl===null?'':$this->_backImageUrl;
109
+		return $this->_backImageUrl===null ? '' : $this->_backImageUrl;
110 110
 	}
111 111
 
112 112
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function getDirection()
125 125
 	{
126
-		return $this->_direction===null?TContentDirection::NotSet:$this->_direction;
126
+		return $this->_direction===null ? TContentDirection::NotSet : $this->_direction;
127 127
 	}
128 128
 
129 129
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function setDirection($value)
133 133
 	{
134
-		$this->_direction=TPropertyValue::ensureEnum($value,'TContentDirection');
134
+		$this->_direction=TPropertyValue::ensureEnum($value, 'TContentDirection');
135 135
 	}
136 136
 
137 137
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function getWrap()
141 141
 	{
142
-		return $this->_wrap===null?true:$this->_wrap;
142
+		return $this->_wrap===null ? true : $this->_wrap;
143 143
 	}
144 144
 
145 145
 	/**
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public function getHorizontalAlign()
158 158
 	{
159
-		return $this->_horizontalAlign===null?THorizontalAlign::NotSet:$this->_horizontalAlign;
159
+		return $this->_horizontalAlign===null ? THorizontalAlign::NotSet : $this->_horizontalAlign;
160 160
 	}
161 161
 
162 162
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public function setHorizontalAlign($value)
167 167
 	{
168
-		$this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign');
168
+		$this->_horizontalAlign=TPropertyValue::ensureEnum($value, 'THorizontalAlign');
169 169
 	}
170 170
 
171 171
 	/**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	public function getScrollBars()
175 175
 	{
176
-		return $this->_scrollBars===null?TScrollBars::None:$this->_scrollBars;
176
+		return $this->_scrollBars===null ? TScrollBars::None : $this->_scrollBars;
177 177
 	}
178 178
 
179 179
 	/**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function setScrollBars($value)
183 183
 	{
184
-		$this->_scrollBars=TPropertyValue::ensureEnum($value,'TScrollBars');
184
+		$this->_scrollBars=TPropertyValue::ensureEnum($value, 'TScrollBars');
185 185
 	}
186 186
 
187 187
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TReCaptchaValidator.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class TReCaptchaValidator extends TBaseValidator
32 32
 {
33
-	protected $_isvalid = null;
33
+	protected $_isvalid=null;
34 34
 
35 35
 	/**
36 36
 	 * Gets the name of the javascript class responsible for performing validation for this control.
@@ -49,18 +49,18 @@  discard block
 block discarded – undo
49 49
 
50 50
 	protected function getCaptchaControl()
51 51
 	{
52
-		$control = $this->getValidationTarget();
53
-		if (!$control)
52
+		$control=$this->getValidationTarget();
53
+		if(!$control)
54 54
 			throw new Exception('No target control specified for TReCaptchaValidator');
55
-		if (!($control instanceof TReCaptcha))
55
+		if(!($control instanceof TReCaptcha))
56 56
 			throw new Exception('TReCaptchaValidator only works with TReCaptcha controls');
57 57
 		return $control;
58 58
 	}
59 59
 
60 60
 	public function getClientScriptOptions()
61 61
 	{
62
-		$options = parent::getClientScriptOptions();
63
-		$options['ResponseFieldName'] = $this->getCaptchaControl()->getResponseFieldName();
62
+		$options=parent::getClientScriptOptions();
63
+		$options['ResponseFieldName']=$this->getCaptchaControl()->getResponseFieldName();
64 64
 		return $options;
65 65
 	}
66 66
 
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 	protected function evaluateIsValid()
75 75
 	{
76 76
 		// check validity only once (if trying to evaulate multiple times, all redundant checks would fail)
77
-		if (is_null($this->_isvalid))
77
+		if(is_null($this->_isvalid))
78 78
 		{
79
-			$control = $this->getCaptchaControl();
80
-			$this->_isvalid = $control->validate();
79
+			$control=$this->getCaptchaControl();
80
+			$this->_isvalid=$control->validate();
81 81
 		}
82 82
 		return ($this->_isvalid==true);
83 83
 	}
@@ -86,23 +86,23 @@  discard block
 block discarded – undo
86 86
 	{
87 87
 		parent::onPreRender($param);
88 88
 
89
-		$cs = $this->Page->getClientScript();
89
+		$cs=$this->Page->getClientScript();
90 90
 		$cs->registerPradoScript('validator');
91 91
 
92 92
 		// communicate validation status to the client side
93
-		$value = $this->_isvalid===false ? '0' : '1';
94
-		$cs->registerHiddenField($this->getClientID().'_1',$value);
93
+		$value=$this->_isvalid===false ? '0' : '1';
94
+		$cs->registerHiddenField($this->getClientID().'_1', $value);
95 95
 		
96 96
 		// update validator display
97
-		if ($control = $this->getValidationTarget())
97
+		if($control=$this->getValidationTarget())
98 98
 		{
99
-			$fn = 'captchaUpdateValidatorStatus_'.$this->getClientID();
99
+			$fn='captchaUpdateValidatorStatus_'.$this->getClientID();
100 100
 
101 101
 			// check if we need to request a new captcha too
102
-			if ($this->Page->IsCallback)
102
+			if($this->Page->IsCallback)
103 103
 			{
104
-				if ($control->getVisible(true))
105
-					if (!is_null($this->_isvalid))
104
+				if($control->getVisible(true))
105
+					if(!is_null($this->_isvalid))
106 106
 					{
107 107
 						// if the response has been tested and we reach the pre-render phase 
108 108
 						// then we need to regenerate the token, because it won't test positive
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 					}
113 113
 			}
114 114
 
115
-			$cs->registerEndScript($this->getClientID().'::validate', implode(' ',array(
115
+			$cs->registerEndScript($this->getClientID().'::validate', implode(' ', array(
116 116
 				// this function will be used to update the validator
117 117
 				'function '.$fn.'(valid)',
118 118
 				'{',
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TJavascriptLogger.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class TJavascriptLogger extends TWebControl
32 32
 {
33
-	private static $_keyCodes = array(
33
+	private static $_keyCodes=array(
34 34
 		'0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57,
35 35
 		'a'=>65, 'b'=>66, 'c'=>67, 'd'=>68, 'e'=>69, 'f'=>70, 'g'=>71, 'h'=>72,
36 36
 		'i'=>73, 'j'=>74, 'k'=>75, 'l'=>76, 'm'=>77, 'n'=>78, 'o'=>79, 'p'=>80,
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function onPreRender($param)
68 68
 	{
69
-		$key = strtolower($this->getToggleKey());
70
-		$code = isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74;
71
-		$js = "var logConsole; jQuery(function() { logConsole = new LogConsole($code)}); ";
72
-		$cs = $this->getPage()->getClientScript();
73
-		$cs->registerBeginScript($this->getClientID(),$js);
69
+		$key=strtolower($this->getToggleKey());
70
+		$code=isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74;
71
+		$js="var logConsole; jQuery(function() { logConsole = new LogConsole($code)}); ";
72
+		$cs=$this->getPage()->getClientScript();
73
+		$cs->registerBeginScript($this->getClientID(), $js);
74 74
 		$cs->registerPradoScript('logger');
75 75
 	}
76 76
 
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	public function renderContents($writer)
83 83
 	{
84
-		$code = strtoupper($this->getToggleKey());
85
-		$info = '(<a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/" target="_blank">more info</a>).';
86
-		$link = '<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>';
87
-		$usage = 'Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to';
84
+		$code=strtoupper($this->getToggleKey());
85
+		$info='(<a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/" target="_blank">more info</a>).';
86
+		$link='<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>';
87
+		$usage='Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to';
88 88
 		$writer->write("{$usage} {$link} {$info}");
89 89
 	}
90 90
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TImage.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	protected function addAttributesToRender($writer)
41 41
 	{
42
-		$writer->addAttribute('src',$this->getImageUrl());
43
-		$writer->addAttribute('alt',$this->getAlternateText());
42
+		$writer->addAttribute('src', $this->getImageUrl());
43
+		$writer->addAttribute('alt', $this->getAlternateText());
44 44
 		if(($desc=$this->getDescriptionUrl())!=='')
45
-			$writer->addAttribute('longdesc',$desc);
45
+			$writer->addAttribute('longdesc', $desc);
46 46
 		if(($align=$this->getImageAlign())!=='')
47
-			$writer->addAttribute('align',$align);
47
+			$writer->addAttribute('align', $align);
48 48
 		parent::addAttributesToRender($writer);
49 49
 	}
50 50
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function getAlternateText()
64 64
 	{
65
-		return $this->getViewState('AlternateText','');
65
+		return $this->getViewState('AlternateText', '');
66 66
 	}
67 67
 
68 68
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function setAlternateText($value)
73 73
 	{
74
-		$this->setViewState('AlternateText',$value,'');
74
+		$this->setViewState('AlternateText', $value, '');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function getImageAlign()
81 81
 	{
82
-		return $this->getViewState('ImageAlign','');
82
+		return $this->getViewState('ImageAlign', '');
83 83
 	}
84 84
 
85 85
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function setImageAlign($value)
93 93
 	{
94
-		$this->setViewState('ImageAlign',$value,'');
94
+		$this->setViewState('ImageAlign', $value, '');
95 95
 	}
96 96
 
97 97
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function getImageUrl()
101 101
 	{
102
-		return $this->getViewState('ImageUrl','');
102
+		return $this->getViewState('ImageUrl', '');
103 103
 	}
104 104
 
105 105
 	/**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 */
108 108
 	public function setImageUrl($value)
109 109
 	{
110
-		$this->setViewState('ImageUrl',$value,'');
110
+		$this->setViewState('ImageUrl', $value, '');
111 111
 	}
112 112
 
113 113
 	/**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	public function getDescriptionUrl()
143 143
 	{
144
-		return $this->getViewState('DescriptionUrl','');
144
+		return $this->getViewState('DescriptionUrl', '');
145 145
 	}
146 146
 
147 147
 	/**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function setDescriptionUrl($value)
151 151
 	{
152
-		$this->setViewState('DescriptionUrl',$value,'');
152
+		$this->setViewState('DescriptionUrl', $value, '');
153 153
 	}
154 154
 }
155 155
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TContent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	{
40 40
 		if(($id=$this->getID())==='')
41 41
 			throw new TConfigurationException('content_id_required');
42
-		$this->getTemplateControl()->registerContent($id,$this);
42
+		$this->getTemplateControl()->registerContent($id, $this);
43 43
 	}
44 44
 }
45 45
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRadioButtonList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@
 block discarded – undo
57 57
 	 * @param array the input data collection
58 58
 	 * @return boolean whether the data of the control has been changed
59 59
 	 */
60
-	public function loadPostData($key,$values)
60
+	public function loadPostData($key, $values)
61 61
 	{
62
-		$value=isset($values[$key])?$values[$key]:'';
62
+		$value=isset($values[$key]) ? $values[$key] : '';
63 63
 		$oldSelection=$this->getSelectedIndex();
64 64
 		$this->ensureDataBound();
65 65
 		foreach($this->getItems() as $index=>$item)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TValidationSummary.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function getDisplay()
56 56
 	{
57
-		return $this->getViewState('Display',TValidationSummaryDisplayStyle::Fixed);
57
+		return $this->getViewState('Display', TValidationSummaryDisplayStyle::Fixed);
58 58
 	}
59 59
 
60 60
 	/**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function setDisplay($value)
64 64
 	{
65
-		$this->setViewState('Display',TPropertyValue::ensureEnum($value,'TValidationSummaryDisplayStyle'),TValidationSummaryDisplayStyle::Fixed);
65
+		$this->setViewState('Display', TPropertyValue::ensureEnum($value, 'TValidationSummaryDisplayStyle'), TValidationSummaryDisplayStyle::Fixed);
66 66
 	}
67 67
 
68 68
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function getHeaderText()
72 72
 	{
73
-		return $this->getViewState('HeaderText','');
73
+		return $this->getViewState('HeaderText', '');
74 74
 	}
75 75
 
76 76
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setHeaderText($value)
81 81
 	{
82
-		$this->setViewState('HeaderText',$value,'');
82
+		$this->setViewState('HeaderText', $value, '');
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getDisplayMode()
89 89
 	{
90
-		return $this->getViewState('DisplayMode',TValidationSummaryDisplayMode::BulletList);
90
+		return $this->getViewState('DisplayMode', TValidationSummaryDisplayMode::BulletList);
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setDisplayMode($value)
97 97
 	{
98
-		$this->setViewState('DisplayMode',TPropertyValue::ensureEnum($value,'TValidationSummaryDisplayMode'),TValidationSummaryDisplayMode::BulletList);
98
+		$this->setViewState('DisplayMode', TPropertyValue::ensureEnum($value, 'TValidationSummaryDisplayMode'), TValidationSummaryDisplayMode::BulletList);
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function getEnableClientScript()
105 105
 	{
106
-		return $this->getViewState('EnableClientScript',true);
106
+		return $this->getViewState('EnableClientScript', true);
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setEnableClientScript($value)
113 113
 	{
114
-		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
114
+		$this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true);
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getShowMessageBox()
121 121
 	{
122
-		return $this->getViewState('ShowMessageBox',false);
122
+		return $this->getViewState('ShowMessageBox', false);
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function setShowMessageBox($value)
129 129
 	{
130
-		$this->setViewState('ShowMessageBox',TPropertyValue::ensureBoolean($value),false);
130
+		$this->setViewState('ShowMessageBox', TPropertyValue::ensureBoolean($value), false);
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getShowSummary()
137 137
 	{
138
-		return $this->getViewState('ShowSummary',true);
138
+		return $this->getViewState('ShowSummary', true);
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setShowSummary($value)
145 145
 	{
146
-		$this->setViewState('ShowSummary',TPropertyValue::ensureBoolean($value),true);
146
+		$this->setViewState('ShowSummary', TPropertyValue::ensureBoolean($value), true);
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getScrollToSummary()
153 153
 	{
154
-		return $this->getViewState('ScrollToSummary',true);
154
+		return $this->getViewState('ScrollToSummary', true);
155 155
 	}
156 156
 
157 157
 	/**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	public function setScrollToSummary($value)
161 161
 	{
162
-		$this->setViewState('ScrollToSummary',TPropertyValue::ensureBoolean($value),true);
162
+		$this->setViewState('ScrollToSummary', TPropertyValue::ensureBoolean($value), true);
163 163
 	}
164 164
 
165 165
 	/**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	public function getShowAnchor()
169 169
 	{
170
-		return $this->getViewState('ShowAnchor',false);
170
+		return $this->getViewState('ShowAnchor', false);
171 171
 	}
172 172
 
173 173
 	/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public function setShowAnchor($value)
177 177
 	{
178
-		$this->setViewState('ShowAnchor',TPropertyValue::ensureBoolean($value),false);
178
+		$this->setViewState('ShowAnchor', TPropertyValue::ensureBoolean($value), false);
179 179
 	}
180 180
 
181 181
 	/**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	 */
202 202
 	public function getValidationGroup()
203 203
 	{
204
-		return $this->getViewState('ValidationGroup','');
204
+		return $this->getViewState('ValidationGroup', '');
205 205
 	}
206 206
 
207 207
 	/**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function setValidationGroup($value)
211 211
 	{
212
-		$this->setViewState('ValidationGroup',$value,'');
212
+		$this->setViewState('ValidationGroup', $value, '');
213 213
 	}
214 214
 
215 215
 	protected function addAttributesToRender($writer)
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
 		if(!$visible)
220 220
 		{
221 221
 			if($display===TValidationSummaryDisplayStyle::None || $display===TValidationSummaryDisplayStyle::Dynamic)
222
-				$writer->addStyleAttribute('display','none');
222
+				$writer->addStyleAttribute('display', 'none');
223 223
 			else
224
-				$writer->addStyleAttribute('visibility','hidden');
224
+				$writer->addStyleAttribute('visibility', 'hidden');
225 225
 		}
226
-		$writer->addAttribute('id',$this->getClientID());
226
+		$writer->addAttribute('id', $this->getClientID());
227 227
 		parent::addAttributesToRender($writer);
228 228
 	}
229 229
 
@@ -235,23 +235,23 @@  discard block
 block discarded – undo
235 235
 	{
236 236
 		if(!$this->getEnabled(true) || !$this->getEnableClientScript())
237 237
 			return;
238
-		$cs = $this->getPage()->getClientScript();
238
+		$cs=$this->getPage()->getClientScript();
239 239
 		$cs->registerPradoScript('validator');
240 240
 
241 241
 		//need to register the validation manager is validation summary is alone.
242 242
 		$formID=$this->getPage()->getForm()->getClientID();
243
-		$scriptKey = "TBaseValidator:$formID";
243
+		$scriptKey="TBaseValidator:$formID";
244 244
 		if($this->getEnableClientScript() && !$cs->isEndScriptRegistered($scriptKey))
245 245
 		{
246
-			$manager['FormID'] = $formID;
247
-			$options = TJavaScript::encode($manager);
246
+			$manager['FormID']=$formID;
247
+			$options=TJavaScript::encode($manager);
248 248
 			$cs->registerPradoScript('validator');
249 249
 			$cs->registerEndScript($scriptKey, "new Prado.ValidationManager({$options});");
250 250
 		}
251 251
 
252 252
 
253 253
 		$options=TJavaScript::encode($this->getClientScriptOptions());
254
-		$script = "new Prado.WebUI.TValidationSummary({$options});";
254
+		$script="new Prado.WebUI.TValidationSummary({$options});";
255 255
 		$cs->registerEndScript($this->getClientID(), $script);
256 256
 	}
257 257
 
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
 	 */
262 262
 	protected function getClientScriptOptions()
263 263
 	{
264
-		$options['ID'] = $this->getClientID();
265
-		$options['FormID'] = $this->getPage()->getForm()->getClientID();
264
+		$options['ID']=$this->getClientID();
265
+		$options['FormID']=$this->getPage()->getForm()->getClientID();
266 266
 		if($this->getShowMessageBox())
267 267
 			$options['ShowMessageBox']=true;
268 268
 		if(!$this->getShowSummary())
@@ -272,12 +272,12 @@  discard block
 block discarded – undo
272 272
 		$options['HeaderText']=$this->getHeaderText();
273 273
 		$options['DisplayMode']=$this->getDisplayMode();
274 274
 
275
-		$options['Refresh'] = $this->getAutoUpdate();
276
-		$options['ValidationGroup'] =  $this->getValidationGroup();
277
-		$options['Display'] = $this->getDisplay();
275
+		$options['Refresh']=$this->getAutoUpdate();
276
+		$options['ValidationGroup']=$this->getValidationGroup();
277
+		$options['Display']=$this->getDisplay();
278 278
 
279 279
 		if($this->_clientSide!==null)
280
-			$options = array_merge($options,$this->_clientSide->getOptions()->toArray());
280
+			$options=array_merge($options, $this->_clientSide->getOptions()->toArray());
281 281
 
282 282
 		return $options;
283 283
 	}
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 	public function getClientSide()
290 290
 	{
291 291
 		if($this->_clientSide===null)
292
-			$this->_clientSide = $this->createClientScript();
292
+			$this->_clientSide=$this->createClientScript();
293 293
 		return $this->_clientSide;
294 294
 	}
295 295
 
@@ -308,12 +308,12 @@  discard block
 block discarded – undo
308 308
 	protected function getErrorMessages()
309 309
 	{
310 310
 		$validators=$this->getPage()->getValidators($this->getValidationGroup());
311
-		$messages = array();
311
+		$messages=array();
312 312
 		foreach($validators as $validator)
313 313
 		{
314 314
 			if(!$validator->getIsValid() && ($msg=$validator->getErrorMessage())!=='')
315 315
 				//$messages[] = $validator->getAnchoredMessage($msg);
316
-				$messages[] = $msg;
316
+				$messages[]=$msg;
317 317
 		}
318 318
 		return $messages;
319 319
 	}
@@ -356,9 +356,9 @@  discard block
 block discarded – undo
356 356
 	{
357 357
 		$header=$this->getHeaderText();
358 358
 		$messages=$this->getErrorMessages();
359
-		$content = '';
359
+		$content='';
360 360
 		if(strlen($header))
361
-			$content.= $header."<br/>\n";
361
+			$content.=$header."<br/>\n";
362 362
 		foreach($messages as $message)
363 363
 			$content.="$message<br/>\n";
364 364
 		$writer->write($content);
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
 	{
375 375
 		$header=$this->getHeaderText();
376 376
 		$messages=$this->getErrorMessages();
377
-		$content = $header;
377
+		$content=$header;
378 378
 		foreach($messages as $message)
379
-			$content.= ' '.$message;
379
+			$content.=' '.$message;
380 380
 		$writer->write($content);
381 381
 	}
382 382
 
@@ -390,13 +390,13 @@  discard block
 block discarded – undo
390 390
 	{
391 391
 		$header=$this->getHeaderText();
392 392
 		$messages=$this->getErrorMessages();
393
-		$content = $header;
394
-		if(count($messages)>0)
393
+		$content=$header;
394
+		if(count($messages) > 0)
395 395
 		{
396
-			$content .= "<ul>\n";
396
+			$content.="<ul>\n";
397 397
 			foreach($messages as $message)
398
-				$content.= '<li>'.$message."</li>\n";
399
-			$content .= "</ul>\n";
398
+				$content.='<li>'.$message."</li>\n";
399
+			$content.="</ul>\n";
400 400
 		}
401 401
 		$writer->write($content);
402 402
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataGridPagerStyle.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -41,24 +41,24 @@  discard block
 block discarded – undo
41 41
 	protected function __getZappableSleepProps(&$exprops)
42 42
 	{
43 43
 		parent::__getZappableSleepProps($exprops);
44
-		if ($this->_mode===null)
45
-			$exprops[] = "\0TDataGridPagerStyle\0_mode";
46
-		if ($this->_nextText===null)
47
-			$exprops[] = "\0TDataGridPagerStyle\0_nextText";
48
-		if ($this->_prevText===null)
49
-			$exprops[] = "\0TDataGridPagerStyle\0_prevText";
50
-		if ($this->_firstText===null)
51
-			$exprops[] = "\0TDataGridPagerStyle\0_firstText";
52
-		if ($this->_lastText===null)
53
-			$exprops[] = "\0TDataGridPagerStyle\0_lastText";
54
-		if ($this->_buttonCount===null)
55
-			$exprops[] = "\0TDataGridPagerStyle\0_buttonCount";
56
-		if ($this->_position===null)
57
-			$exprops[] = "\0TDataGridPagerStyle\0_position";
58
-		if ($this->_visible===null)
59
-			$exprops[] = "\0TDataGridPagerStyle\0_visible";
60
-		if ($this->_buttonType===null)
61
-			$exprops[] = "\0TDataGridPagerStyle\0_buttonType";
44
+		if($this->_mode===null)
45
+			$exprops[]="\0TDataGridPagerStyle\0_mode";
46
+		if($this->_nextText===null)
47
+			$exprops[]="\0TDataGridPagerStyle\0_nextText";
48
+		if($this->_prevText===null)
49
+			$exprops[]="\0TDataGridPagerStyle\0_prevText";
50
+		if($this->_firstText===null)
51
+			$exprops[]="\0TDataGridPagerStyle\0_firstText";
52
+		if($this->_lastText===null)
53
+			$exprops[]="\0TDataGridPagerStyle\0_lastText";
54
+		if($this->_buttonCount===null)
55
+			$exprops[]="\0TDataGridPagerStyle\0_buttonCount";
56
+		if($this->_position===null)
57
+			$exprops[]="\0TDataGridPagerStyle\0_position";
58
+		if($this->_visible===null)
59
+			$exprops[]="\0TDataGridPagerStyle\0_visible";
60
+		if($this->_buttonType===null)
61
+			$exprops[]="\0TDataGridPagerStyle\0_buttonType";
62 62
 	}
63 63
 
64 64
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function getMode()
68 68
 	{
69
-		return $this->_mode===null?TDataGridPagerMode::NextPrev : $this->_mode;
69
+		return $this->_mode===null ? TDataGridPagerMode::NextPrev : $this->_mode;
70 70
 	}
71 71
 
72 72
 	/**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function setMode($value)
76 76
 	{
77
-		$this->_mode=TPropertyValue::ensureEnum($value,'TDataGridPagerMode');
77
+		$this->_mode=TPropertyValue::ensureEnum($value, 'TDataGridPagerMode');
78 78
 	}
79 79
 
80 80
 	/**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function getButtonType()
84 84
 	{
85
-		return $this->_buttonType===null?TDataGridPagerButtonType::LinkButton:$this->_buttonType;
85
+		return $this->_buttonType===null ? TDataGridPagerButtonType::LinkButton : $this->_buttonType;
86 86
 	}
87 87
 
88 88
 	/**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function setButtonType($value)
92 92
 	{
93
-		$this->_buttonType=TPropertyValue::ensureEnum($value,'TDataGridPagerButtonType');
93
+		$this->_buttonType=TPropertyValue::ensureEnum($value, 'TDataGridPagerButtonType');
94 94
 	}
95 95
 
96 96
 	/**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function getNextPageText()
100 100
 	{
101
-		return $this->_nextText===null?'>':$this->_nextText;
101
+		return $this->_nextText===null ? '>' : $this->_nextText;
102 102
 	}
103 103
 
104 104
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function getPrevPageText()
116 116
 	{
117
-		return $this->_prevText===null?'<':$this->_prevText;
117
+		return $this->_prevText===null ? '<' : $this->_prevText;
118 118
 	}
119 119
 
120 120
 	/**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function getFirstPageText()
132 132
 	{
133
-		return $this->_firstText===null?'<<':$this->_firstText;
133
+		return $this->_firstText===null ? '<<' : $this->_firstText;
134 134
 	}
135 135
 
136 136
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function getLastPageText()
148 148
 	{
149
-		return $this->_lastText===null?'>>':$this->_lastText;
149
+		return $this->_lastText===null ? '>>' : $this->_lastText;
150 150
 	}
151 151
 
152 152
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	public function getPageButtonCount()
164 164
 	{
165
-		return $this->_buttonCount===null?10:$this->_buttonCount;
165
+		return $this->_buttonCount===null ? 10 : $this->_buttonCount;
166 166
 	}
167 167
 
168 168
 	/**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public function setPageButtonCount($value)
173 173
 	{
174
-		if(($value=TPropertyValue::ensureInteger($value))<1)
174
+		if(($value=TPropertyValue::ensureInteger($value)) < 1)
175 175
 			throw new TInvalidDataValueException('datagridpagerstyle_pagebuttoncount_invalid');
176 176
 		$this->_buttonCount=$value;
177 177
 	}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function getPosition()
183 183
 	{
184
-		return $this->_position===null?TDataGridPagerPosition::Bottom:$this->_position;
184
+		return $this->_position===null ? TDataGridPagerPosition::Bottom : $this->_position;
185 185
 	}
186 186
 
187 187
 	/**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	 */
190 190
 	public function setPosition($value)
191 191
 	{
192
-		$this->_position=TPropertyValue::ensureEnum($value,'TDataGridPagerPosition');
192
+		$this->_position=TPropertyValue::ensureEnum($value, 'TDataGridPagerPosition');
193 193
 	}
194 194
 
195 195
 	/**
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function getVisible()
199 199
 	{
200
-		return $this->_visible===null?true:$this->_visible;
200
+		return $this->_visible===null ? true : $this->_visible;
201 201
 	}
202 202
 
203 203
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TClientScript.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	public function onPreRender($param)
106 106
 	{
107 107
 		parent::onPreRender($param);
108
-		$scripts = preg_split('/,|\s+/', $this->getPradoScripts());
109
-		$cs = $this->getPage()->getClientScript();
108
+		$scripts=preg_split('/,|\s+/', $this->getPradoScripts());
109
+		$cs=$this->getPage()->getClientScript();
110 110
 		foreach($scripts as $script)
111 111
 		{
112
-			if(($script = trim($script))!=='')
112
+			if(($script=trim($script))!=='')
113 113
 				$cs->registerPradoScript($script);
114 114
 		}
115 115
 	}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function render($writer)
124 124
 	{
125
-		if ($this->getFlushScriptFiles())
125
+		if($this->getFlushScriptFiles())
126 126
 			$this->getPage()->getClientScript()->flushScriptFiles($writer, $this);
127 127
 		$this->renderCustomScriptFile($writer);
128 128
 		$this->renderCustomScript($writer);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	protected function renderCustomScriptFile($writer)
136 136
 	{
137
-		if(($scriptUrl = $this->getScriptUrl())!=='')
137
+		if(($scriptUrl=$this->getScriptUrl())!=='')
138 138
 			$writer->write("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n");
139 139
 	}
140 140
 
Please login to merge, or discard this patch.