Completed
Push — developer ( dcd43f...1946c6 )
by Błażej
48:56 queued 21:47
created
modules/Accounts/Accounts.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -611,6 +611,7 @@  discard block
 block discarded – undo
611 611
 	 * @param  integer   $id      		- accountid
612 612
 	 * @param  array   $parent_accounts   - Array of all the parent accounts
613 613
 	 * returns All the parent accounts of the given accountid in array format
614
+	 * @param integer[] $encountered_accounts
614 615
 	 */
615 616
 	public function __getParentAccounts($id, &$parent_accounts, &$encountered_accounts, $depthBase = 0)
616 617
 	{
@@ -673,7 +674,7 @@  discard block
 block discarded – undo
673 674
 	 * Function to Recursively get all the child accounts of a given Account
674 675
 	 * @param  integer   $id      		- accountid
675 676
 	 * @param  array   $child_accounts   - Array of all the child accounts
676
-	 * @param  integer   $depth          - Depth at which the particular account has to be placed in the hierarchy
677
+	 * @param  integer   $depthBase          - Depth at which the particular account has to be placed in the hierarchy
677 678
 	 * returns All the child accounts of the given accountid in array format
678 679
 	 */
679 680
 	public function __getChildAccounts($id, &$child_accounts, $depthBase)
Please login to merge, or discard this patch.
Braces   +23 added lines, -16 removed lines patch added patch discarded remove patch
@@ -111,10 +111,11 @@  discard block
 block discarded – undo
111 111
 		$query .= $this->getNonAdminAccessControlQuery('Accounts', $current_user);
112 112
 		$where_auto = " vtiger_crmentity.deleted = 0 ";
113 113
 
114
-		if ($where != '')
115
-			$query .= sprintf(' where (%s) && %s', $where, $where_auto);
116
-		else
117
-			$query .= sprintf(' where %s', $where_auto);
114
+		if ($where != '') {
115
+					$query .= sprintf(' where (%s) && %s', $where, $where_auto);
116
+		} else {
117
+					$query .= sprintf(' where %s', $where_auto);
118
+		}
118 119
 
119 120
 		\App\Log::trace("Exiting create_export_query method ...");
120 121
 		return $query;
@@ -430,8 +431,9 @@  discard block
 block discarded – undo
430 431
 	public function unlinkRelationship($id, $return_module, $return_id, $relatedName = false)
431 432
 	{
432 433
 
433
-		if (empty($return_module) || empty($return_id))
434
-			return;
434
+		if (empty($return_module) || empty($return_id)) {
435
+					return;
436
+		}
435 437
 
436 438
 		if ($return_module === 'Campaigns') {
437 439
 			App\Db::getInstance()->createCommand()->delete('vtiger_campaign_records', ['crmid' => $id, 'campaignid' => $return_id])->execute();
@@ -444,8 +446,9 @@  discard block
 block discarded – undo
444 446
 
445 447
 	public function save_related_module($module, $crmid, $with_module, $with_crmids, $relatedName = false)
446 448
 	{
447
-		if (!is_array($with_crmids))
448
-			$with_crmids = [$with_crmids];
449
+		if (!is_array($with_crmids)) {
450
+					$with_crmids = [$with_crmids];
451
+		}
449 452
 		if (!in_array($with_module, ['Products', 'Campaigns'])) {
450 453
 			parent::save_related_module($module, $crmid, $with_module, $with_crmids, $relatedName);
451 454
 		} else {
@@ -495,10 +498,12 @@  discard block
 block discarded – undo
495 498
 					continue;
496 499
 				}
497 500
 				// Setup the default JOIN conditions if not specified
498
-				if (empty($relmap[1]))
499
-					$relmap[1] = $other->table_name;
500
-				if (empty($relmap[2]))
501
-					$relmap[2] = $relmap[0];
501
+				if (empty($relmap[1])) {
502
+									$relmap[1] = $other->table_name;
503
+				}
504
+				if (empty($relmap[2])) {
505
+									$relmap[2] = $relmap[0];
506
+				}
502 507
 				$join .= " LEFT JOIN $tname ON $tname.$relmap[0] = $relmap[1].$relmap[2]";
503 508
 			}
504 509
 		}
@@ -523,14 +528,16 @@  discard block
 block discarded – undo
523 528
 	public function getRelatedContactsIds($id = null)
524 529
 	{
525 530
 
526
-		if ($id === null)
527
-			$id = $this->id;
531
+		if ($id === null) {
532
+					$id = $this->id;
533
+		}
528 534
 		$query = (new \App\Db\Query())->select('contactid')->from('vtiger_contactdetails')
529 535
 			->innerJoin('vtiger_crmentity', 'vtiger_contactdetails.contactid = vtiger_crmentity.crmid')
530 536
 			->where(['vtiger_contactdetails.parentid' => $id, 'vtiger_crmentity.deleted' => 0]);
531 537
 		$entityIds = $query->column();
532
-		if (empty($entityIds))
533
-			$entityIds = [];
538
+		if (empty($entityIds)) {
539
+					$entityIds = [];
540
+		}
534 541
 
535 542
 		return $entityIds;
536 543
 	}
Please login to merge, or discard this patch.
modules/Calendar/actions/Calendar.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -109,6 +109,9 @@
 block discarded – undo
109 109
 		$response->emit();
110 110
 	}
111 111
 
112
+	/**
113
+	 * @param string $datetime
114
+	 */
112 115
 	public function changeDateTime($datetime, $delta)
113 116
 	{
114 117
 		$date = new DateTime($datetime);
Please login to merge, or discard this patch.
modules/Calendar/actions/DragDropAjax.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -119,6 +119,9 @@
 block discarded – undo
119 119
 	 * Function adds days and minutes to datetime string
120 120
 	 */
121 121
 
122
+	/**
123
+	 * @param string $datetime
124
+	 */
122 125
 	public function changeDateTime($datetime, $daysToAdd, $minutesToAdd)
123 126
 	{
124 127
 		$datetime = strtotime($datetime);
Please login to merge, or discard this patch.
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@  discard block
 block discarded – undo
51 51
 			$resultDateTime = $this->changeDateTime($oldDateTime, $dayDelta, $minuteDelta);
52 52
 			$parts = explode(' ', $resultDateTime);
53 53
 			$record->set('due_date', $parts[0]);
54
-			if (activitytype != 'Task')
55
-				$record->set('time_end', $parts[1]);
54
+			if (activitytype != 'Task') {
55
+							$record->set('time_end', $parts[1]);
56
+			}
56 57
 
57 58
 			$startDateTime[] = $record->get('date_start');
58 59
 			$startDateTime[] = $record->get('time_start');
@@ -64,10 +65,11 @@  discard block
 block discarded – undo
64 65
 			$endDateTime = implode(' ', $endDateTime);
65 66
 			$endDateTime = new DateTime($endDateTime);
66 67
 			//Checking if startDateTime is less than or equal to endDateTime
67
-			if ($startDateTime <= $endDateTime)
68
-				$record->save();
69
-			else
70
-				$result['error'] = true;
68
+			if ($startDateTime <= $endDateTime) {
69
+							$record->save();
70
+			} else {
71
+							$result['error'] = true;
72
+			}
71 73
 
72 74
 			$response->setResult($result);
73 75
 			$response->emit();
@@ -107,8 +109,9 @@  discard block
 block discarded – undo
107 109
 			$resultDateTime = $this->changeDateTime($oldEndDateTime, $dayDelta, $minuteDelta);
108 110
 			$parts = explode(' ', $resultDateTime);
109 111
 			$record->set('due_date', $parts[0]);
110
-			if (activitytype != 'Task')
111
-				$record->set('time_end', $parts[1]);
112
+			if (activitytype != 'Task') {
113
+							$record->set('time_end', $parts[1]);
114
+			}
112 115
 			$record->save();
113 116
 
114 117
 			$response->setResult($result);
Please login to merge, or discard this patch.
modules/Calendar/Date.php 2 patches
Doc Comments   +1 added lines, -5 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
 	/**
386 386
 	 *
387
-	 * @return Date
387
+	 * @return string
388 388
 	 */
389 389
 	public function get_DB_formatted_date()
390 390
 	{
@@ -529,10 +529,6 @@  discard block
 block discarded – undo
529 529
 	 * This should be used whereever possible
530 530
 	 *
531 531
 	 * @param integer       $index - number between 0 to 42
532
-	 * @param string        $day   - date
533
-	 * @param string        $month - month
534
-	 * @param string        $year  - year
535
-	 * return vt_DateTime obj  $datetimevalue
536 532
 	 */
537 533
 	public function getThisMonthsDayByIndex($index)
538 534
 	{
Please login to merge, or discard this patch.
Braces   +37 added lines, -26 removed lines patch added patch discarded remove patch
@@ -87,12 +87,15 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getTodayDatetimebyIndex($index, $day = '', $month = '', $year = '')
89 89
 	{
90
-		if ($day === '')
91
-			$day = $this->day;
92
-		if ($month === '')
93
-			$month = $this->month;
94
-		if ($year === '')
95
-			$year = $this->year;
90
+		if ($day === '') {
91
+					$day = $this->day;
92
+		}
93
+		if ($month === '') {
94
+					$month = $this->month;
95
+		}
96
+		if ($year === '') {
97
+					$year = $this->year;
98
+		}
96 99
 		$day_array = [];
97 100
 
98 101
 		if ($index < 0 || $index > 23) {
@@ -140,12 +143,15 @@  discard block
 block discarded – undo
140 143
 	 */
141 144
 	public function getThismonthDaysbyIndex($index, $day = '', $month = '', $year = '')
142 145
 	{
143
-		if ($day == '')
144
-			$day = $index + 1;
145
-		if ($month == '')
146
-			$month = $this->month;
147
-		if ($year == '')
148
-			$year = $this->year;
146
+		if ($day == '') {
147
+					$day = $index + 1;
148
+		}
149
+		if ($month == '') {
150
+					$month = $this->month;
151
+		}
152
+		if ($year == '') {
153
+					$year = $this->year;
154
+		}
149 155
 		$month_array = [];
150 156
 		$month_array['day'] = $day;
151 157
 		$month_array['month'] = $month;
@@ -355,8 +361,9 @@  discard block
 block discarded – undo
355 361
 		} else {
356 362
 			throw new \App\Exceptions\AppException('year was not set');
357 363
 		}
358
-		if (empty($hour) && $hour !== 0)
359
-			$hour = 0;
364
+		if (empty($hour) && $hour !== 0) {
365
+					$hour = 0;
366
+		}
360 367
 		$this->ts = mktime($hour, $minute, $second, $month, $day, $year);
361 368
 		$this->setDateTime($this->ts);
362 369
 	}
@@ -398,10 +405,12 @@  discard block
 block discarded – undo
398 405
 	{
399 406
 		$hour = $this->z_hour;
400 407
 		$min = $this->minute;
401
-		if (empty($hour))
402
-			$hour = '00';
403
-		if (empty($min))
404
-			$min = '00';
408
+		if (empty($hour)) {
409
+					$hour = '00';
410
+		}
411
+		if (empty($min)) {
412
+					$min = '00';
413
+		}
405 414
 		return $hour . ':' . $min;
406 415
 	}
407 416
 
@@ -412,10 +421,11 @@  discard block
 block discarded – undo
412 421
 	 */
413 422
 	public function get_changed_day($mode)
414 423
 	{
415
-		if ($mode == 'increment')
416
-			$day = $this->day + 1;
417
-		else
418
-			$day = $this->day - 1;
424
+		if ($mode == 'increment') {
425
+					$day = $this->day + 1;
426
+		} else {
427
+					$day = $this->day - 1;
428
+		}
419 429
 		$date_data = array('day' => $day,
420 430
 			'month' => $this->month,
421 431
 			'year' => $this->year
@@ -431,10 +441,11 @@  discard block
 block discarded – undo
431 441
 	public function get_first_day_of_changed_week($mode)
432 442
 	{
433 443
 		$first_day = $this->getThisweekDaysbyIndex(1);
434
-		if ($mode == 'increment')
435
-			$day = $first_day->day + 7;
436
-		else
437
-			$day = $first_day->day - 7;
444
+		if ($mode == 'increment') {
445
+					$day = $first_day->day + 7;
446
+		} else {
447
+					$day = $first_day->day - 7;
448
+		}
438 449
 		$date_data = array('day' => $day,
439 450
 			'month' => $first_day->month,
440 451
 			'year' => $first_day->year
Please login to merge, or discard this patch.
modules/OSSEmployees/OSSEmployees.php 2 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -149,6 +149,10 @@  discard block
 block discarded – undo
149 149
 		return $hierarchy;
150 150
 	}
151 151
 
152
+	/**
153
+	 * @param integer $id
154
+	 * @param integer[] $encountered_accounts
155
+	 */
152 156
 	public function __getParentEmployees($id, &$parent_accounts, &$encountered_accounts)
153 157
 	{
154 158
 		$adb = PearDatabase::getInstance();
@@ -200,6 +204,9 @@  discard block
 block discarded – undo
200 204
 		return $parent_accounts;
201 205
 	}
202 206
 
207
+	/**
208
+	 * @param integer $id
209
+	 */
203 210
 	public function __getChildEmployees($id, &$child_accounts, $depth)
204 211
 	{
205 212
 		$adb = PearDatabase::getInstance();
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,8 +257,9 @@
 block discarded – undo
257 257
 			$modcommentsModuleInstance = vtlib\Module::getInstance('ModComments');
258 258
 			if ($modcommentsModuleInstance && file_exists('modules/ModComments/ModComments.php')) {
259 259
 				include_once 'modules/ModComments/ModComments.php';
260
-				if (class_exists('ModComments'))
261
-					ModComments::addWidgetTo(array('OSSEmployees'));
260
+				if (class_exists('ModComments')) {
261
+									ModComments::addWidgetTo(array('OSSEmployees'));
262
+				}
262 263
 			}
263 264
 		} else if ($event_type == 'module.disabled') {
264 265
 			
Please login to merge, or discard this patch.
modules/PaymentsIn/helpers/mt940.php 2 patches
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -50,6 +50,9 @@  discard block
 block discarded – undo
50 50
 		return $xml;
51 51
 	}
52 52
 
53
+	/**
54
+	 * @param integer $level
55
+	 */
53 56
 	protected function createXML($key, $value, $level)
54 57
 	{
55 58
 		$indent = '';
@@ -69,6 +72,9 @@  discard block
 block discarded – undo
69 72
 		return $xml;
70 73
 	}
71 74
 
75
+	/**
76
+	 * @param string $line
77
+	 */
72 78
 	protected function parseLine($line)
73 79
 	{
74 80
 		$tag = substr($line, 1, strpos($line, ':', 1) - 1);
@@ -114,6 +120,9 @@  discard block
 block discarded – undo
114 120
 		$this->_lastTag = $tag;
115 121
 	}
116 122
 
123
+	/**
124
+	 * @param string $value
125
+	 */
117 126
 	protected function parseOperation($value)
118 127
 	{
119 128
 		$this->operations[] = array(
@@ -124,6 +133,9 @@  discard block
 block discarded – undo
124 133
 		);
125 134
 	}
126 135
 
136
+	/**
137
+	 * @param string $value
138
+	 */
127 139
 	protected function parseBalance($value)
128 140
 	{
129 141
 		return array(
@@ -134,6 +146,9 @@  discard block
 block discarded – undo
134 146
 		);
135 147
 	}
136 148
 
149
+	/**
150
+	 * @param string $value
151
+	 */
137 152
 	protected function parseTransaction($value)
138 153
 	{
139 154
 		$transaction = array(
Please login to merge, or discard this patch.
Braces   +19 added lines, -14 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 	public function parse()
35 35
 	{
36 36
 		$tab = $this->prepareFile();
37
-		foreach ($tab as $line)
38
-			$this->parseLine($line);
37
+		foreach ($tab as $line) {
38
+					$this->parseLine($line);
39
+		}
39 40
 	}
40 41
 
41 42
 	public function getXML()
@@ -53,13 +54,15 @@  discard block
 block discarded – undo
53 54
 	protected function createXML($key, $value, $level)
54 55
 	{
55 56
 		$indent = '';
56
-		for ($i = 0; $i <= $level; $i++)
57
-			$indent .= "\t";
57
+		for ($i = 0; $i <= $level; $i++) {
58
+					$indent .= "\t";
59
+		}
58 60
 		if (is_array($value)) {
59 61
 			$xml = "$indent<$key>\n";
60 62
 			foreach ($value as $subKey => $subVal) {
61
-				if (is_numeric($subKey))
62
-					$subKey = substr($key, 0, -1);
63
+				if (is_numeric($subKey)) {
64
+									$subKey = substr($key, 0, -1);
65
+				}
63 66
 				$xml .= $this->createXML($subKey, $subVal, $level + 1);
64 67
 			}
65 68
 			$xml .= "$indent</$key>\n";
@@ -85,10 +88,11 @@  discard block
 block discarded – undo
85 88
 				break;
86 89
 			case 'NS':
87 90
 				$code = substr($value, 0, 2);
88
-				if ($code == '22')
89
-					$this->ownerName = substr($value, 2);
90
-				else if ($code == '23')
91
-					$this->accountName = substr($value, 2);
91
+				if ($code == '22') {
92
+									$this->ownerName = substr($value, 2);
93
+				} else if ($code == '23') {
94
+									$this->accountName = substr($value, 2);
95
+				}
92 96
 				break;
93 97
 			case '60F':
94 98
 				$this->openBalance = $this->parseBalance($value);
@@ -103,10 +107,11 @@  discard block
 block discarded – undo
103 107
 				self::parseOperation($value);
104 108
 				break;
105 109
 			case '86':
106
-				if ($this->_lastTag == '61')
107
-					$this->parseTransaction($value);
108
-				else
109
-					$this->info .= $value;
110
+				if ($this->_lastTag == '61') {
111
+									$this->parseTransaction($value);
112
+				} else {
113
+									$this->info .= $value;
114
+				}
110 115
 				break;
111 116
 			default:
112 117
 				break;
Please login to merge, or discard this patch.
modules/PaymentsIn/helpers/subclass/mt940_Alior.php 2 patches
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.
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.
modules/PaymentsIn/helpers/subclass/mt940_BGK.php 2 patches
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.
Braces   +11 added lines, -8 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);
@@ -62,8 +64,9 @@  discard block
 block discarded – undo
62 64
 			default:
63 65
 				break;
64 66
 		}
65
-		if ($tag)
66
-			$this->_lastTag = $tag;
67
+		if ($tag) {
68
+					$this->_lastTag = $tag;
69
+		}
67 70
 	}
68 71
 
69 72
 	protected function parseTransaction($value)
Please login to merge, or discard this patch.
modules/PaymentsIn/helpers/subclass/mt940_Citi.php 2 patches
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
 
@@ -68,6 +71,9 @@  discard block
 block discarded – undo
68 71
 			$this->_lastTag = $tag;
69 72
 	}
70 73
 
74
+	/**
75
+	 * @param string $value
76
+	 */
71 77
 	protected function parseTransaction($value)
72 78
 	{
73 79
 		$transaction = array(
@@ -113,6 +119,9 @@  discard block
 block discarded – undo
113 119
 		$this->operations[count($this->operations) - 1]['details'] = $transaction;
114 120
 	}
115 121
 
122
+	/**
123
+	 * @param string $value
124
+	 */
116 125
 	protected function parseOperation($value)
117 126
 	{
118 127
 		$this->operations[] = array(
Please login to merge, or discard this patch.
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.