Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:58
created
framework/I18N/TTranslateParameter.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,9 @@  discard block
 block discarded – undo
59 59
 	 */
60 60
 	public function getKey()
61 61
 	{
62
-		if(empty($this->key))
63
-			throw new TException('The Key property must be specified.');
62
+		if(empty($this->key)) {
63
+					throw new TException('The Key property must be specified.');
64
+		}
64 65
 		return $this->key;
65 66
 	}
66 67
 
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
 	public function getParameter()
108 109
 	{
109 110
 		$value = $this->getValue();
110
-		if(strlen($value) > 0)
111
-			return $value;
111
+		if(strlen($value) > 0) {
112
+					return $value;
113
+		}
112 114
 		$htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
113 115
 		$this->renderControl($htmlWriter);
114 116
 		return $this->getTrim() ?
Please login to merge, or discard this patch.
framework/Caching/TAPCCache.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,14 +53,17 @@
 block discarded – undo
53 53
     */
54 54
 	public function init($config)
55 55
 	{
56
-		if(!extension_loaded('apc'))
57
-			throw new TConfigurationException('apccache_extension_required');
56
+		if(!extension_loaded('apc')) {
57
+					throw new TConfigurationException('apccache_extension_required');
58
+		}
58 59
 
59
-		if(ini_get('apc.enabled') == false)
60
-			throw new TConfigurationException('apccache_extension_not_enabled');
60
+		if(ini_get('apc.enabled') == false) {
61
+					throw new TConfigurationException('apccache_extension_not_enabled');
62
+		}
61 63
 
62
-		if(substr(php_sapi_name(), 0, 3) === 'cli' and ini_get('apc.enable_cli') == false)
63
-			throw new TConfigurationException('apccache_extension_not_enabled_cli');
64
+		if(substr(php_sapi_name(), 0, 3) === 'cli' and ini_get('apc.enable_cli') == false) {
65
+					throw new TConfigurationException('apccache_extension_not_enabled_cli');
66
+		}
64 67
 
65 68
 		parent::init($config);
66 69
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBaseDataList.php 1 patch
Braces   +20 added lines, -16 removed lines patch added patch discarded remove patch
@@ -56,10 +56,11 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public function getCellSpacing()
58 58
 	{
59
-		if($this->getHasStyle())
60
-			return $this->getStyle()->getCellSpacing();
61
-		else
62
-			return -1;
59
+		if($this->getHasStyle()) {
60
+					return $this->getStyle()->getCellSpacing();
61
+		} else {
62
+					return -1;
63
+		}
63 64
 	}
64 65
 
65 66
 	/**
@@ -75,10 +76,11 @@  discard block
 block discarded – undo
75 76
 	 */
76 77
 	public function getCellPadding()
77 78
 	{
78
-		if($this->getHasStyle())
79
-			return $this->getStyle()->getCellPadding();
80
-		else
81
-			return -1;
79
+		if($this->getHasStyle()) {
80
+					return $this->getStyle()->getCellPadding();
81
+		} else {
82
+					return -1;
83
+		}
82 84
 	}
83 85
 
84 86
 	/**
@@ -94,10 +96,11 @@  discard block
 block discarded – undo
94 96
 	 */
95 97
 	public function getHorizontalAlign()
96 98
 	{
97
-		if($this->getHasStyle())
98
-			return $this->getStyle()->getHorizontalAlign();
99
-		else
100
-			return THorizontalAlign::NotSet;
99
+		if($this->getHasStyle()) {
100
+					return $this->getStyle()->getHorizontalAlign();
101
+		} else {
102
+					return THorizontalAlign::NotSet;
103
+		}
101 104
 	}
102 105
 
103 106
 	/**
@@ -113,10 +116,11 @@  discard block
 block discarded – undo
113 116
 	 */
114 117
 	public function getGridLines()
115 118
 	{
116
-		if($this->getHasStyle())
117
-			return $this->getStyle()->getGridLines();
118
-		else
119
-			return TTableGridLines::None;
119
+		if($this->getHasStyle()) {
120
+					return $this->getStyle()->getGridLines();
121
+		} else {
122
+					return TTableGridLines::None;
123
+		}
120 124
 	}
121 125
 
122 126
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallback.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,9 @@
 block discarded – undo
79 79
 	 */
80 80
 	public function raiseCallbackEvent($param)
81 81
 	{
82
-		if($this->getActiveControl()->canCauseValidation())
83
-			$this->getPage()->validate($this->getActiveControl()->getValidationGroup());
82
+		if($this->getActiveControl()->canCauseValidation()) {
83
+					$this->getPage()->validate($this->getActiveControl()->getValidationGroup());
84
+		}
84 85
 		$this->onCallback($param);
85 86
 	}
86 87
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TValueTriggeredCallback.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,8 +80,9 @@
 block discarded – undo
80 80
 	public function setDecayRate($value)
81 81
 	{
82 82
 		$decay = TPropertyValue::ensureFloat($value);
83
-		if($decay < 0)
84
-			throw new TConfigurationException('callback_decay_be_not_negative', $this->getID());
83
+		if($decay < 0) {
84
+					throw new TConfigurationException('callback_decay_be_not_negative', $this->getID());
85
+		}
85 86
 		$this->setViewState('Decay', $decay);
86 87
 	}
87 88
 
Please login to merge, or discard this patch.
framework/Data/SqlMap/Configuration/TDiscriminator.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,8 +144,9 @@
 block discarded – undo
144 144
 	 */
145 145
 	public function getSubMap($value)
146 146
 	{
147
-		if(isset($this->_resultMaps[$value]))
148
-			return $this->_resultMaps[$value];
147
+		if(isset($this->_resultMaps[$value])) {
148
+					return $this->_resultMaps[$value];
149
+		}
149 150
 	}
150 151
 
151 152
 	/**
Please login to merge, or discard this patch.
framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,9 @@
 block discarded – undo
75 75
 
76 76
 	protected function getCache()
77 77
 	{
78
-		if (!$this->_cache)
79
-			$this->_cache = Prado::getApplication()->getCache();
78
+		if (!$this->_cache) {
79
+					$this->_cache = Prado::getApplication()->getCache();
80
+		}
80 81
 		return $this->_cache;
81 82
 	}
82 83
 
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -122,8 +122,9 @@  discard block
 block discarded – undo
122 122
 		$prop = $this->getContext()->getProperty();
123 123
 		if(isset($collections[$hash]) && count($collections[$hash]) > 0)
124 124
 		{
125
-			if(count($collections[$hash]) > 1)
126
-				throw new TActiveRecordException('ar_belongs_to_multiple_result');
125
+			if(count($collections[$hash]) > 1) {
126
+							throw new TActiveRecordException('ar_belongs_to_multiple_result');
127
+			}
127 128
 			$source->setColumnValue($prop, $collections[$hash][0]);
128 129
 		}
129 130
 	}
@@ -137,8 +138,9 @@  discard block
 block discarded – undo
137 138
 		$fkObject = $this->getContext()->getPropertyValue();
138 139
 		$source = $this->getSourceRecord();
139 140
 		$fkeys = $this->findForeignKeys($fkObject, $source);
140
-		foreach($fkeys as $fKey => $srcKey)
141
-			$fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey));
141
+		foreach($fkeys as $fKey => $srcKey) {
142
+					$fkObject->setColumnValue($fKey, $source->getColumnValue($srcKey));
143
+		}
142 144
 		return $fkObject->save();
143 145
 	}
144 146
 }
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/TActiveRecordConfig.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,8 +108,9 @@  discard block
 block discarded – undo
108 108
 	{
109 109
 		parent::init($xml);
110 110
 		$manager = $this -> getManager();
111
-		if($this->getEnableCache())
112
-			$manager->setCache($this->getApplication()->getCache());
111
+		if($this->getEnableCache()) {
112
+					$manager->setCache($this->getApplication()->getCache());
113
+		}
113 114
 		$manager->setDbConnection($this->getDbConnection());
114 115
 		$manager->setInvalidFinderResult($this->getInvalidFinderResult());
115 116
 		$manager->setGatewayClass($this->getGatewayClass());
@@ -119,8 +120,9 @@  discard block
 block discarded – undo
119 120
 	 * @return TActiveRecordManager
120 121
 	 */
121 122
 	public function getManager() {
122
-		if($this->_manager === null)
123
-			$this->_manager = Prado::createComponent($this -> getManagerClass());
123
+		if($this->_manager === null) {
124
+					$this->_manager = Prado::createComponent($this -> getManagerClass());
125
+		}
124 126
 		return TActiveRecordManager::getInstance($this->_manager);
125 127
 	}
126 128
 
Please login to merge, or discard this patch.