Completed
Push — developer ( 1e92a5...487603 )
by Błażej
403:20 queued 370:53
created
modules/Settings/DataAccess/models/Module.php 2 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,8 +131,9 @@  discard block
 block discarded – undo
131 131
 
132 132
 	public static function getListBaseModuleField($baseModule)
133 133
 	{
134
-		if ($baseModule === 'All')
135
-			return $baseModule;
134
+		if ($baseModule === 'All') {
135
+					return $baseModule;
136
+		}
136 137
 		$baseModuleModel = Vtiger_Module_Model::getInstance($baseModule);
137 138
 		$list = $baseModuleModel->getFields();
138 139
 		$output = array();
@@ -276,10 +277,11 @@  discard block
 block discarded – undo
276 277
 	public function getActionName($name, $typ)
277 278
 	{
278 279
 		$actionsName = explode(self::$separator, $name);
279
-		if ($typ)
280
-			return vtranslate('Action_' . $actionsName[1], 'DataAccess');
281
-		else
282
-			return vtranslate('Action_Desc_' . $actionsName[1], 'DataAccess');
280
+		if ($typ) {
281
+					return vtranslate('Action_' . $actionsName[1], 'DataAccess');
282
+		} else {
283
+					return vtranslate('Action_Desc_' . $actionsName[1], 'DataAccess');
284
+		}
283 285
 	}
284 286
 
285 287
 	public function listAccesDataDirector($module = false)
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@  discard block
 block discarded – undo
177 177
 		}
178 178
 	}
179 179
 
180
+	/**
181
+	 * @param string $relId
182
+	 */
180 183
 	public function addConditions($conditions, $relId, $mendatory = true)
181 184
 	{
182 185
 		$conditionObj = json_decode($conditions);
@@ -309,6 +312,9 @@  discard block
 block discarded – undo
309 312
 		return array_merge($mainFolderFiles, $moduleFolderFiles);
310 313
 	}
311 314
 
315
+	/**
316
+	 * @param string|boolean $prefix
317
+	 */
312 318
 	public function listFolderFiles($dir, $prefix)
313 319
 	{
314 320
 		$ffs = scandir($dir);
Please login to merge, or discard this patch.
modules/Vtiger/actions/TransferOwnership.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,10 +22,11 @@
 block discarded – undo
22 22
 		$modelClassName = Vtiger_Loader::getComponentClassName('Model', 'TransferOwnership', $module);
23 23
 		$transferModel = new $modelClassName();
24 24
 
25
-		if (empty($record))
26
-			$recordIds = $this->getBaseModuleRecordIds($request);
27
-		else
28
-			$recordIds = [$record];
25
+		if (empty($record)) {
26
+					$recordIds = $this->getBaseModuleRecordIds($request);
27
+		} else {
28
+					$recordIds = [$record];
29
+		}
29 30
 		if (!empty($recordIds)) {
30 31
 			$transferModel->transferRecordsOwnership($module, $transferOwnerId, $recordIds);
31 32
 		}
Please login to merge, or discard this patch.
modules/Vtiger/models/DetailView.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 			$linkModelList['DETAILVIEW'][] = Vtiger_Link_Model::getInstanceFromValues($editViewLinks);
145 145
 		}
146 146
 
