Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:58
created
framework/Web/TUri.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,7 @@
 block discarded – undo
104 104
 			$this->_query = isset($ret['query'])?$ret['query']:'';
105 105
 			$this->_fragment = isset($ret['fragment'])?$ret['fragment']:'';
106 106
 			$this->_uri = $uri;
107
-		}
108
-		else
107
+		} else
109 108
 		{
110 109
 			throw new TInvalidDataValueException('uri_format_invalid', $uri);
111 110
 		}
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -92,17 +92,17 @@
 block discarded – undo
92 92
 	 */
93 93
 	public function __construct($uri)
94 94
 	{
95
-		if(($ret = @parse_url($uri)) !== false)
95
+		if (($ret = @parse_url($uri)) !== false)
96 96
 		{
97 97
 			// decoding???
98
-			$this->_scheme = isset($ret['scheme'])?$ret['scheme']:'';
99
-			$this->_host = isset($ret['host'])?$ret['host']:'';
100
-			$this->_port = isset($ret['port'])?$ret['port']:'';
101
-			$this->_user = isset($ret['user'])?$ret['user']:'';
102
-			$this->_pass = isset($ret['pass'])?$ret['pass']:'';
103
-			$this->_path = isset($ret['path'])?$ret['path']:'';
104
-			$this->_query = isset($ret['query'])?$ret['query']:'';
105
-			$this->_fragment = isset($ret['fragment'])?$ret['fragment']:'';
98
+			$this->_scheme = isset($ret['scheme']) ? $ret['scheme'] : '';
99
+			$this->_host = isset($ret['host']) ? $ret['host'] : '';
100
+			$this->_port = isset($ret['port']) ? $ret['port'] : '';
101
+			$this->_user = isset($ret['user']) ? $ret['user'] : '';
102
+			$this->_pass = isset($ret['pass']) ? $ret['pass'] : '';
103
+			$this->_path = isset($ret['path']) ? $ret['path'] : '';
104
+			$this->_query = isset($ret['query']) ? $ret['query'] : '';
105
+			$this->_fragment = isset($ret['fragment']) ? $ret['fragment'] : '';
106 106
 			$this->_uri = $uri;
107 107
 		}
108 108
 		else
Please login to merge, or discard this patch.
framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -135,28 +135,24 @@
 block discarded – undo
135 135
 			{
136 136
 				$param->setData($data);
137 137
 				$this->_nextPageList = null;
138
-			}
139
-			else
138
+			} else
140 139
 			{
141 140
 				$param->setData(array_slice($data, 0, $pageSize));
142 141
 				$this->_nextPageList = array_slice($data, $pageSize - 1, $total);
143 142
 			}
144
-		}
145
-		else
143
+		} else
146 144
 		{
147 145
 			if($total <= $pageSize)
148 146
 			{
149 147
 				$this->_prevPageList = array_slice($data, 0, $total);
150 148
 				$param->setData([]);
151 149
 				$this->_nextPageList = null;
152
-			}
153
-			elseif($total <= $pageSize * 2)
150
+			} elseif($total <= $pageSize * 2)
154 151
 			{
155 152
 				$this->_prevPageList = array_slice($data, 0, $pageSize);
156 153
 				$param->setData(array_slice($data, $pageSize, $total));
157 154
 				$this->_nextPageList = null;
158
-			}
159
-			else
155
+			} else
160 156
 			{
161 157
 				$this->_prevPageList = array_slice($data, 0, $pageSize);
162 158
 				$param->setData(array_slice($data, $pageSize, $pageSize));
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	{
121 121
 		$total = $data instanceof TList ? $data->getCount() : count($data);
122 122
 		$pageSize = $this->getPageSize();
123
-		if($total < 1)
123
+		if ($total < 1)
124 124
 		{
125 125
 			$param->setData($data);
126 126
 			$this->_prevPageList = null;
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
 			return;
129 129
 		}
130 130
 
131
-		if($param->getNewPageIndex() < 1)
131
+		if ($param->getNewPageIndex() < 1)
132 132
 		{
133 133
 			$this->_prevPageList = null;
134
-			if($total <= $pageSize)
134
+			if ($total <= $pageSize)
135 135
 			{
136 136
 				$param->setData($data);
137 137
 				$this->_nextPageList = null;
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 		}
145 145
 		else
146 146
 		{
147
-			if($total <= $pageSize)
147
+			if ($total <= $pageSize)
148 148
 			{
149 149
 				$this->_prevPageList = array_slice($data, 0, $total);
150 150
 				$param->setData([]);
151 151
 				$this->_nextPageList = null;
152 152
 			}
153
-			elseif($total <= $pageSize * 2)
153
+			elseif ($total <= $pageSize * 2)
154 154
 			{
155 155
 				$this->_prevPageList = array_slice($data, 0, $pageSize);
156 156
 				$param->setData(array_slice($data, $pageSize, $total));
Please login to merge, or discard this patch.
framework/Exceptions/THttpException.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,9 @@
 block discarded – undo
46 46
 		array_shift($args);
47 47
 		$n = count($args);
48 48
 		$tokens = [];
49
-		for($i = 0;$i < $n;++$i)
50
-			$tokens['{' . $i . '}'] = TPropertyValue::ensureString($args[$i]);
49
+		for($i = 0;$i < $n;++$i) {
50
+					$tokens['{' . $i . '}'] = TPropertyValue::ensureString($args[$i]);
51
+		}
51 52
 		parent::__construct(strtr($errorMessage, $tokens));
52 53
 	}
53 54
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
 		array_shift($args);
47 47
 		$n = count($args);
48 48
 		$tokens = [];
49
-		for($i = 0;$i < $n;++$i)
50
-			$tokens['{' . $i . '}'] = TPropertyValue::ensureString($args[$i]);
49
+		for ($i = 0; $i < $n; ++$i)
50
+			$tokens['{'.$i.'}'] = TPropertyValue::ensureString($args[$i]);
51 51
 		parent::__construct(strtr($errorMessage, $tokens));
52 52
 	}
53 53
 
Please login to merge, or discard this patch.
framework/Exceptions/TPhpErrorException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 			E_USER_NOTICE => "User Notice",
47 47
 			E_STRICT => "Runtime Notice"
48 48
 		];
49
-		$errorType = isset($errorTypes[$errno])?$errorTypes[$errno]:'Unknown Error';
49
+		$errorType = isset($errorTypes[$errno]) ? $errorTypes[$errno] : 'Unknown Error';
50 50
 		parent::__construct("[$errorType] $errstr (@line $errline in file $errfile).");
51 51
 	}
52 52
 
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/WebControls/TJavascriptLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		$code = strtoupper($this->getToggleKey());
87 87
 		$info = '(<a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/" target="_blank">more info</a>).';
88 88
 		$link = '<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>';
89
-		$usage = 'Press ALT-' . $code . ' (Or CTRL-' . $code . ' on OS X) to';
89
+		$usage = 'Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to';
90 90
 		$writer->write("{$usage} {$link} {$info}");
91 91
 	}
92 92
 }
Please login to merge, or discard this patch.
framework/IO/TTextWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 	 */
54 54
 	public function writeLine($str = '')
55 55
 	{
56
-		$this->write($str . "\n");
56
+		$this->write($str."\n");
57 57
 	}
58 58
 }
59 59
 
Please login to merge, or discard this patch.
framework/Util/TBehavior.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@  discard block
 block discarded – undo
44 44
 	public function attach($owner)
45 45
 	{
46 46
 		$this->_owner = $owner;
47
-		foreach($this->events() as $event => $handler)
48
-			$owner->attachEventHandler($event, [$this,$handler]);
47
+		foreach($this->events() as $event => $handler) {
48
+					$owner->attachEventHandler($event, [$this,$handler]);
49
+		}
49 50
 	}
50 51
 
51 52
 	/**
@@ -57,8 +58,9 @@  discard block
 block discarded – undo
57 58
 	 */
58 59
 	public function detach($owner)
59 60
 	{
60
-		foreach($this->events() as $event => $handler)
61
-			$owner->detachEventHandler($event, [$this,$handler]);
61
+		foreach($this->events() as $event => $handler) {
62
+					$owner->detachEventHandler($event, [$this,$handler]);
63
+		}
62 64
 		$this->_owner = null;
63 65
 	}
64 66
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	public function attach($owner)
45 45
 	{
46 46
 		$this->_owner = $owner;
47
-		foreach($this->events() as $event => $handler)
48
-			$owner->attachEventHandler($event, [$this,$handler]);
47
+		foreach ($this->events() as $event => $handler)
48
+			$owner->attachEventHandler($event, [$this, $handler]);
49 49
 	}
50 50
 
51 51
 	/**
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	public function detach($owner)
59 59
 	{
60
-		foreach($this->events() as $event => $handler)
61
-			$owner->detachEventHandler($event, [$this,$handler]);
60
+		foreach ($this->events() as $event => $handler)
61
+			$owner->detachEventHandler($event, [$this, $handler]);
62 62
 		$this->_owner = null;
63 63
 	}
64 64
 
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,9 @@
 block discarded – undo
111 111
 			$fkeys = $this->findForeignKeys($fkObjects[0], $source);
112 112
 			for($i = 0;$i < $total;$i++)
113 113
 			{
114
-				foreach($fkeys as $fKey => $srcKey)
115
-					$fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey));
114
+				foreach($fkeys as $fKey => $srcKey) {
115
+									$fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey));
116
+				}
116 117
 				$success = $fkObjects[$i]->save() && $success;
117 118
 			}
118 119
 		}
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@
 block discarded – undo
105 105
 		$obj = $this->getContext()->getSourceRecord();
106 106
 		$fkObjects = &$obj->{$this->getContext()->getProperty()};
107 107
 		$success = true;
108
-		if(($total = count($fkObjects)) > 0)
108
+		if (($total = count($fkObjects)) > 0)
109 109
 		{
110 110
 			$source = $this->getSourceRecord();
111 111
 			$fkeys = $this->findForeignKeys($fkObjects[0], $source);
112
-			for($i = 0;$i < $total;$i++)
112
+			for ($i = 0; $i < $total; $i++)
113 113
 			{
114
-				foreach($fkeys as $fKey => $srcKey)
114
+				foreach ($fkeys as $fKey => $srcKey)
115 115
 					$fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey));
116 116
 				$success = $fkObjects[$i]->save() && $success;
117 117
 			}
Please login to merge, or discard this patch.