@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; |
89 | 89 | |
90 | -call_user_func(function () { |
|
90 | +call_user_func(function() { |
|
91 | 91 | $loader = Luracast\Restler\AutoLoader::instance(); |
92 | 92 | spl_autoload_register($loader); |
93 | 93 | return $loader; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | // If MAIN_API_DEBUG is set to 1, we save logs into file "dolibarr_api.log" |
162 | 162 | if (!empty($conf->global->MAIN_API_DEBUG)) { |
163 | 163 | $r = $api->r; |
164 | - $r->onCall(function () use ($r) { |
|
164 | + $r->onCall(function() use ($r) { |
|
165 | 165 | // Don't log Luracast Restler Explorer recources calls |
166 | 166 | //if (!preg_match('/^explorer/', $r->url)) { |
167 | 167 | // 'method' => $api->r->requestMethod, |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | } |
345 | 345 | } |
346 | 346 | |
347 | - if (! $endpointisallowed) { |
|
347 | + if (!$endpointisallowed) { |
|
348 | 348 | dol_syslog('The API with endpoint /'.$classfile.' is forbidden by config API_ENDPOINT_RULES', LOG_WARNING); |
349 | 349 | print 'The API with endpoint /'.$classfile.' is forbidden by config API_ENDPOINT_RULES'; |
350 | 350 | header('HTTP/1.1 501 API is forbidden by API_ENDPOINT_RULES'); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | print '<div class="fichecenter">'; |
68 | 68 | print '<div class="fichehalfleft">'; |
69 | 69 | print '<div class="underbanner clearboth"></div>'; |
70 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
70 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
71 | 71 | $mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position'); |
72 | 72 | foreach ($mode_info['fields'] as $field_key => $field_info) { |
73 | 73 | if (!empty($field_info['enabled_field'])) { |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | print '<table class="border centpercent tableforfield">'; |
95 | 95 | } |
96 | 96 | |
97 | - $key = $mode_key . '_' . $field_key; |
|
97 | + $key = $mode_key.'_'.$field_key; |
|
98 | 98 | $value = $assetdepreciationoptions->deprecation_options[$mode_key][$field_key]; |
99 | 99 | |
100 | - print '<tr class="field_' . $key . '"><td'; |
|
101 | - print ' class="' . (empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']) . ' fieldname_' . $key; |
|
100 | + print '<tr class="field_'.$key.'"><td'; |
|
101 | + print ' class="'.(empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']).' fieldname_'.$key; |
|
102 | 102 | if ($field_info['type'] == 'text' || $field_info['type'] == 'html') { |
103 | 103 | print ' tdtop'; |
104 | 104 | } |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | } |
114 | 114 | } |
115 | 115 | print '</td>'; |
116 | - print '<td class="valuefield fieldname_' . $key; |
|
116 | + print '<td class="valuefield fieldname_'.$key; |
|
117 | 117 | if ($field_info['type'] == 'text') { |
118 | 118 | print ' wordbreak'; |
119 | 119 | } |
120 | 120 | if (!empty($field_info['cssview'])) { |
121 | - print ' ' . $field_info['cssview']; |
|
121 | + print ' '.$field_info['cssview']; |
|
122 | 122 | } |
123 | 123 | print '">'; |
124 | 124 | if (in_array($field_info['type'], array('text', 'html'))) { |
@@ -126,15 +126,15 @@ discard block |
||
126 | 126 | } |
127 | 127 | if ($field_key == 'lang') { |
128 | 128 | $langs->load("languages"); |
129 | - $labellang = ($value ? $langs->trans('Language_' . $value) : ''); |
|
129 | + $labellang = ($value ? $langs->trans('Language_'.$value) : ''); |
|
130 | 130 | print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"'); |
131 | 131 | print $labellang; |
132 | 132 | } else { |
133 | 133 | if (isset($field_info['copytoclipboard']) && $field_info['copytoclipboard'] == 2) { |
134 | - $out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0); |
|
134 | + $out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0); |
|
135 | 135 | print showValueWithClipboardCPButton($out, 0, $out); |
136 | 136 | } else { |
137 | - print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0); |
|
137 | + print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0); |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | if (in_array($field_info['type'], array('text', 'html'))) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $amount = $credit; |
107 | 107 | } |
108 | 108 | |
109 | - return "'" . $this->db->escape(abs($amount)) . "'"; |
|
109 | + return "'".$this->db->escape(abs($amount))."'"; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return "''"; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $sens = 'C'; |
135 | 135 | } |
136 | 136 | |
137 | - return "'" . $this->db->escape($sens) . "'"; |
|
137 | + return "'".$this->db->escape($sens)."'"; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return "''"; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $action = GETPOST('action', 'aZ09'); |
45 | 45 | $value = GETPOST('value', 'alpha'); |
46 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
46 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
47 | 47 | |
48 | 48 | $label = GETPOST('label', 'alpha'); |
49 | 49 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | setEventMessages($langs->trans('Error'), null, 'errors'); |
212 | 212 | } else { |
213 | 213 | setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); |
214 | - header("Location: " . $_SERVER["PHP_SELF"]); |
|
214 | + header("Location: ".$_SERVER["PHP_SELF"]); |
|
215 | 215 | exit(); |
216 | 216 | } |
217 | 217 | } elseif (preg_match('/del_(.*)/', $action, $reg)) { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | setEventMessages($langs->trans('Error'), null, 'errors'); |
227 | 227 | } else { |
228 | 228 | setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); |
229 | - header("Location: " . $_SERVER["PHP_SELF"]); |
|
229 | + header("Location: ".$_SERVER["PHP_SELF"]); |
|
230 | 230 | exit(); |
231 | 231 | } |
232 | 232 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | case 'sellist': |
49 | 49 | $tmp = ''; |
50 | 50 | $tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null |
51 | - if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
51 | + if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
52 | 52 | $tmpkeys = array_keys($tmpparam['options']); |
53 | 53 | $tmp = array_shift($tmpkeys); |
54 | 54 | } |
@@ -356,10 +356,10 @@ |
||
356 | 356 | $desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines) |
357 | 357 | $txt = ''; |
358 | 358 | if (empty($conf->global->CONTRACT_HIDE_QTY_ON_PDF)) { |
359 | - $txt .= $outputlangs->transnoentities("Quantity") . ' : <strong>' . $objectligne->qty . '</strong>'; |
|
359 | + $txt .= $outputlangs->transnoentities("Quantity").' : <strong>'.$objectligne->qty.'</strong>'; |
|
360 | 360 | } |
361 | 361 | if (empty($conf->global->CONTRACT_HIDE_PRICE_ON_PDF)) { |
362 | - $txt .= ' - ' . $outputlangs->transnoentities("UnitPrice") . ' : <strong>' . price($objectligne->subprice) . '</strong>'; |
|
362 | + $txt .= ' - '.$outputlangs->transnoentities("UnitPrice").' : <strong>'.price($objectligne->subprice).'</strong>'; |
|
363 | 363 | } |
364 | 364 | if (empty($conf->global->CONTRACT_HIDE_PLANNED_DATE_ON_PDF)) { |
365 | 365 | $txt .= '<br>'; |
@@ -353,7 +353,7 @@ |
||
353 | 353 | 'b.montant'=>'rule-computeAmount', |
354 | 354 | 'b.sens'=>'rule-computeDirection' |
355 | 355 | ); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) |
356 | - $this->import_convertvalue_array[$r]=array( |
|
356 | + $this->import_convertvalue_array[$r] = array( |
|
357 | 357 | 'b.piece_num' => array('rule' => 'compute', 'classfile' => '/accountancy/class/accountancyimport.class.php', 'class' => 'AccountancyImport', 'method' => 'cleanValue', 'element' => 'Accountancy'), |
358 | 358 | 'b.numero_compte'=>array('rule'=>'accountingaccount'), |
359 | 359 | 'b.subledger_account'=>array('rule'=>'accountingaccount'), |
@@ -101,27 +101,27 @@ |
||
101 | 101 | { |
102 | 102 | global $langs; |
103 | 103 | $legendSkills = '<div style="font-style:italic;"> |
104 | - ' . $langs->trans('legend') . ' |
|
104 | + ' . $langs->trans('legend').' |
|
105 | 105 | <table class="border" width="100%"> |
106 | 106 | <tr> |
107 | 107 | <td><span style="vertical-align:middle" class="toohappy diffnote little"></span> |
108 | - ' . $langs->trans('CompetenceAcquiredByOneOrMore') . '</td> |
|
108 | + ' . $langs->trans('CompetenceAcquiredByOneOrMore').'</td> |
|
109 | 109 | </tr> |
110 | 110 | <tr> |
111 | 111 | <td><span style="vertical-align:middle" class="veryhappy diffnote little"></span> |
112 | - ' . $langs->trans('MaxlevelGreaterThan') . '</td> |
|
112 | + ' . $langs->trans('MaxlevelGreaterThan').'</td> |
|
113 | 113 | </tr> |
114 | 114 | <tr> |
115 | 115 | <td><span style="vertical-align:middle" class="happy diffnote little"></span> |
116 | - ' . $langs->trans('MaxLevelEqualTo') . '</td> |
|
116 | + ' . $langs->trans('MaxLevelEqualTo').'</td> |
|
117 | 117 | </tr> |
118 | 118 | <tr> |
119 | 119 | <td><span style="vertical-align:middle" class="sad diffnote little"></span> |
120 | - ' . $langs->trans('MaxLevelLowerThan') . '</td> |
|
120 | + ' . $langs->trans('MaxLevelLowerThan').'</td> |
|
121 | 121 | </tr> |
122 | 122 | <tr> |
123 | 123 | <td><span style="vertical-align:middle" class="toosad diffnote little"></span> |
124 | - ' . $langs->trans('SkillNotAcquired') . '</td> |
|
124 | + ' . $langs->trans('SkillNotAcquired').'</td> |
|
125 | 125 | </tr> |
126 | 126 | </table> |
127 | 127 | </div>'; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $coldisplay++; |
67 | 67 | ?> |
68 | 68 | <td class="nobottom linecolref"> |
69 | - <?php $coldisplay++; if ($nolinesbefore) { echo $langs->trans('Ref') . ': '; } ?> |
|
69 | + <?php $coldisplay++; if ($nolinesbefore) { echo $langs->trans('Ref').': '; } ?> |
|
70 | 70 | <input type="text" name="line_ref" id="line_ref" class="flat" value="<?php echo (GETPOSTISSET("line_ref") ? GETPOST("line_ref", 'alpha', 2) : ''); ?>" autofocus> |
71 | 71 | <?php |
72 | 72 | if (is_object($hookmanager)) { |