147
-		if (($recordModel->isEditable() && $recordModel->editFieldByModalPermission() ) || $recordModel->editFieldByModalPermission(true)) {
147
+		if (($recordModel->isEditable() && $recordModel->editFieldByModalPermission()) || $recordModel->editFieldByModalPermission(true)) {
148 148
 			$fieldByEditData = $recordModel->getFieldToEditByModal();
149 149
 			$basicActionLink = [
150 150
 				'linktype' => 'DETAILVIEW',
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -288,8 +288,9 @@
 block discarded – undo
288 288
 	 */
289 289
 	public function getWidgets()
290 290
 	{
291
-		if (count($this->widgetsList) > 0)
292
-			return;
291
+		if (count($this->widgetsList) > 0) {
292
+					return;
293
+		}
293 294
 		$moduleModel = $this->getModule();
294 295
 		$Module = $this->getModuleName();
295 296
 		$Record = $this->getRecord()->getId();
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
 	/**
54 54
 	 * Function to get the module
55
-	 * @return Vtiger_Module_Model
55
+	 * @return boolean
56 56
 	 */
57 57
 	public function getModule()
58 58
 	{
Please login to merge, or discard this patch.
modules/Vtiger/models/EditRecordStructure.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@
 block discarded – undo
39 39
 							$fieldModel->set('fieldvalue', $recordModel->get($fieldName));
40 40
 						} else {
41 41
 							$defaultValue = $fieldModel->getDefaultFieldValue();
42
-							if (!empty($defaultValue) && !$recordId)
43
-								$fieldModel->set('fieldvalue', $defaultValue);
42
+							if (!empty($defaultValue) && !$recordId) {
43
+															$fieldModel->set('fieldvalue', $defaultValue);
44
+							}
44 45
 						}
45 46
 						$values[$blockLabel][$fieldName] = $fieldModel;
46 47
 					}
Please login to merge, or discard this patch.
modules/Vtiger/models/Mobile.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,9 @@
 block discarded – undo
87 87
 		$users = [];
88 88
 		$keys = self::getAllMobileKeys('pushcall', $currentUser->getId());
89 89
 		foreach ($keys as $id => $key) {
90
-			if (in_array($currentUser->getId(), $key['privileges_users']))
91
-				$users[$key['userid']] = $key['fullusername'];
90
+			if (in_array($currentUser->getId(), $key['privileges_users'])) {
91
+							$users[$key['userid']] = $key['fullusername'];
92
+			}
92 93
 		}
93 94
 		return $users;
94 95
 	}
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -48,6 +48,9 @@
 block discarded – undo
48 48
 		return $return;
49 49
 	}
50 50
 
51
+	/**
52
+	 * @param boolean|string $service
53
+	 */
51 54
 	public function getAllMobileKeys($service, $userid = false)
52 55
 	{
53 56
 		$adb = PearDatabase::getInstance();
Please login to merge, or discard this patch.
modules/Vtiger/models/Paging.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -199,10 +199,12 @@
 block discarded – undo
199 199
 		$totalCount = $this->get('totalCount');
200 200
 		$startPaginFrom = $pageNumber - 2;
201 201
 
202
-		if ($pageNumber == $totalCount && 1 != $pageNumber)
203
-			$startPaginFrom = $pageNumber - 4;
204
-		if ($startPaginFrom <= 0 || 1 == $pageNumber)
205
-			$startPaginFrom = 1;
202
+		if ($pageNumber == $totalCount && 1 != $pageNumber) {
203
+					$startPaginFrom = $pageNumber - 4;
204
+		}
205
+		if ($startPaginFrom <= 0 || 1 == $pageNumber) {
206
+					$startPaginFrom = 1;
207
+		}
206 208
 
207 209
 		return $startPaginFrom;
208 210
 	}
Please login to merge, or discard this patch.
modules/Vtiger/models/DashBoard.php 2 patches
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 		$currentUserPrivilegeModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
53 53
 		$moduleModel = $this->getModule();
54 54
 
55
-		if ($action == 'Header')
56
-			$action = 0;
55
+		if ($action == 'Header') {
56
+					$action = 0;
57
+		}
57 58
 		$sql = " SELECT 
58 59
 					vtiger_links.*,
59 60
 					mdw.userid,
@@ -86,23 +87,26 @@  discard block
 block discarded – undo
86 87
 		while ($row = $db->fetch_array($result)) {
87 88
 			$row['linkid'] = $row['id'];
88 89
 			if ($row['linklabel'] == 'Mini List') {
89
-				if (!$row['isdeafult'])
90
-					$row['deleteFromList'] = true;
90
+				if (!$row['isdeafult']) {
91
+									$row['deleteFromList'] = true;
92
+				}
91 93
 				$minilistWidget = Vtiger_Widget_Model::getInstanceFromValues($row);
92 94
 				$minilistWidgetModel = new Vtiger_MiniList_Model();
93 95
 				$minilistWidgetModel->setWidgetModel($minilistWidget);
94 96
 				$minilistWidget->set('title', $minilistWidgetModel->getTitle());
95 97
 				$widgets[] = $minilistWidget;
96 98
 			} elseif ($row['linklabel'] == 'ChartFilter') {
97
-				if (!$row['isdeafult'])
98
-					$row['deleteFromList'] = true;
99
+				if (!$row['isdeafult']) {
100
+									$row['deleteFromList'] = true;
101
+				}
99 102
 				$charFilterWidget = Vtiger_Widget_Model::getInstanceFromValues($row);
100 103
 				$chartFilterWidgetModel = new Vtiger_ChartFilter_Model();
101 104
 				$chartFilterWidgetModel->setWidgetModel($charFilterWidget);
102 105
 				$charFilterWidget->set('title', $chartFilterWidgetModel->getTitle());
103 106
 				$widgets[] = $charFilterWidget;
104
-			} else
105
-				$widgets[] = Vtiger_Widget_Model::getInstanceFromValues($row);
107
+			} else {
108
+							$widgets[] = Vtiger_Widget_Model::getInstanceFromValues($row);
109
+			}
106 110
 		}
