From 92cc94762391635048d0e5f7e616d9a64569e4e8 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 4 Mar 2020 12:41:52 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/core/tpl/contacts.tpl.php | 50 ++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 1b580fe5593..b4ada747d2c 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -185,7 +185,7 @@ foreach(array('internal', 'external') as $source) { $entry->nature = $langs->trans("User"); } - else if ($tab[$i]['source'] == 'external') + elseif ($tab[$i]['source'] == 'external') { $entry->nature = $langs->trans("ThirdPartyContact"); } @@ -195,11 +195,11 @@ foreach(array('internal', 'external') as $source) $companystatic->fetch($tab[$i]['socid']); $entry->thirdparty = $companystatic->getNomUrl(1); } - else if ($tab[$i]['socid'] < 0) + elseif ($tab[$i]['socid'] < 0) { $entry->thirdparty = $conf->global->MAIN_INFO_SOCIETE_NOM; } - else if (! $tab[$i]['socid']) + elseif (! $tab[$i]['socid']) { $entry->thirdparty = ""; } @@ -209,7 +209,7 @@ foreach(array('internal', 'external') as $source) $userstatic->fetch($tab[$i]['id']); $entry->contact = $userstatic->getNomUrl(-1, '', 0, 0, 0, 0, '', 'valignmiddle'); } - else if ($tab[$i]['source']=='external') + elseif ($tab[$i]['source']=='external') { $contactstatic->fetch($tab[$i]['id']); $entry->contact =$contactstatic->getNomUrl(1, '', 0, '', 0, 0); @@ -219,7 +219,7 @@ foreach(array('internal', 'external') as $source) { $entry->status = $userstatic->LibStatut($tab[$i]['statuscontact'], 3); } - else if ($tab[$i]['source']=='external') + elseif ($tab[$i]['source']=='external') { $entry->status = $contactstatic->LibStatut($tab[$i]['statuscontact'], 3); } @@ -337,14 +337,34 @@ print "\n"; // TODO: Remove this functions after switch to $db->sort($sortfield, $sortorder); -function nature_asc($left, $right) { return $left->nature > $right->nature; } -function thirdparty_asc($left, $right) { return $left->thirdparty > $right->thirdparty; } -function contact_asc($left, $right) { return $left->contact > $right->contact; } -function type_asc($left, $right) { return $left->type > $right->type; } -function status_asc($left, $right) { return $left->status > $right->status; } +function nature_asc($left, $right) +{ + return $left->nature > $right->nature; } +function thirdparty_asc($left, $right) +{ + return $left->thirdparty > $right->thirdparty; } +function contact_asc($left, $right) +{ + return $left->contact > $right->contact; } +function type_asc($left, $right) +{ + return $left->type > $right->type; } +function status_asc($left, $right) +{ + return $left->status > $right->status; } -function nature_desc($left, $right) { return $left->nature < $right->nature; } -function thirdparty_desc($left, $right) { return $left->thirdparty < $right->thirdparty; } -function contact_desc($left, $right) { return $left->contact < $right->contact; } -function type_desc($left, $right) { return $left->type < $right->type; } -function status_desc($left, $right) { return $left->status < $right->status; } +function nature_desc($left, $right) +{ + return $left->nature < $right->nature; } +function thirdparty_desc($left, $right) +{ + return $left->thirdparty < $right->thirdparty; } +function contact_desc($left, $right) +{ + return $left->contact < $right->contact; } +function type_desc($left, $right) +{ + return $left->type < $right->type; } +function status_desc($left, $right) +{ + return $left->status < $right->status; }