@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Function to get CompanyDetails Menu item |
32 | - * @return menu item Model |
|
32 | + * @return Settings_Vtiger_MenuItem_Model item Model |
|
33 | 33 | */ |
34 | 34 | public function getMenuItem() |
35 | 35 | { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * Getting value to display |
20 | 20 | * @param type $value |
21 | - * @return type |
|
21 | + * @return string |
|
22 | 22 | */ |
23 | 23 | public function getDisplayValue($value) |
24 | 24 | { |
@@ -40,6 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Sets library name |
43 | + * @param string $name |
|
43 | 44 | */ |
44 | 45 | public function setLibraryName($name) |
45 | 46 | { |
@@ -56,6 +57,7 @@ discard block |
||
56 | 57 | |
57 | 58 | /** |
58 | 59 | * Sets the template id |
60 | + * @param integer $id |
|
59 | 61 | */ |
60 | 62 | public function setTemplateId($id) |
61 | 63 | { |
@@ -72,6 +74,7 @@ discard block |
||
72 | 74 | |
73 | 75 | /** |
74 | 76 | * Sets the record id |
77 | + * @param integer $id |
|
75 | 78 | */ |
76 | 79 | public function setRecordId($id) |
77 | 80 | { |
@@ -88,6 +91,7 @@ discard block |
||
88 | 91 | |
89 | 92 | /** |
90 | 93 | * Sets module name |
94 | + * @param string $name |
|
91 | 95 | */ |
92 | 96 | public function setModuleName($name) |
93 | 97 | { |
@@ -248,6 +252,7 @@ discard block |
||
248 | 252 | |
249 | 253 | /** |
250 | 254 | * Set header content |
255 | + * @param string $name |
|
251 | 256 | */ |
252 | 257 | public function setHeader($name, $header) |
253 | 258 | { |
@@ -257,6 +262,7 @@ discard block |
||
257 | 262 | |
258 | 263 | /** |
259 | 264 | * Set footer content |
265 | + * @param string $name |
|
260 | 266 | */ |
261 | 267 | public function setFooter($name, $footer) |
262 | 268 | { |
@@ -237,8 +237,9 @@ |
||
237 | 237 | public function getActivityTypeIcon() |
238 | 238 | { |
239 | 239 | $icon = $this->get('activitytype'); |
240 | - if ($icon == 'Task') |
|
241 | - $icon = 'Tasks'; |
|
240 | + if ($icon == 'Task') { |
|
241 | + $icon = 'Tasks'; |
|
242 | + } |
|
242 | 243 | return $icon . '.png'; |
243 | 244 | } |
244 | 245 |
@@ -12,6 +12,9 @@ |
||
12 | 12 | class Calendar_Record_Model extends Vtiger_Record_Model |
13 | 13 | { |
14 | 14 | |
15 | + /** |
|
16 | + * @param false|string $refModuleName |
|
17 | + */ |
|
15 | 18 | public static function getNameByReference($refModuleName) |
16 | 19 | { |
17 | 20 | $fieldName = Vtiger_Cache::get('NameRelatedField', $refModuleName . '-Calendar'); |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | $priorityMap = array('High' => '1', 'Medium' => '2', 'Low' => '3'); |
92 | 92 | $priorityval = $eventFields[$fieldName]; |
93 | 93 | $icalZeroPriority = 0; |
94 | - if (array_key_exists($priorityval, $priorityMap)) |
|
95 | - $temp[$fieldName] = $priorityMap[$priorityval]; |
|
96 | - else |
|
97 | - $temp[$fieldName] = $icalZeroPriority; |
|
98 | - } |
|
99 | - else { |
|
94 | + if (array_key_exists($priorityval, $priorityMap)) { |
|
95 | + $temp[$fieldName] = $priorityMap[$priorityval]; |
|
96 | + } else { |
|
97 | + $temp[$fieldName] = $icalZeroPriority; |
|
98 | + } |
|
99 | + } else { |
|
100 | 100 | $temp[$fieldName] = $eventFields[$fieldName]; |
101 | 101 | } |
102 | 102 | } |
@@ -115,12 +115,14 @@ discard block |
||
115 | 115 | $priorityMap = array('High' => '1', 'Medium' => '2', 'Low' => '3'); |
116 | 116 | $priorityval = $eventFields[$fieldName]; |
117 | 117 | $icalZeroPriority = 0; |
118 | - if (array_key_exists($priorityval, $priorityMap)) |
|
119 | - $temp[$fieldName] = $priorityMap[$priorityval]; |
|
120 | - else |
|
121 | - $temp[$fieldName] = $icalZeroPriority; |
|
122 | - } else |
|
123 | - $temp[$fieldName] = $eventFields[$fieldName]; |
|
118 | + if (array_key_exists($priorityval, $priorityMap)) { |
|
119 | + $temp[$fieldName] = $priorityMap[$priorityval]; |
|
120 | + } else { |
|
121 | + $temp[$fieldName] = $icalZeroPriority; |
|
122 | + } |
|
123 | + } else { |
|
124 | + $temp[$fieldName] = $eventFields[$fieldName]; |
|
125 | + } |
|
124 | 126 | } |
125 | 127 | $iCalTask = new iCalendar_todo; |
126 | 128 | $iCalTask->assign_values($temp); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | /** |
37 | 37 | * Function that generates Export Query based on the mode |
38 | 38 | * @param \App\Request $request |
39 | - * @return string export query |
|
39 | + * @return App\Db\Query export query |
|
40 | 40 | */ |
41 | 41 | public function getExportQuery(\App\Request $request) |
42 | 42 | { |
@@ -123,8 +123,9 @@ |
||
123 | 123 | if (array_key_exists('taskpriority', $activityFieldsList)) { |
124 | 124 | $priorityMap = array('0' => 'Medium', '1' => 'High', '2' => 'Medium', '3' => 'Low'); |
125 | 125 | $priorityval = $activityFieldsList['taskpriority']; |
126 | - if (array_key_exists($priorityval, $priorityMap)) |
|
127 | - $activityFieldsList['taskpriority'] = $priorityMap[$priorityval]; |
|
126 | + if (array_key_exists($priorityval, $priorityMap)) { |
|
127 | + $activityFieldsList['taskpriority'] = $priorityMap[$priorityval]; |
|
128 | + } |
|
128 | 129 | } |
129 | 130 | |
130 | 131 | $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $module = $todoModule; |
116 | 116 | } |
117 | 117 | |
118 | - $totalCount[$module] ++; |
|
118 | + $totalCount[$module]++; |
|
119 | 119 | $activityFieldsList = $activity->generateArray($icalActivities[$i]); |
120 | 120 | if (!array_key_exists('visibility', $activityFieldsList)) { |
121 | 121 | $activityFieldsList['visibility'] = ' '; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | foreach ($requiredFields[$module] as $key) { |
136 | 136 | $value = $recordModel->get($key); |
137 | 137 | if (empty($value)) { |
138 | - $skipCount[$module] ++; |
|
138 | + $skipCount[$module]++; |
|
139 | 139 | $skipRecord = true; |
140 | 140 | break; |
141 | 141 | } |
@@ -21,8 +21,9 @@ discard block |
||
21 | 21 | if (!empty($recordId)) { |
22 | 22 | $recordModel = Vtiger_Record_Model::getInstanceById($recordId); |
23 | 23 | $activityType = $recordModel->getType(); |
24 | - if ($activityType == 'Events') |
|
25 | - $moduleName = 'Events'; |
|
24 | + if ($activityType == 'Events') { |
|
25 | + $moduleName = 'Events'; |
|
26 | + } |
|
26 | 27 | } |
27 | 28 | if (!$this->record) { |
28 | 29 | $this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId); |
@@ -112,8 +113,9 @@ discard block |
||
112 | 113 | if (!empty($recordId)) { |
113 | 114 | $recordModel = Vtiger_Record_Model::getInstanceById($recordId); |
114 | 115 | $activityType = $recordModel->getType(); |
115 | - if ($activityType == 'Events') |
|
116 | - $moduleName = 'Events'; |
|
116 | + if ($activityType == 'Events') { |
|
117 | + $moduleName = 'Events'; |
|
118 | + } |
|
117 | 119 | } |
118 | 120 | |
119 | 121 | $detailViewModel = Vtiger_DetailView_Model::getInstance($moduleName, $recordId); |
@@ -16,8 +16,9 @@ discard block |
||
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 |
||
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 |
||
54 | 56 | self::parseOperation($value); |
55 | 57 | break; |
56 | 58 | case '86': |
57 | - if ($this->_lastTag == '86') |
|
58 | - $this->parseTransaction($value); |
|
59 | - else |
|
60 | - $this->info .= $value; |
|
59 | + if ($this->_lastTag == '86') { |
|
60 | + $this->parseTransaction($value); |
|
61 | + } else { |
|
62 | + $this->info .= $value; |
|
63 | + } |
|
61 | 64 | break; |
62 | 65 | default: |
63 | 66 | break; |
@@ -20,6 +20,9 @@ discard block |
||
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 |
||
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 |
||
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( |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $relationModuleModel = $this->getRelationModel()->getRelationModuleModel(); |
19 | 19 | if ($relationModuleModel->getName() == 'HelpDesk') { |
20 | 20 | if ($relationModuleModel->getField('parent_id')->isViewable()) { |
21 | - $createViewUrl .='&parent_id=' . $this->getParentRecordModel()->get('linktoaccountscontacts'); |
|
21 | + $createViewUrl .= '&parent_id=' . $this->getParentRecordModel()->get('linktoaccountscontacts'); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |