@@ -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 parseOperation($value) |
69 | 75 | { |
70 | 76 | $this->operations[] = array( |
@@ -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 == '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; |
@@ -332,7 +332,6 @@ |
||
332 | 332 | |
333 | 333 | /** |
334 | 334 | * Function to get the list view entries |
335 | - * @param Vtiger_Paging_Model $pagingModel |
|
336 | 335 | * @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance. |
337 | 336 | */ |
338 | 337 | public function getListViewCount() |
@@ -55,8 +55,6 @@ discard block |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * Function to restore the deleted records. |
58 | - * @param type $sourceModule |
|
59 | - * @param type $recordIds |
|
60 | 58 | */ |
61 | 59 | public function restoreRecords(Vtiger_Request $request) |
62 | 60 | { |
@@ -91,7 +89,6 @@ discard block |
||
91 | 89 | |
92 | 90 | /** |
93 | 91 | * Function to deleted the records permanently in CRM |
94 | - * @param type $reocrdIds |
|
95 | 92 | */ |
96 | 93 | public function deleteRecords(Vtiger_Request $request) |
97 | 94 | { |
@@ -49,7 +49,6 @@ discard block |
||
49 | 49 | |
50 | 50 | /** |
51 | 51 | * Function to get the list of Mass actions for the module |
52 | - * @param <Array> $linkParams |
|
53 | 52 | * @return <Array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions |
54 | 53 | */ |
55 | 54 | public function getListViewMassActions() |
@@ -143,7 +142,7 @@ discard block |
||
143 | 142 | |
144 | 143 | /** |
145 | 144 | * Function to deleted the records perminently in CRM |
146 | - * @param type $reocrdIds |
|
145 | + * @param type $recordIds |
|
147 | 146 | */ |
148 | 147 | public function deleteRecords($recordIds) |
149 | 148 | { |
@@ -16,6 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Function to get the list of listview links for the module |
19 | + * @param boolean $linkParams |
|
19 | 20 | * @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances |
20 | 21 | */ |
21 | 22 | public function getListViewLinks($linkParams) |
@@ -70,7 +71,7 @@ discard block |
||
70 | 71 | |
71 | 72 | /** |
72 | 73 | * Function to get the list of Mass actions for the module |
73 | - * @param <Array> $linkParams |
|
74 | + * @param boolean $linkParams |
|
74 | 75 | * @return <Array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions |
75 | 76 | */ |
76 | 77 | public function getListViewMassActions($linkParams) |
@@ -106,6 +106,11 @@ |
||
106 | 106 | return false; |
107 | 107 | } |
108 | 108 | |
109 | + /** |
|
110 | + * @param string $url |
|
111 | + * @param string $method |
|
112 | + * @param string $status |
|
113 | + */ |
|
109 | 114 | private function doRequest($url, $method, $data, $status) |
110 | 115 | { |
111 | 116 | $url = self::url . $url; |
@@ -122,14 +122,16 @@ |
||
122 | 122 | switch ($method) { |
123 | 123 | case 'GET': |
124 | 124 | curl_setopt($curl, CURLOPT_HTTPGET, true); |
125 | - if (count($data)) |
|
126 | - $url .= '?' . http_build_query($data); |
|
125 | + if (count($data)) { |
|
126 | + $url .= '?' . http_build_query($data); |
|
127 | + } |
|
127 | 128 | break; |
128 | 129 | |
129 | 130 | case 'POST': |
130 | 131 | curl_setopt($curl, CURLOPT_POST, true); |
131 | - if (count($data)) |
|
132 | - curl_setopt($curl, CURLOPT_POSTFIELDS, $data); |
|
132 | + if (count($data)) { |
|
133 | + curl_setopt($curl, CURLOPT_POSTFIELDS, $data); |
|
134 | + } |
|
133 | 135 | break; |
134 | 136 | } |
135 | 137 | curl_setopt($curl, CURLOPT_URL, $url); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $path = '/search/issues'; |
41 | 41 | $data['q'] = 'user:' . self::ownerRepository . ' repo:' . self::repository . " is:issue is:$state"; |
42 | 42 | if ($author) { |
43 | - $data['q'].=" author:$this->username"; |
|
43 | + $data['q'] .= " author:$this->username"; |
|
44 | 44 | } |
45 | 45 | $issues = $this->doRequest($path, 'GET', $data, '200'); |
46 | 46 | if ($issues === false) { |
@@ -42,6 +42,9 @@ |
||
42 | 42 | return $globalPermissions; |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @param integer $checked |
|
47 | + */ |
|
45 | 48 | public static function save($profileID, $globalactionid, $checked) |
46 | 49 | { |
47 | 50 | if ($globalactionid == 1) { |
@@ -31,12 +31,12 @@ |
||
31 | 31 | ->leftJoin('vtiger_profile', 'vtiger_profile.profileid = vtiger_profile2globalpermissions.profileid') |
32 | 32 | ->createCommand()->query(); |
33 | 33 | $globalPermissions = []; |
34 | - while($row = $dataReader->read()) { |
|
34 | + while ($row = $dataReader->read()) { |
|
35 | 35 | $profileid = $row['profileid']; |
36 | 36 | $actionId = $row['globalactionid']; |
37 | 37 | $permissionId = $row['globalactionpermission']; |
38 | 38 | $profilename = $row['profilename']; |
39 | - $description =$row['description']; |
|
39 | + $description = $row['description']; |
|
40 | 40 | $globalPermissions[$profileid]['gp_' . $actionId] = $permissionId; |
41 | 41 | $globalPermissions[$profileid]['profilename'] = $profilename; |
42 | 42 | $globalPermissions[$profileid]['description'] = $description; |
@@ -347,6 +347,9 @@ discard block |
||
347 | 347 | return $resp; |
348 | 348 | } |
349 | 349 | |
350 | + /** |
|
351 | + * @param string $dir |
|
352 | + */ |
|
350 | 353 | public function DeleteDir($dir) |
351 | 354 | { |
352 | 355 | $fd = opendir($dir); |
@@ -365,6 +368,10 @@ discard block |
||
365 | 368 | rmdir($dir); |
366 | 369 | } |
367 | 370 | |
371 | + /** |
|
372 | + * @param string $src |
|
373 | + * @param string $dst |
|
374 | + */ |
|
368 | 375 | public function CopyDir($src, $dst) |
369 | 376 | { |
370 | 377 | $dir = opendir($src); |
@@ -430,6 +437,9 @@ discard block |
||
430 | 437 | return $data; |
431 | 438 | } |
432 | 439 | |
440 | + /** |
|
441 | + * @param boolean $byModule |
|
442 | + */ |
|
433 | 443 | public function getStats($data, $langBase, $byModule) |
434 | 444 | { |
435 | 445 | $differences = []; |
@@ -369,8 +369,8 @@ |
||
369 | 369 | { |
370 | 370 | $dir = opendir($src); |
371 | 371 | @mkdir($dst); |
372 | - while (false !== ( $file = readdir($dir))) { |
|
373 | - if (( $file != '.' ) && ( $file != '..' )) { |
|
372 | + while (false !== ($file = readdir($dir))) { |
|
373 | + if (($file != '.') && ($file != '..')) { |
|
374 | 374 | if (is_dir($src . '/' . $file)) { |
375 | 375 | self::CopyDir($src . '/' . $file, $dst . '/' . $file); |
376 | 376 | } else { |
@@ -349,11 +349,13 @@ discard block |
||
349 | 349 | public function DeleteDir($dir) |
350 | 350 | { |
351 | 351 | $fd = opendir($dir); |
352 | - if (!$fd) |
|
353 | - return false; |
|
352 | + if (!$fd) { |
|
353 | + return false; |
|
354 | + } |
|
354 | 355 | while (($file = readdir($fd)) !== false) { |
355 | - if ($file == "." || $file == "..") |
|
356 | - continue; |
|
356 | + if ($file == "." || $file == "..") { |
|
357 | + continue; |
|
358 | + } |
|
357 | 359 | if (is_dir($dir . "/" . $file)) { |
358 | 360 | self::DeleteDir($dir . "/" . $file); |
359 | 361 | } else { |
@@ -405,10 +407,11 @@ discard block |
||
405 | 407 | $db->createCommand()->update('vtiger_language', ['isdefault' => 0], ['isdefault' => 1])->execute(); |
406 | 408 | } |
407 | 409 | $status = $db->createCommand()->update('vtiger_language', ['isdefault' => 1], ['prefix' => $prefix])->execute(); |
408 | - if ($status) |
|
409 | - $status = true; |
|
410 | - else |
|
411 | - $status = false; |
|
410 | + if ($status) { |
|
411 | + $status = true; |
|
412 | + } else { |
|
413 | + $status = false; |
|
414 | + } |
|
412 | 415 | \App\Log::trace("Exiting Settings_LangManagement_Module_Model::setAsDefault() method ..."); |
413 | 416 | return array('success' => $status, 'prefixOld' => $prefixOld); |
414 | 417 | } |
@@ -435,8 +438,9 @@ discard block |
||
435 | 438 | $differences = []; |
436 | 439 | $i = 0; |
437 | 440 | foreach ($data as $id => $dataLang) { |
438 | - if (!in_array($id, ['php', 'js'])) |
|
439 | - continue; |
|
441 | + if (!in_array($id, ['php', 'js'])) { |
|
442 | + continue; |
|
443 | + } |
|
440 | 444 | foreach ($dataLang as $key => $langs) { |
441 | 445 | foreach ($langs as $lang => $value) { |
442 | 446 | if ($lang == $langBase) { |
@@ -99,7 +99,7 @@ |
||
99 | 99 | |
100 | 100 | /** |
101 | 101 | * Function to retrieve block instances for a module |
102 | - * @param <type> $moduleModel - module instance |
|
102 | + * @param Settings_LayoutEditor_Module_Model $moduleModel - module instance |
|
103 | 103 | * @return <array> - list of Vtiger_Block_Model |
104 | 104 | */ |
105 | 105 | public static function getAllForModule($moduleModel) |