Completed
Pull Request — developer (#4001)
by Thom
542:26 queued 508:45
created
modules/Project/views/Detail.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@
 block discarded – undo
26 26
 
27 27
 		$viewer = $this->getViewer($request);
28 28
 		$moduleModel = Vtiger_Module_Model::getInstance('OSSTimeControl');
29
-		if ($moduleModel)
30
-			$data = $moduleModel->getTimeUsers($recordId, $moduleName);
29
+		if ($moduleModel) {
30
+					$data = $moduleModel->getTimeUsers($recordId, $moduleName);
31
+		}
31 32
 		$viewer->assign('MODULE_NAME', $moduleName);
32 33
 		$viewer->assign('DATA', $data);
33 34
 		$viewer->view('charts/ShowTimeProjectUsers.tpl', $moduleName);
Please login to merge, or discard this patch.
modules/PaymentsIn/helpers/subclass/mt940_SGB.php 2 patches
Braces   +16 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@  discard block
 block discarded – undo
18 18
 	public function parse()
19 19
 	{
20 20
 		$tab = $this->prepareFile();
21
-		foreach ($tab as $line)
22
-			$this->parseLine($line);
21
+		foreach ($tab as $line) {
22
+					$this->parseLine($line);
23
+		}
23 24
 	}
24 25
 
25 26
 	protected function parseLine($line)
@@ -38,10 +39,11 @@  discard block
 block discarded – undo
38 39
 				break;
39 40
 			case 'NS':
40 41
 				$code = substr($value, 0, 2);
41
-				if ($code == '22')
42
-					$this->ownerName = substr($value, 2);
43
-				else if ($code == '23')
44
-					$this->accountName = substr($value, 2);
42
+				if ($code == '22') {
43
+									$this->ownerName = substr($value, 2);
44
+				} else if ($code == '23') {
45
+									$this->accountName = substr($value, 2);
46
+				}
45 47
 				break;
46 48
 			case '60F':
47 49
 				$this->openBalance = $this->parseBalance($value);
@@ -56,16 +58,18 @@  discard block
 block discarded – undo
56 58
 				self::parseOperation($value);
57 59
 				break;
58 60
 			case '86':
59
-				if ($this->_lastTag == '61')
60
-					$this->parseTransaction($value);
61
-				else
62
-					$this->info .= $value;
61
+				if ($this->_lastTag == '61') {
62
+									$this->parseTransaction($value);
63
+				} else {
64
+									$this->info .= $value;
65
+				}
63 66
 				break;
64 67
 			default:
65 68
 				break;
66 69
 		}
67
-		if ($tag)
68
-			$this->_lastTag = $tag;
70
+		if ($tag) {
71
+					$this->_lastTag = $tag;
72
+		}
69 73
 	}
70 74
 
71 75
 	protected function parseTransaction($value)
Please login to merge, or discard this patch.
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@  discard block
 block discarded – undo
20 20
 			$this->parseLine($line);
21 21
 	}
22 22
 
23
+	/**
24
+	 * @param string $line
25
+	 */
23 26
 	protected function parseLine($line)
24 27
 	{
25 28
 		$tag = substr($line, 1, strpos($line, ':', 1) - 1);
@@ -66,6 +69,9 @@  discard block
 block discarded – undo
66 69
 			$this->_lastTag = $tag;
67 70
 	}
68 71
 
72
+	/**
73
+	 * @param string $value
74
+	 */
69 75
 	protected function parseTransaction($value)
