Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Collections/TPagedList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -250,12 +250,12 @@  discard block
 block discarded – undo
250 250
 		if($this->_customPaging)
251 251
 		{
252 252
 			if($this->_virtualCount >= 0)
253
-				return (int)(($this->_virtualCount + $this->_pageSize - 1) / $this->_pageSize);
253
+				return (int) (($this->_virtualCount + $this->_pageSize - 1) / $this->_pageSize);
254 254
 			else
255 255
 				return -1;
256 256
 		}
257 257
 		else
258
-			return (int)((parent::getCount() + $this->_pageSize - 1) / $this->_pageSize);
258
+			return (int) ((parent::getCount() + $this->_pageSize - 1) / $this->_pageSize);
259 259
 	}
260 260
 
261 261
 	/**
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	public function indexOf($item)
327 327
 	{
328 328
 		$c = $this->getCount();
329
-		for($i = 0;$i < $c;++$i)
329
+		for($i = 0; $i < $c; ++$i)
330 330
 			if($this->itemAt($i) === $item)
331 331
 				return $i;
332 332
 		return -1;
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 	{
363 363
 		$c = $this->getCount();
364 364
 		$array = [];
365
-		for($i = 0;$i < $c;++$i)
365
+		for($i = 0; $i < $c; ++$i)
366 366
 			$array[$i] = $this->itemAt($i);
367 367
 		return $array;
368 368
 	}
Please login to merge, or discard this patch.
framework/Collections/TAttributeCollection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	protected function _getZappableSleepProps(&$exprops)
53 53
 	{
54 54
 		parent::_getZappableSleepProps($exprops);
55
-		if ($this->_caseSensitive === false)
55
+		if($this->_caseSensitive === false)
56 56
 			$exprops[] = "\0Prado\Collections\TAttributeCollection\0_caseSensitive";
57 57
 	}
58 58
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function __get($name)
68 68
 	{
69
-		return $this->contains($name)?$this->itemAt($name):parent::__get($name);
69
+		return $this->contains($name) ? $this->itemAt($name) : parent::__get($name);
70 70
 	}
71 71
 
72 72
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function itemAt($key)
108 108
 	{
109
-		return parent::itemAt($this->_caseSensitive?$key:strtolower($key));
109
+		return parent::itemAt($this->_caseSensitive ? $key : strtolower($key));
110 110
 	}
111 111
 
112 112
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function add($key, $value)
120 120
 	{
121
-		parent::add($this->_caseSensitive?$key:strtolower($key), $value);
121
+		parent::add($this->_caseSensitive ? $key : strtolower($key), $value);
122 122
 	}
123 123
 
124 124
 	/**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function remove($key)
131 131
 	{
132
-		return parent::remove($this->_caseSensitive?$key:strtolower($key));
132
+		return parent::remove($this->_caseSensitive ? $key : strtolower($key));
133 133
 	}
134 134
 
135 135
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public function contains($key)
142 142
 	{
143
-		return parent::contains($this->_caseSensitive?$key:strtolower($key));
143
+		return parent::contains($this->_caseSensitive ? $key : strtolower($key));
144 144
 	}
145 145
 
146 146
 	/**
Please login to merge, or discard this patch.
framework/Web/Services/TFeedService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 				{
120 120
 					$feed = Prado::createComponent($feedConfig['class']);
121 121
 					if($service instanceof IFeedContentProvider)
122
-						$properties = isset($feedConfig['properties'])?$feedConfig['properties']:[];
122
+						$properties = isset($feedConfig['properties']) ? $feedConfig['properties'] : [];
123 123
 					else
124 124
 						throw new TConfigurationException('jsonservice_response_type_invalid', $id);
125 125
 				}
Please login to merge, or discard this patch.
framework/Web/Services/TSoapService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			{
171 171
 				foreach($config['soap'] as $id => $server)
172 172
 				{
173
-					$properties = isset($server['properties'])?$server['properties']:[];
173
+					$properties = isset($server['properties']) ? $server['properties'] : [];
174 174
 					if(isset($this->_servers[$id]))
175 175
 						throw new TConfigurationException('soapservice_serverid_duplicated', $id);
176 176
 					$this->_servers[$id] = $properties;
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 		if($serverClass === null)
257 257
 			$serverClass = self::DEFAULT_SOAP_SERVER;
258 258
 		Prado::using($serverClass);
259
-		$className = ($pos = strrpos($serverClass, '.')) !== false?substr($serverClass, $pos + 1):$serverClass;
259
+		$className = ($pos = strrpos($serverClass, '.')) !== false ?substr($serverClass, $pos + 1) : $serverClass;
260 260
 		if($className !== self::DEFAULT_SOAP_SERVER && !is_subclass_of($className, self::DEFAULT_SOAP_SERVER))
261 261
 			throw new TConfigurationException('soapservice_server_invalid', $serverClass);
262 262
 		$server = new $className;
Please login to merge, or discard this patch.
framework/Web/Services/TJsonService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 					$service = Prado::createComponent($serviceConfig['class']);
118 118
 					if($service instanceof TJsonResponse)
119 119
 					{
120
-						$properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:[];
120
+						$properties = isset($serviceConfig['properties']) ? $serviceConfig['properties'] : [];
121 121
 						$this->createJsonResponse($service, $properties, $serviceConfig);
122 122
 					}
123 123
 					else
Please login to merge, or discard this patch.
framework/Web/THttpUtility.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
  */
21 21
 class THttpUtility
22 22
 {
23
-	private static $_encodeTable = ['<' => '&lt;','>' => '&gt;','"' => '&quot;'];
24
-	private static $_decodeTable = ['&lt;' => '<','&gt;' => '>','&quot;' => '"'];
25
-	private static $_stripTable = ['&lt;' => '','&gt;' => '','&quot;' => ''];
23
+	private static $_encodeTable = ['<' => '&lt;', '>' => '&gt;', '"' => '&quot;'];
24
+	private static $_decodeTable = ['&lt;' => '<', '&gt;' => '>', '&quot;' => '"'];
25
+	private static $_stripTable = ['&lt;' => '', '&gt;' => '', '&quot;' => ''];
26 26
 
27 27
 	/**
28 28
 	 * HTML-encodes a string.
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
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/TActiveDropDownList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 	{
108 108
 		parent::addAttributesToRender($writer);
109 109
 		$writer->addAttribute('id', $this->getClientID());
110
-		if ($this->getAutoPostBack())
110
+		if($this->getAutoPostBack())
111 111
 			$this->getActiveControl()->registerCallbackClientScript(
112 112
 				$this->getClientClassName(), $this->getPostBackOptions());
113 113
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePageAdapter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	{
122 122
 		$id = $control->getUniqueID();
123 123
 		if(!isset($this->_controlsToRender[$id]))
124
-			$this->_controlsToRender[$id] = [$control,$writer];
124
+			$this->_controlsToRender[$id] = [$control, $writer];
125 125
 	}
126 126
 
127 127
 	/**
@@ -212,22 +212,22 @@  discard block
 block discarded – undo
212 212
 
213 213
 		// collect all stylesheet file references
214 214
 		$stylesheets = $cs->getStyleSheetUrls();
215
-		if (count($stylesheets) > 0)
215
+		if(count($stylesheets) > 0)
216 216
 		$this->appendContentPart($response, self::CALLBACK_STYLESHEETLIST_HEADER, TJavaScript::jsonEncode($stylesheets));
217 217
 
218 218
 		// collect all stylesheet snippets references
219 219
 		$stylesheets = $cs->getStyleSheetCodes();
220
-		if (count($stylesheets) > 0)
220
+		if(count($stylesheets) > 0)
221 221
 		$this->appendContentPart($response, self::CALLBACK_STYLESHEET_HEADER, TJavaScript::jsonEncode($stylesheets));
222 222
 
223 223
 		// collect all script file references
224 224
 		$scripts = $cs->getScriptUrls();
225
-		if (count($scripts) > 0)
225
+		if(count($scripts) > 0)
226 226
 		$this->appendContentPart($response, self::CALLBACK_SCRIPTLIST_HEADER, TJavaScript::jsonEncode($scripts));
227 227
 
228 228
 		// collect all hidden field references
229 229
 		$fields = $cs->getHiddenFields();
230
-		if (count($fields) > 0)
230
+		if(count($fields) > 0)
231 231
 		$this->appendContentPart($response, self::CALLBACK_HIDDENFIELDLIST_HEADER, TJavaScript::jsonEncode($fields));
232 232
 	}
233 233
 
Please login to merge, or discard this patch.