107 111
 
108 112
 		foreach ($widgets as $index => $widget) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	/**
25 25
 	 * Function to set the module instance
26 26
 	 * @param Vtiger_Module_Model $moduleInstance - module model
27
-	 * @return Vtiger_DetailView_Model
27
+	 * @return Vtiger_DashBoard_Model
28 28
 	 */
29 29
 	public function setModule($moduleInstance)
30 30
 	{
Please login to merge, or discard this patch.
modules/Vtiger/models/Utility.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@
 block discarded – undo
23 23
 	{
24 24
 		$db = PearDatabase::getInstance();
25 25
 		if (!$module->isEntityModule()) {
26
-			if (!$module->isUtilityActionEnabled())
27
-				return false;
26
+			if (!$module->isUtilityActionEnabled()) {
27
+							return false;
28
+			}
28 29
 		}
29 30
 		$tabId = $module->getId();
30 31
 		$sql = 'SELECT 1 FROM vtiger_profile2utility WHERE tabid = ? && activityid = ? LIMIT 1';
Please login to merge, or discard this patch.
modules/Vtiger/models/FindDuplicate.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,8 +178,9 @@
 block discarded – undo
178 178
 		$fields = $request->get('fields');
179 179
 		$ignoreEmpty = $request->get('ignoreEmpty');
180 180
 		$ignoreEmptyValue = false;
181
-		if ($ignoreEmpty == 'on')
182
-			$ignoreEmptyValue = true;
181
+		if ($ignoreEmpty == 'on') {
182
+					$ignoreEmptyValue = true;
183
+		}
183 184
 
184 185
 		$fieldModels = $moduleModel->getFields();
185 186
 		if (is_array($fields)) {
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -96,6 +96,9 @@
 block discarded – undo
96 96
 		echo $viewer->view('Pagination.tpl', $moduleName, true);
97 97
 	}
98 98
 
99
+	/**
100
+	 * @param Vtiger_Module_Model $moduleModel
101
+	 */
99 102
 	public function transferListSearchParamsToFilterCondition($listSearchParams, $moduleModel)
100 103
 	{
101 104
 		return Vtiger_Util_Helper::transferListSearchParamsToFilterCondition($listSearchParams, $moduleModel);
Please login to merge, or discard this patch.