Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,9 @@
 block discarded – undo
137 137
 		$fkObject = $this->getContext()->getPropertyValue();
138 138
 		$source = $this->getSourceRecord();
139 139
 		$fkeys = $this->findForeignKeys($fkObject, $source);
140
-		foreach($fkeys as $fKey => $srcKey)
141
-			$fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey));
140
+		foreach($fkeys as $fKey => $srcKey) {
141
+					$fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey));
142
+		}
142 143
 		return $fkObject->save();
143 144
 	}
144 145
 }
Please login to merge, or discard this patch.
framework/Data/SqlMap/TSqlMapConfig.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
 				$manager->configureXml($file);
69 69
 				$this->cacheSqlMapManager($manager);
70 70
 			}
71
-		}
72
-		elseif($this->getConnectionID() !== '') {
71
+		} elseif($this->getConnectionID() !== '') {
73 72
 			$manager->setDbConnection($this->getDbConnection());
74 73
 		}
75 74
 		return $manager;
Please login to merge, or discard this patch.
framework/Data/SqlMap/Configuration/TParameterMap.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,8 +177,7 @@
 block discarded – undo
177 177
 		try
178 178
 		{
179 179
 			return TPropertyAccess::get($object, $property->getProperty());
180
-		}
181
-		catch (TInvalidPropertyException $e)
180
+		} catch (TInvalidPropertyException $e)
182 181
 		{
183 182
 			throw new TSqlMapException(
184 183
 				'sqlmap_unable_to_get_property_for_parameter',
Please login to merge, or discard this patch.
framework/Data/SqlMap/Configuration/TResultMap.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,8 +164,7 @@
 block discarded – undo
164 164
 				return $handler->createNewInstance();
165 165
 			else
166 166
 				return $registry->createInstanceOf($this->getClass());
167
-		}
168
-		catch (TSqlMapException $e)
167
+		} catch (TSqlMapException $e)
169 168
 		{
170 169
 			throw new TSqlMapException(
171 170
 				'sqlmap_unable_to_create_new_instance',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
 		if(($disc = $this->getDiscriminator()) !== null)
191 191
 		{
192 192
 			$value = $disc->getMapping()->getPropertyValue($registry, $row);
193
-			$subMap = $disc->getSubMap((string)$value);
193
+			$subMap = $disc->getSubMap((string) $value);
194 194
 
195 195
 			if($subMap === null)
196 196
 				$subMap = $this;
Please login to merge, or discard this patch.
framework/Data/SqlMap/TSqlMapManager.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -265,8 +265,9 @@
 block discarded – undo
265 265
 	 */
266 266
 	public function flushCacheModels()
267 267
 	{
268
-		foreach($this->_cacheModels as $cache)
269
-			$cache->flush();
268
+		foreach($this->_cacheModels as $cache) {
269
+					$cache->flush();
270
+		}
270 271
 	}
271 272
 }
272 273
 
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TPreparedStatementFactory.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 
41 41
 	protected function createParametersForTextCommand()
42 42
 	{
43
-		foreach($this->_statement->ParameterMap()->getProperties() as $prop)
44
-			$this->_preparedStatement->getParameterNames()->add($prop->getProperty());
43
+		foreach($this->_statement->ParameterMap()->getProperties() as $prop) {
44
+					$this->_preparedStatement->getParameterNames()->add($prop->getProperty());
45
+		}
45 46
 	}
46 47
 }
47 48
 
Please login to merge, or discard this patch.
framework/I18N/TDateFormat.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,8 +112,7 @@
 block discarded – undo
112 112
 			&& strlen($datetime[1]) == 1)
113 113
 		{
114 114
 			$pattern = $datetime;
115
-		}
116
-		else //no subpattern, try the presets
115
+		} else //no subpattern, try the presets
117 116
 			$pattern = $this->getPreset($string);
118 117
 
119 118
 		//no presets found, use the string as the pattern
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 	 * @var array
74 74
 	 */
75 75
 	private static $_patternPresets = [
76
-			'fulldate' => 'P','full' => 'P',
77
-			'longdate' => 'D','long' => 'd',
78
-			'mediumdate' => 'p','medium' => 'p',
79
-			'shortdate' => 'd','short' => 'd',
76
+			'fulldate' => 'P', 'full' => 'P',
77
+			'longdate' => 'D', 'long' => 'd',
78
+			'mediumdate' => 'p', 'medium' => 'p',
79
+			'shortdate' => 'd', 'short' => 'd',
80 80
 			'fulltime' => 'Q', 'longtime' => 'T',
81 81
 			'mediumtime' => 'q', 'shorttime' => 't'];
82 82
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		//and let the DateFormat handle it.
123 123
 		if($pattern === null)
124 124
 			$pattern = $string;
125
-		if (!is_array($pattern) && strlen($pattern) == 0)
125
+		if(!is_array($pattern) && strlen($pattern) == 0)
126 126
 			$pattern = null;
127 127
 		return $pattern;
128 128
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@
 block discarded – undo
55 55
 	 */
56 56
 	public function flushContent()
57 57
 	{
58
-		foreach($this->_writers as $writer)
59
-			echo $writer->flush();
58
+		foreach($this->_writers as $writer) {
59
+					echo $writer->flush();
60
+		}
60 61
 		parent::flushContent();
61 62
 	}
62 63
 
Please login to merge, or discard this patch.
framework/Web/UI/TControlAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	 */
49 49
 	public function getPage()
50 50
 	{
51
-		return $this->_control?$this->_control->getPage():null;
51
+		return $this->_control ? $this->_control->getPage() : null;
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.