@@ -39,7 +39,7 @@ |
||
39 | 39 | * the next element. |
40 | 40 | * |
41 | 41 | * @param Reader $reader |
42 | - * @return mixed |
|
42 | + * @return PrincipalSearchPropertySetReport |
|
43 | 43 | */ |
44 | 44 | static function xmlDeserialize(Reader $reader) { |
45 | 45 |
@@ -20,39 +20,39 @@ |
||
20 | 20 | */ |
21 | 21 | class PrincipalSearchPropertySetReport implements XmlDeserializable { |
22 | 22 | |
23 | - /** |
|
24 | - * The deserialize method is called during xml parsing. |
|
25 | - * |
|
26 | - * This method is called statictly, this is because in theory this method |
|
27 | - * may be used as a type of constructor, or factory method. |
|
28 | - * |
|
29 | - * Often you want to return an instance of the current class, but you are |
|
30 | - * free to return other data as well. |
|
31 | - * |
|
32 | - * You are responsible for advancing the reader to the next element. Not |
|
33 | - * doing anything will result in a never-ending loop. |
|
34 | - * |
|
35 | - * If you just want to skip parsing for this element altogether, you can |
|
36 | - * just call $reader->next(); |
|
37 | - * |
|
38 | - * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
39 | - * the next element. |
|
40 | - * |
|
41 | - * @param Reader $reader |
|
42 | - * @return mixed |
|
43 | - */ |
|
44 | - static function xmlDeserialize(Reader $reader) { |
|
45 | - |
|
46 | - if (!$reader->isEmptyElement) { |
|
47 | - throw new BadRequest('The {DAV:}principal-search-property-set element must be empty'); |
|
48 | - } |
|
49 | - |
|
50 | - // The element is actually empty, so there's not much to do. |
|
51 | - $reader->next(); |
|
52 | - |
|
53 | - $self = new self(); |
|
54 | - return $self; |
|
55 | - |
|
56 | - } |
|
23 | + /** |
|
24 | + * The deserialize method is called during xml parsing. |
|
25 | + * |
|
26 | + * This method is called statictly, this is because in theory this method |
|
27 | + * may be used as a type of constructor, or factory method. |
|
28 | + * |
|
29 | + * Often you want to return an instance of the current class, but you are |
|
30 | + * free to return other data as well. |
|
31 | + * |
|
32 | + * You are responsible for advancing the reader to the next element. Not |
|
33 | + * doing anything will result in a never-ending loop. |
|
34 | + * |
|
35 | + * If you just want to skip parsing for this element altogether, you can |
|
36 | + * just call $reader->next(); |
|
37 | + * |
|
38 | + * $reader->parseInnerTree() will parse the entire sub-tree, and advance to |
|
39 | + * the next element. |
|
40 | + * |
|
41 | + * @param Reader $reader |
|
42 | + * @return mixed |
|
43 | + */ |
|
44 | + static function xmlDeserialize(Reader $reader) { |
|
45 | + |
|
46 | + if (!$reader->isEmptyElement) { |
|
47 | + throw new BadRequest('The {DAV:}principal-search-property-set element must be empty'); |
|
48 | + } |
|
49 | + |
|
50 | + // The element is actually empty, so there's not much to do. |
|
51 | + $reader->next(); |
|
52 | + |
|
53 | + $self = new self(); |
|
54 | + return $self; |
|
55 | + |
|
56 | + } |
|
57 | 57 | |
58 | 58 | } |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Sabre\DAVACL\Xml\Request; |
4 | 4 | |
5 | +use Sabre\DAV\Exception\BadRequest; |
|
5 | 6 | use Sabre\Xml\Reader; |
6 | 7 | use Sabre\Xml\XmlDeserializable; |
7 | -use Sabre\DAV\Exception\BadRequest; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * PrincipalSearchPropertySetReport request parser. |
@@ -611,6 +611,7 @@ discard block |
||
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 |
||
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) |
@@ -113,10 +113,11 @@ discard block |
||
113 | 113 | $query .= $this->getNonAdminAccessControlQuery('Accounts', $current_user); |
114 | 114 | $where_auto = " vtiger_crmentity.deleted = 0 "; |
115 | 115 | |
116 | - if ($where != '') |
|
117 | - $query .= sprintf(' where (%s) && %s', $where, $where_auto); |
|
118 | - else |
|
119 | - $query .= sprintf(' where %s', $where_auto); |
|
116 | + if ($where != '') { |
|
117 | + $query .= sprintf(' where (%s) && %s', $where, $where_auto); |
|
118 | + } else { |
|
119 | + $query .= sprintf(' where %s', $where_auto); |
|
120 | + } |
|
120 | 121 | |
121 | 122 | \App\Log::trace("Exiting create_export_query method ..."); |
122 | 123 | return $query; |
@@ -435,8 +436,9 @@ discard block |
||
435 | 436 | public function unlinkRelationship($id, $return_module, $return_id, $relatedName = false) |
436 | 437 | { |
437 | 438 | |
438 | - if (empty($return_module) || empty($return_id)) |
|
439 | - return; |
|
439 | + if (empty($return_module) || empty($return_id)) { |
|
440 | + return; |
|
441 | + } |
|
440 | 442 | |
441 | 443 | if ($return_module == 'Campaigns') { |
442 | 444 | $this->db->delete('vtiger_campaign_records', 'crmid=? && campaignid=?', [$id, $return_id]); |
@@ -451,8 +453,9 @@ discard block |
||
451 | 453 | public function save_related_module($module, $crmid, $with_module, $with_crmids, $relatedName = false) |
452 | 454 | { |
453 | 455 | $db = PearDatabase::getInstance(); |
454 | - if (!is_array($with_crmids)) |
|
455 | - $with_crmids = [$with_crmids]; |
|
456 | + if (!is_array($with_crmids)) { |
|
457 | + $with_crmids = [$with_crmids]; |
|
458 | + } |
|
456 | 459 | if (!in_array($with_module, ['Products', 'Campaigns'])) { |
457 | 460 | parent::save_related_module($module, $crmid, $with_module, $with_crmids, $relatedName); |
458 | 461 | } else { |
@@ -502,10 +505,12 @@ discard block |
||
502 | 505 | continue; |
503 | 506 | } |
504 | 507 | // Setup the default JOIN conditions if not specified |
505 | - if (empty($relmap[1])) |
|
506 | - $relmap[1] = $other->table_name; |
|
507 | - if (empty($relmap[2])) |
|
508 | - $relmap[2] = $relmap[0]; |
|
508 | + if (empty($relmap[1])) { |
|
509 | + $relmap[1] = $other->table_name; |
|
510 | + } |
|
511 | + if (empty($relmap[2])) { |
|
512 | + $relmap[2] = $relmap[0]; |
|
513 | + } |
|
509 | 514 | $join .= " LEFT JOIN $tname ON $tname.$relmap[0] = $relmap[1].$relmap[2]"; |
510 | 515 | } |
511 | 516 | } |
@@ -530,14 +535,16 @@ discard block |
||
530 | 535 | public function getRelatedContactsIds($id = null) |
531 | 536 | { |
532 | 537 | |
533 | - if ($id === null) |
|
534 | - $id = $this->id; |
|
538 | + if ($id === null) { |
|
539 | + $id = $this->id; |
|
540 | + } |
|
535 | 541 | $query = (new \App\Db\Query())->select('contactid')->from('vtiger_contactdetails') |
536 | 542 | ->innerJoin('vtiger_crmentity', 'vtiger_contactdetails.contactid = vtiger_crmentity.crmid') |
537 | 543 | ->where(['vtiger_contactdetails.parentid' => $id, 'vtiger_crmentity.deleted' => 0]); |
538 | 544 | $entityIds = $query->column(); |
539 | - if (empty($entityIds)) |
|
540 | - $entityIds = []; |
|
545 | + if (empty($entityIds)) { |
|
546 | + $entityIds = []; |
|
547 | + } |
|
541 | 548 | |
542 | 549 | return $entityIds; |
543 | 550 | } |
@@ -36,6 +36,9 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
39 | + /** |
|
40 | + * @param Vtiger_Widget_Model $widget |
|
41 | + */ |
|
39 | 42 | public function getData(Vtiger_Request $request, $widget) |
40 | 43 | { |
41 | 44 | $db = PearDatabase::getInstance(); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @param $userid -- The user Id:: Type integer |
57 | 57 | * @param $from_datetime -- The start date Obj :: Type Array |
58 | 58 | * @param $to_datetime -- The end date Obj :: Type Array |
59 | - * @param $view -- The calendar view :: Type String |
|
59 | + * @param string $view -- The calendar view :: Type String |
|
60 | 60 | * @returns $list :: Type Array |
61 | 61 | */ |
62 | 62 | public function readAppointment($userid, &$from_datetime, &$to_datetime, $view) |
@@ -286,6 +286,9 @@ discard block |
||
286 | 286 | return ($a->start_time->ts < $b->start_time->ts) ? -1 : 1; |
287 | 287 | } |
288 | 288 | |
289 | +/** |
|
290 | + * @param string $fldname |
|
291 | + */ |
|
289 | 292 | function getRoleBasesdPickList($fldname, $exist_val) |
290 | 293 | { |
291 | 294 | $adb = PearDatabase::getInstance(); |
@@ -222,13 +222,15 @@ discard block |
||
222 | 222 | $que = "select * from vtiger_sharedcalendar where sharedid=? and userid=?"; |
223 | 223 | $row = $adb->pquery($que, array($currentUser->id, $act_array["smownerid"])); |
224 | 224 | $no = $adb->getRowCount($row); |
225 | - if ($no > 0) |
|
226 | - $this->shared = true; |
|
225 | + if ($no > 0) { |
|
226 | + $this->shared = true; |
|
227 | + } |
|
227 | 228 | } |
228 | 229 | } |
229 | 230 | $this->image_name = $act_array["activitytype"] . ".gif"; |
230 | - if (!empty($act_array["recurringid"]) && !empty($act_array["recurringtype"])) |
|
231 | - $this->recurring = "Recurring.gif"; |
|
231 | + if (!empty($act_array["recurringid"]) && !empty($act_array["recurringtype"])) { |
|
232 | + $this->recurring = "Recurring.gif"; |
|
233 | + } |
|
232 | 234 | |
233 | 235 | $this->record = $act_array["activityid"]; |
234 | 236 | $date = new DateTimeField($act_array["date_start"] . ' ' . $act_array['time_start']); |
@@ -296,8 +298,9 @@ discard block |
||
296 | 298 | $roleid = $currentUser->roleid; |
297 | 299 | $roleids = Array(); |
298 | 300 | $subrole = getRoleSubordinates($roleid); |
299 | - if (count($subrole) > 0) |
|
300 | - $roleids = $subrole; |
|
301 | + if (count($subrole) > 0) { |
|
302 | + $roleids = $subrole; |
|
303 | + } |
|
301 | 304 | array_push($roleids, $roleid); |
302 | 305 | |
303 | 306 | //here we are checking wheather the table contains the sortorder column .If sortorder is present in the main picklist table, then the role2picklist will be applicable for this table... |
@@ -311,12 +314,14 @@ discard block |
||
311 | 314 | $res_val = $adb->pquery($pick_query, array($roleids)); |
312 | 315 | $num_val = $adb->num_rows($res_val); |
313 | 316 | } |
314 | - if ($num_val > 0) |
|
317 | + if ($num_val > 0) { |
|
318 | + $pick_val = $exist_val; |
|
319 | + } else { |
|
320 | + $pick_val = \App\Language::translate('LBL_NOT_ACCESSIBLE'); |
|
321 | + } |
|
322 | + } else { |
|
315 | 323 | $pick_val = $exist_val; |
316 | - else |
|
317 | - $pick_val = \App\Language::translate('LBL_NOT_ACCESSIBLE'); |
|
318 | - } else |
|
319 | - $pick_val = $exist_val; |
|
324 | + } |
|
320 | 325 | |
321 | 326 | return $pick_val; |
322 | 327 | } |
@@ -384,7 +384,7 @@ discard block |
||
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 |
||
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 | { |
@@ -87,12 +87,15 @@ discard block |
||
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 = array(); |
97 | 100 | |
98 | 101 | if ($index < 0 || $index > 23) { |
@@ -140,12 +143,15 @@ discard block |
||
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 = array(); |
150 | 156 | $month_array['day'] = $day; |
151 | 157 | $month_array['month'] = $month; |
@@ -356,8 +362,9 @@ discard block |
||
356 | 362 | } else { |
357 | 363 | die("year was not set"); |
358 | 364 | } |
359 | - if (empty($hour) && $hour !== 0) |
|
360 | - $hour = 0; |
|
365 | + if (empty($hour) && $hour !== 0) { |
|
366 | + $hour = 0; |
|
367 | + } |
|
361 | 368 | $this->ts = mktime($hour, $minute, $second, $month, $day, $year); |
362 | 369 | $this->setDateTime($this->ts); |
363 | 370 | } |
@@ -399,10 +406,12 @@ discard block |
||
399 | 406 | { |
400 | 407 | $hour = $this->z_hour; |
401 | 408 | $min = $this->minute; |
402 | - if (empty($hour)) |
|
403 | - $hour = '00'; |
|
404 | - if (empty($min)) |
|
405 | - $min = '00'; |
|
409 | + if (empty($hour)) { |
|
410 | + $hour = '00'; |
|
411 | + } |
|
412 | + if (empty($min)) { |
|
413 | + $min = '00'; |
|
414 | + } |
|
406 | 415 | return $hour . ':' . $min; |
407 | 416 | } |
408 | 417 | |
@@ -413,10 +422,11 @@ discard block |
||
413 | 422 | */ |
414 | 423 | public function get_changed_day($mode) |
415 | 424 | { |
416 | - if ($mode == 'increment') |
|
417 | - $day = $this->day + 1; |
|
418 | - else |
|
419 | - $day = $this->day - 1; |
|
425 | + if ($mode == 'increment') { |
|
426 | + $day = $this->day + 1; |
|
427 | + } else { |
|
428 | + $day = $this->day - 1; |
|
429 | + } |
|
420 | 430 | $date_data = array('day' => $day, |
421 | 431 | 'month' => $this->month, |
422 | 432 | 'year' => $this->year |
@@ -432,10 +442,11 @@ discard block |
||
432 | 442 | public function get_first_day_of_changed_week($mode) |
433 | 443 | { |
434 | 444 | $first_day = $this->getThisweekDaysbyIndex(1); |
435 | - if ($mode == 'increment') |
|
436 | - $day = $first_day->day + 7; |
|
437 | - else |
|
438 | - $day = $first_day->day - 7; |
|
445 | + if ($mode == 'increment') { |
|
446 | + $day = $first_day->day + 7; |
|
447 | + } else { |
|
448 | + $day = $first_day->day - 7; |
|
449 | + } |
|
439 | 450 | $date_data = array('day' => $day, |
440 | 451 | 'month' => $first_day->month, |
441 | 452 | 'year' => $first_day->year |
@@ -28,6 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Increment the time by interval and return value in YYYY-MM-DD HH:MM format. |
31 | + * @param integer $basetiming |
|
31 | 32 | */ |
32 | 33 | static function nexttime($basetiming, $interval) |
33 | 34 | { |
@@ -146,6 +147,7 @@ discard block |
||
146 | 147 | |
147 | 148 | /** |
148 | 149 | * Repeat Activity instance till given limit. |
150 | + * @param RecurringType|null $recurObj |
|
149 | 151 | */ |
150 | 152 | static function repeat($focus, $recurObj) |
151 | 153 | { |
@@ -175,8 +175,9 @@ |
||
175 | 175 | $endDate = date('Y-m-d', $endDateTime); |
176 | 176 | |
177 | 177 | // Reset the new_focus and prepare for reuse |
178 | - if (isset($new_focus->id)) |
|
179 | - unset($new_focus->id); |
|
178 | + if (isset($new_focus->id)) { |
|
179 | + unset($new_focus->id); |
|
180 | + } |
|
180 | 181 | $new_focus->column_fields = array(); |
181 | 182 | |
182 | 183 | foreach ($base_focus->column_fields as $key => $value) { |
@@ -27,7 +27,6 @@ |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Function returns Tickets grouped by Status |
30 | - * @param type $data |
|
31 | 30 | * @return <Array> |
32 | 31 | */ |
33 | 32 | public function getTicketsByStatus($owner) |
@@ -19,8 +19,9 @@ discard block |
||
19 | 19 | |
20 | 20 | $listSearchParams = []; |
21 | 21 | $conditions = array(array('ticketstatus', 'e', $value)); |
22 | - if (!empty($assignedto)) |
|
23 | - array_push($conditions, array('assigned_user_id', 'e', $assignedto)); |
|
22 | + if (!empty($assignedto)) { |
|
23 | + array_push($conditions, array('assigned_user_id', 'e', $assignedto)); |
|
24 | + } |
|
24 | 25 | $listSearchParams[] = $conditions; |
25 | 26 | return '&viewname=All&search_params=' . json_encode($listSearchParams); |
26 | 27 | } |
@@ -72,8 +73,9 @@ discard block |
||
72 | 73 | $priorities[$row['priority']] = $counter++; |
73 | 74 | $colors[$row['priority']] = $row['color']; |
74 | 75 | } |
75 | - if (!in_array($row['statusvalue'], $status)) |
|
76 | - $status[] = $row['statusvalue']; |
|
76 | + if (!in_array($row['statusvalue'], $status)) { |
|
77 | + $status[] = $row['statusvalue']; |
|
78 | + } |
|
77 | 79 | } |
78 | 80 | if (!empty($tickets)) { |
79 | 81 | $counter = 0; |
@@ -117,13 +119,15 @@ discard block |
||
117 | 119 | $data = $request->get('data'); |
118 | 120 | $createdTime = $request->get('createdtime'); |
119 | 121 | $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId()); |
120 | - if (!$request->has('owner')) |
|
121 | - $owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget, $moduleName); |
|
122 | - else |
|
123 | - $owner = $request->get('owner'); |
|
122 | + if (!$request->has('owner')) { |
|
123 | + $owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget, $moduleName); |
|
124 | + } else { |
|
125 | + $owner = $request->get('owner'); |
|
126 | + } |
|
124 | 127 | $ownerForwarded = $owner; |
125 | - if ($owner == 'all') |
|
126 | - $owner = ''; |
|
128 | + if ($owner == 'all') { |
|
129 | + $owner = ''; |
|
130 | + } |
|
127 | 131 | |
128 | 132 | //Date conversion from user to database format |
129 | 133 | if (!empty($createdTime)) { |
@@ -27,6 +27,9 @@ discard block |
||
27 | 27 | $this->user = $user; |
28 | 28 | } |
29 | 29 | |
30 | + /** |
|
31 | + * @param Vtiger_Request $request |
|
32 | + */ |
|
30 | 33 | public static function import($request, $user) |
31 | 34 | { |
32 | 35 | $importController = new Import_Main_View($request, $user); |
@@ -100,6 +103,9 @@ discard block |
||
100 | 103 | } |
101 | 104 | } |
102 | 105 | |
106 | + /** |
|
107 | + * @param boolean $continueImport |
|
108 | + */ |
|
103 | 109 | public static function showCurrentStatus($importInfo, $importStatusCount, $continueImport) |
104 | 110 | { |
105 | 111 | $moduleName = $importInfo['module']; |
@@ -210,6 +216,9 @@ discard block |
||
210 | 216 | Import_Queue_Action::add($this->request, $this->user); |
211 | 217 | } |
212 | 218 | |
219 | + /** |
|
220 | + * @param Vtiger_Request $request |
|
221 | + */ |
|
213 | 222 | public static function deleteMap($request) |
214 | 223 | { |
215 | 224 | $moduleName = $request->getModule(); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Add widget to other module. |
62 | - * @param unknown_type $moduleNames |
|
62 | + * @param string[] $moduleNames |
|
63 | 63 | * @return unknown_type |
64 | 64 | */ |
65 | 65 | static function addWidgetTo($moduleNames, $widgetType = 'DETAILVIEWWIDGET', $widgetName = 'DetailViewBlockCommentWidget') |
@@ -64,11 +64,13 @@ discard block |
||
64 | 64 | */ |
65 | 65 | static function addWidgetTo($moduleNames, $widgetType = 'DETAILVIEWWIDGET', $widgetName = 'DetailViewBlockCommentWidget') |
66 | 66 | { |
67 | - if (empty($moduleNames)) |
|
68 | - return; |
|
67 | + if (empty($moduleNames)) { |
|
68 | + return; |
|
69 | + } |
|
69 | 70 | |
70 | - if (is_string($moduleNames)) |
|
71 | - $moduleNames = array($moduleNames); |
|
71 | + if (is_string($moduleNames)) { |
|
72 | + $moduleNames = array($moduleNames); |
|
73 | + } |
|
72 | 74 | |
73 | 75 | $commentWidgetModules = array(); |
74 | 76 | foreach ($moduleNames as $moduleName) { |
@@ -95,11 +97,13 @@ discard block |
||
95 | 97 | */ |
96 | 98 | static function removeWidgetFrom($moduleNames, $widgetType = 'DETAILVIEWWIDGET', $widgetName = 'DetailViewBlockCommentWidget') |
97 | 99 | { |
98 | - if (empty($moduleNames)) |
|
99 | - return; |
|
100 | + if (empty($moduleNames)) { |
|
101 | + return; |
|
102 | + } |
|
100 | 103 | |
101 | - if (is_string($moduleNames)) |
|
102 | - $moduleNames = array($moduleNames); |
|
104 | + if (is_string($moduleNames)) { |
|
105 | + $moduleNames = array($moduleNames); |
|
106 | + } |
|
103 | 107 | |
104 | 108 | $commentWidgetModules = array(); |
105 | 109 | foreach ($moduleNames as $moduleName) { |