70 76
 	{
71 77
 		$transaction = array(
@@ -84,6 +90,9 @@  discard block
 block discarded – undo
84 90
 		$this->operations[count($this->operations) - 1]['details'] = $transaction;
85 91
 	}
86 92
 
93
+	/**
94
+	 * @param string $value
95
+	 */
87 96
 	protected function parseOperation($value)
88 97
 	{
89 98
 		$this->operations[] = array(
Please login to merge, or discard this patch.
modules/PaymentsIn/helpers/subclass/mt940_Pekao.php 2 patches
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@  discard block
 block discarded – undo
16 16
 	public function parse()
17 17
 	{
18 18
 		$tab = $this->prepareFile();
19
-		foreach ($tab as $line)
20
-			$this->parseLine($line);
19
+		foreach ($tab as $line) {
20
+					$this->parseLine($line);
21
+		}
21 22
 	}
22 23
 
23 24
 	protected function parseLine($line)
@@ -36,10 +37,11 @@  discard block
 block discarded – undo
36 37
 				break;
37 38
 			case 'NS':
38 39
 				$code = substr($value, 0, 2);
39
-				if ($code == '22')
40
-					$this->ownerName = substr($value, 2);
41
-				else if ($code == '23')
42
-					$this->accountName = substr($value, 2);
40
+				if ($code == '22') {
41
+									$this->ownerName = substr($value, 2);
42
+				} else if ($code == '23') {
43
+									$this->accountName = substr($value, 2);
44
+				}
43 45
 				break;
44 46
 			case '60F':
45 47
 				$this->openBalance = $this->parseBalance($value);
@@ -54,10 +56,11 @@  discard block
 block discarded – undo
54 56
 				self::parseOperation($value);
55 57
 				break;
56 58
 			case '86':
57
-				if ($this->_lastTag == '61')
58
-					$this->parseTransaction($value);
59
-				else
60
-					$this->info .= $value;
59
+				if ($this->_lastTag == '61') {
60
+									$this->parseTransaction($value);
61
+				} else {
62
+									$this->info .= $value;
63
+				}
61 64
 				break;
62 65
 			default:
63 66
 				break;
Please login to merge, or discard this patch.
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@  discard block
 block discarded – undo
20 20
 			$this->parseLine($line);
21 21
 	}
22 22
 
23
+	/**
24
+	 * @param string $line
25
+	 */
23 26
 	protected function parseLine($line)
24 27
 	{
25 28
 		$tag = substr($line, 1, strpos($line, ':', 1) - 1);
@@ -65,6 +68,9 @@  discard block
 block discarded – undo
65 68
 		$this->_lastTag = $tag;
66 69
 	}
67 70
 
71
+	/**
72
+	 * @param string $value
73
+	 */
68 74
 	protected function parseTransaction($value)
69 75
 	{
70 76
 		$transaction = array(
@@ -129,6 +135,9 @@  discard block
 block discarded – undo
129 135
 		$this->operations[count($this->operations) - 1]['details'] = $transaction;
130 136
 	}
131 137
 
138
+	/**
139
+	 * @param string $value
140
+	 */
132 141
 	protected function parseOperation($value)
133 142
 	{
134 143
 		$this->operations[] = array(
Please login to merge, or discard this patch.
modules/PaymentsIn/helpers/subclass/mt940_BPH.php 2 patches
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@  discard block
 block discarded – undo
16 16
 	public function parse()
17 17
 	{
18 18
 		$tab = $this->prepareFile();
19
-		foreach ($tab as $line)
20
-			$this->parseLine($line);
19
+		foreach ($tab as $line) {
20
+					$this->parseLine($line);
21
+		}
21 22
 	}
22 23
 
23 24
 	protected function parseLine($line)
@@ -36,10 +37,11 @@  discard block
 block discarded – undo
36 37
 				break;
37 38
 			case 'NS':
38 39
 				$code = substr($value, 0, 2);
39
-				if ($code == '22')
40
-					$this->ownerName = substr($value, 2);
41
-				else if ($code == '23')
42
-					$this->accountName = substr($value, 2);
40
+				if ($code == '22') {
41
+									$this->ownerName = substr($value, 2);
42
+				} else if ($code == '23') {
43
+									$this->accountName = substr($value, 2);
44
+				}
43 45
 				break;
44 46
 			case '60F':
45 47
 				$this->openBalance = $this->parseBalance($value);
@@ -54,10 +56,11 @@  discard block
 block discarded – undo
54 56
 				self::parseOperation($value);
55 57
 				break;
56 58
 			case '86':
57
-				if ($this->_lastTag == 'NS')
58
-					$this->parseTransaction($value);
59
-				else
60
-					$this->info .= $value;
59
+				if ($this->_lastTag == 'NS') {
60
+									$this->parseTransaction($value);
61
+				} else {
62
+									$this->info .= $value;
63
+				}
61 64
 				break;
62 65
 			default:
63 66
 				break;
Please login to merge, or discard this patch.
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@  discard block
 block discarded – undo
20 20
 			$this->parseLine($line);
21 21
 	}
22 22
 
23
+	/**
24
+	 * @param string $line
25
+	 */
23 26
 	protected function parseLine($line)
24 27
 	{
25 28
 		$tag = substr($line, 1, strpos($line, ':', 1) - 1);
@@ -65,6 +68,9 @@  discard block
 block discarded – undo
65 68
 		$this->_lastTag = $tag;
66 69
 	}
67 70
 
71
+	/**
72
+	 * @param string $value
73
+	 */
68 74
 	protected function parseTransaction($value)
69 75
 	{
70 76
 		$transaction = array(
@@ -129,6 +135,9 @@  discard block
 block discarded – undo
129 135
 		$this->operations[count($this->operations) - 1]['details'] = $transaction;
130 136
 	}
131 137
 
138
+	/**
139
+	 * @param string $value
140
+	 */
132 141
 	protected function parseOperation($value)
133 142
 	{
134 143
 		$this->operations[] = array(
Please login to merge, or discard this patch.
modules/PaymentsIn/views/step1.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@
 block discarded – undo
37 37
 		$j = array();
38 38
 		foreach ($recordParse->operations as $transfers) {
39 39
 			foreach ($transfers as $key => $value) {
40
-				if ($key == 'indicator' && $value == 'C')
41
-					$paymentsIn[] = $transfers;
40
+				if ($key == 'indicator' && $value == 'C') {
41
+									$paymentsIn[] = $transfers;
42
+				}
42 43
 				if ($key == 'third_letter_currency_code') {
43 44
 					$j[] = $i;
44 45
 				}
Please login to merge, or discard this patch.
modules/SMSNotifier/providers/ClickATell.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,8 +125,9 @@
 block discarded – undo
125 125
 		$i = 0;
126 126
 		foreach ($responseLines as $responseLine) {
127 127
 			$responseLine = trim($responseLine);
128
-			if (empty($responseLine))
129
-				continue;
128
+			if (empty($responseLine)) {
129
+							continue;
130
+			}
130 131
 
131 132
 			$result = array('error' => false, 'statusmessage' => '');
132 133
 			if (preg_match("/ERR:(.*)/", trim($responseLine), $matches)) {
Please login to merge, or discard this patch.
modules/SMSNotifier/providers/MyProvider.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,9 @@
 block discarded – undo
124 124
 		$results = array();
125 125
 		foreach ($responseLines as $responseLine) {
126 126
 			$responseLine = trim($responseLine);
127
-			if (empty($responseLine))
128
-				continue;
127
+			if (empty($responseLine)) {
128
+							continue;
129
+			}
129 130
 
130 131
 			$result = array('error' => false, 'statusmessage' => '');
131 132
 			if (preg_match("/ERR:(.*)/", trim($responseLine), $matches)) {
Please login to merge, or discard this patch.
modules/SMSNotifier/SMSNotifierBase.php 1 patch
Braces   +21 added lines, -16 removed lines patch added patch discarded remove patch
@@ -98,10 +98,11 @@  discard block
 block discarded – undo
98 98
 		$currentModule = vglobal('currentModule');
99 99
 
100 100
 		$sortorder = $this->default_sort_order;
101
-		if (!AppRequest::isEmpty('sorder'))
102
-			$sortorder = AppRequest::get('sorder');
103
-		else if ($_SESSION[$currentModule . '_Sort_Order'])
104
-			$sortorder = $_SESSION[$currentModule . '_Sort_Order'];
101
+		if (!AppRequest::isEmpty('sorder')) {
102
+					$sortorder = AppRequest::get('sorder');
103
+		} else if ($_SESSION[$currentModule . '_Sort_Order']) {
104
+					$sortorder = $_SESSION[$currentModule . '_Sort_Order'];
105
+		}
105 106
 
106 107
 		return $sortorder;
107 108
 	}
@@ -109,10 +110,11 @@  discard block
 block discarded – undo
109 110
 	public function getOrderBy()
110 111
 	{
111 112
 		$orderby = $this->default_order_by;
112
-		if (!AppRequest::isEmpty('order_by'))
113
-			$sortorder = AppRequest::get('order_by');
114
-		else if ($_SESSION[$currentModule . '_Order_By'])
115
-			$orderby = $_SESSION[$currentModule . '_Order_By'];
113
+		if (!AppRequest::isEmpty('order_by')) {
114
+					$sortorder = AppRequest::get('order_by');
115
+		} else if ($_SESSION[$currentModule . '_Order_By']) {
116
+					$orderby = $_SESSION[$currentModule . '_Order_By'];
117
+		}
116 118
 		return $orderby;
117 119
 	}
118 120
 
@@ -138,8 +140,9 @@  discard block
 block discarded – undo
138 140
 		$query = "SELECT vtiger_crmentity.*, $this->table_name.*";
139 141
 
140 142
 		// Select Custom Field Table Columns if present
141
-		if (!empty($this->customFieldTable))
142
-			$query .= ", " . $this->customFieldTable[0] . ".* ";
143
+		if (!empty($this->customFieldTable)) {
144
+					$query .= ", " . $this->customFieldTable[0] . ".* ";
145
+		}
143 146
 
144 147
 		$query .= " FROM $this->table_name";
145 148
 
@@ -270,10 +273,11 @@  discard block
 block discarded – undo
270 273
 
271 274
 		$where_auto = " vtiger_crmentity.deleted=0";
272 275
 
273
-		if ($where != '')
274
-			$query .= " WHERE ($where) && $where_auto";
275
-		else
276
-			$query .= " WHERE $where_auto";
276
+		if ($where != '') {
277
+					$query .= " WHERE ($where) && $where_auto";
278
+		} else {
279
+					$query .= " WHERE $where_auto";
280
+		}
277 281
 
278 282
 		require('user_privileges/user_privileges_' . $current_user->id . '.php');
279 283
 		require('user_privileges/sharing_privileges_' . $current_user->id . '.php');
@@ -302,8 +306,9 @@  discard block
 block discarded – undo
302 306
 		$select_clause = "SELECT %s.%s AS recordid, vtiger_users_last_import.deleted,%s";
303 307
 		$select_clause = sprintf($select_clause, $this->table_name, $this->table_index, $table_cols);
304 308
 		// Select Custom Field Table Columns if present
305
-		if (isset($this->customFieldTable))
306
-			$query .= ", " . $this->customFieldTable[0] . ".* ";
309
+		if (isset($this->customFieldTable)) {
310
+					$query .= ", " . $this->customFieldTable[0] . ".* ";
311
+		}
307 312
 
308 313
 		$from_clause = " FROM $this->table_name";
309 314
 
Please login to merge, or discard this patch.
modules/PBXManager/connectors/PBXManager.php 2 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -239,10 +239,11 @@  discard block
 block discarded – undo
239 239
 		$recordModel = PBXManager_Record_Model::getCleanInstance();
240 240
 		$recordModel->saveRecordWithArrray($params);
241 241
 
242
-		if ($direction == self::INCOMING_TYPE)
243
-			$this->respondToIncomingCall($details);
244
-		else
245
-			$this->respondToOutgoingCall($params['CustomerNumber']);
242
+		if ($direction == self::INCOMING_TYPE) {
243
+					$this->respondToIncomingCall($details);
244
+		} else {
245
+					$this->respondToOutgoingCall($params['CustomerNumber']);
246
+		}
246 247
 	}
247 248
 
248 249
 	/**
@@ -312,8 +313,9 @@  discard block
 block discarded – undo
312 313
 		} else {
313 314
 			$response .= '<Number>SIP/';
314 315
 			$response .= $to;
315
-			if ($numberLength > 5)
316
-				$response .= '@' . $this->getOutboundTrunk();
316
+			if ($numberLength > 5) {
317
+							$response .= '@' . $this->getOutboundTrunk();
318
+			}
317 319
 			$response .= '</Number>';
318 320
 		}
319 321
 
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,6 +54,9 @@  discard block
 block discarded – undo
54 54
 		return $this->webappurl;
55 55
 	}
56 56
 
57
+	/**
58
+	 * @return string
59
+	 */
57 60
 	public function getOutboundContext()
58 61
 	{
59 62
 		return $this->outboundcontext;
@@ -82,6 +85,7 @@  discard block
 block discarded – undo
82 85
 	/**
83 86
 	 * Function to set server parameters
84 87
 	 * @param <array>  authdetails
88
+	 * @param PBXManager_Server_Model $serverModel
85 89
 	 */
86 90
 	public function setServerParameters($serverModel)
87 91
 	{
@@ -100,6 +104,10 @@  discard block
 block discarded – undo
100 104
 		return self::$SETTINGS_REQUIRED_PARAMETERS;
101 105
 	}
102 106
 
107
+	/**
108
+	 * @param Vtiger_Request $details
109
+	 * @param string $type
110
+	 */
103 111
 	protected function prepareParameters($details, $type)
104 112
 	{
105 113
 		switch ($type) {
@@ -294,7 +302,6 @@  discard block
 block discarded – undo
294 302
 
295 303
 	/**
296 304
 	 * Function to respond for outgoing calls
297
-	 * @param Vtiger_Request $details 
298 305
 	 */
299 306
 	public function respondToOutgoingCall($to)
300 307
 	{
@@ -324,7 +331,7 @@  discard block
 block discarded – undo
324 331
 	/**
325 332
 	 * Function to make outbound call 
326 333
 	 * @param string $number (Customer)
327
-	 * @param string $recordid
334
+	 * @param string $record
328 335
 	 */
329 336
 	public function call($number, $record)
330 337
 	{
Please login to merge, or discard this patch.