@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | /** |
216 | 216 | * @var int Thirdparty ID |
217 | 217 | */ |
218 | - public $socid; // both socid and fk_soc are used |
|
219 | - public $fk_soc; // both socid and fk_soc are used |
|
218 | + public $socid; // both socid and fk_soc are used |
|
219 | + public $fk_soc; // both socid and fk_soc are used |
|
220 | 220 | |
221 | 221 | /** |
222 | 222 | * @var string Thirdparty name |
@@ -1067,8 +1067,8 @@ discard block |
||
1067 | 1067 | $this->country_code = $obj->country_id ? $obj->country_code : ''; |
1068 | 1068 | $this->country = $obj->country_id ? ($langs->trans('Country' . $obj->country_code) != 'Country' . $obj->country_code ? $langs->transnoentities('Country' . $obj->country_code) : $obj->country) : ''; |
1069 | 1069 | |
1070 | - $this->fk_soc = $obj->fk_soc; // Both fk_soc and socid are used |
|
1071 | - $this->socid = $obj->fk_soc; // Both fk_soc and socid are used |
|
1070 | + $this->fk_soc = $obj->fk_soc; // Both fk_soc and socid are used |
|
1071 | + $this->socid = $obj->fk_soc; // Both fk_soc and socid are used |
|
1072 | 1072 | $this->socname = $obj->socname; |
1073 | 1073 | $this->poste = $obj->poste; |
1074 | 1074 | $this->statut = $obj->statut; |
@@ -1876,7 +1876,7 @@ discard block |
||
1876 | 1876 | $error = 0; |
1877 | 1877 | |
1878 | 1878 | if (!isset($this->roles)) { |
1879 | - return 0; // Avoid to loose roles when property not set |
|
1879 | + return 0; // Avoid to loose roles when property not set |
|
1880 | 1880 | } |
1881 | 1881 | |
1882 | 1882 | $this->db->begin(); |
@@ -286,12 +286,12 @@ discard block |
||
286 | 286 | /* |
287 | 287 | * No signature |
288 | 288 | */ |
289 | - const STATUS_NO_SIGNATURE = 0; |
|
289 | + const STATUS_NO_SIGNATURE = 0; |
|
290 | 290 | |
291 | 291 | /* |
292 | 292 | * Signed by sender |
293 | 293 | */ |
294 | - const STATUS_SIGNED_SENDER = 1; |
|
294 | + const STATUS_SIGNED_SENDER = 1; |
|
295 | 295 | |
296 | 296 | /* |
297 | 297 | * Signed by receiver |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | /* |
302 | 302 | * Signed by all |
303 | 303 | */ |
304 | - const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) |
|
304 | + const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) |
|
305 | 305 | |
306 | 306 | |
307 | 307 | /** |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | if ($contratline->statut != ContratLigne::STATUS_OPEN) { |
438 | 438 | $contratline->context = $this->context; |
439 | 439 | |
440 | - $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE |
|
440 | + $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE |
|
441 | 441 | if ($result < 0) { |
442 | 442 | $error++; |
443 | 443 | $this->error = $contratline->error; |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | // Close lines not already closed |
488 | 488 | if ($contratline->statut != ContratLigne::STATUS_CLOSED) { |
489 | 489 | $contratline->date_end_real = $now; |
490 | - $contratline->date_cloture = $now; // For backward compatibility |
|
490 | + $contratline->date_cloture = $now; // For backward compatibility |
|
491 | 491 | $contratline->user_closing_id = $user->id; |
492 | 492 | $contratline->statut = ContratLigne::STATUS_CLOSED; |
493 | 493 | $result = $contratline->close_line($user, $now, $comment, $notrigger); |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | //$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite); |
943 | 943 | //$line->date_fin_reel = $this->db->jdate($objp->date_cloture); |
944 | 944 | |
945 | - $line->rang = $objp->rang; |
|
945 | + $line->rang = $objp->rang; |
|
946 | 946 | |
947 | 947 | // Retrieve all extrafields for contract line |
948 | 948 | // fetch optionals attributes and labels |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | } |
1455 | 1455 | |
1456 | 1456 | if (!$error) { |
1457 | - $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
1457 | + $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
1458 | 1458 | if ($result < 0) { |
1459 | 1459 | $error++; |
1460 | 1460 | } |
@@ -2558,7 +2558,7 @@ discard block |
||
2558 | 2558 | global $user; |
2559 | 2559 | |
2560 | 2560 | $ticket = new Ticket($this->db); |
2561 | - $nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id)); |
|
2561 | + $nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id)); |
|
2562 | 2562 | |
2563 | 2563 | return ($nbTicket < 0 ? $nbTicket : $ticket->lines); |
2564 | 2564 | } |
@@ -2580,7 +2580,7 @@ discard block |
||
2580 | 2580 | global $conf, $langs; |
2581 | 2581 | |
2582 | 2582 | if (!dol_strlen($modele)) { |
2583 | - $modele = ''; // No doc template/generation by default |
|
2583 | + $modele = ''; // No doc template/generation by default |
|
2584 | 2584 | |
2585 | 2585 | if (!empty($this->model_pdf)) { |
2586 | 2586 | $modele = $this->model_pdf; |
@@ -2806,7 +2806,7 @@ discard block |
||
2806 | 2806 | |
2807 | 2807 | // Load contract |
2808 | 2808 | $object = new Contrat($this->db); |
2809 | - $object->fetch($obj->rowid); // fetch also lines |
|
2809 | + $object->fetch($obj->rowid); // fetch also lines |
|
2810 | 2810 | //$object->fetch_thirdparty(); |
2811 | 2811 | |
2812 | 2812 | if ($object->id <= 0) { |
@@ -2853,7 +2853,7 @@ discard block |
||
2853 | 2853 | if ($expirationdate && $expirationdate < $enddatetoscan) { |
2854 | 2854 | dol_syslog("Define the newdate of end of services from expirationdate=" . $expirationdate); |
2855 | 2855 | $newdate = $expirationdate; |
2856 | - $protecti = 0; //$protecti is to avoid infinite loop |
|
2856 | + $protecti = 0; //$protecti is to avoid infinite loop |
|
2857 | 2857 | while ($newdate < $enddatetoscan && $protecti < 1000) { |
2858 | 2858 | $newdate = dol_time_plus_duree($newdate, $duration_value, $duration_unit); |
2859 | 2859 | $protecti++; |
@@ -2881,20 +2881,20 @@ discard block |
||
2881 | 2881 | |
2882 | 2882 | // Create an event |
2883 | 2883 | $actioncomm = new ActionComm($this->db); |
2884 | - $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
2884 | + $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
2885 | 2885 | $actioncomm->code = 'AC_' . $actioncode; |
2886 | 2886 | $actioncomm->label = $label; |
2887 | 2887 | $actioncomm->datep = $now; |
2888 | 2888 | $actioncomm->datef = $now; |
2889 | - $actioncomm->percentage = -1; // Not applicable |
|
2889 | + $actioncomm->percentage = -1; // Not applicable |
|
2890 | 2890 | $actioncomm->socid = $object->socid; |
2891 | - $actioncomm->authorid = $user->id; // User saving action |
|
2892 | - $actioncomm->userownerid = $user->id; // Owner of action |
|
2891 | + $actioncomm->authorid = $user->id; // User saving action |
|
2892 | + $actioncomm->userownerid = $user->id; // Owner of action |
|
2893 | 2893 | $actioncomm->fk_element = $object->id; |
2894 | 2894 | $actioncomm->elementtype = 'contract'; |
2895 | 2895 | $actioncomm->note_private = $comment; |
2896 | 2896 | |
2897 | - $ret = $actioncomm->create($user); // User creating action |
|
2897 | + $ret = $actioncomm->create($user); // User creating action |
|
2898 | 2898 | } else { |
2899 | 2899 | $contracterror[$object->id] = $object->ref; |
2900 | 2900 | |
@@ -2903,7 +2903,7 @@ discard block |
||
2903 | 2903 | $this->error = $this->db->lasterror(); |
2904 | 2904 | } |
2905 | 2905 | |
2906 | - if (! $errorforlocaltransaction) { |
|
2906 | + if (!$errorforlocaltransaction) { |
|
2907 | 2907 | $this->db->commit(); |
2908 | 2908 | } else { |
2909 | 2909 | $this->db->rollback(); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if ($search_sale == -2) { |
106 | 106 | $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)"; |
107 | 107 | } elseif ($search_sale > 0) { |
108 | - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")"; |
|
108 | + $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")"; |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | // Add sql filters |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); |
279 | 279 | } |
280 | 280 | |
281 | - $request_data = (object)$request_data; |
|
281 | + $request_data = (object) $request_data; |
|
282 | 282 | |
283 | 283 | $request_data->desc = sanitizeVal($request_data->desc, 'restricthtml'); |
284 | 284 | $request_data->price_base_type = sanitizeVal($request_data->price_base_type); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); |
337 | 337 | } |
338 | 338 | |
339 | - $request_data = (object)$request_data; |
|
339 | + $request_data = (object) $request_data; |
|
340 | 340 | |
341 | 341 | $request_data->desc = sanitizeVal($request_data->desc, 'restricthtml'); |
342 | 342 | $request_data->price_base_type = sanitizeVal($request_data->price_base_type); |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | } |
548 | 548 | if ($field == 'array_options' && is_array($value)) { |
549 | 549 | foreach ($value as $index => $val) { |
550 | - $this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);; |
|
550 | + $this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract); ; |
|
551 | 551 | } |
552 | 552 | continue; |
553 | 553 | } |
@@ -133,14 +133,14 @@ discard block |
||
133 | 133 | if ($choice == 'allfiles') { |
134 | 134 | // Delete all files (except .lock and .unlock files, do not follow symbolic links) |
135 | 135 | if ($dolibarr_main_data_root) { |
136 | - $filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory |
|
136 | + $filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | 140 | if ($choice == 'allfilesold') { |
141 | 141 | // Delete all files (except .lock and .unlock files, do not follow symbolic links) |
142 | 142 | if ($dolibarr_main_data_root) { |
143 | - $filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory |
|
143 | + $filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | } elseif (is_string($row[$j]) && $row[$j] == '') { |
831 | 831 | // if it's an empty string, we set it as an empty string |
832 | 832 | $row[$j] = "''"; |
833 | - } elseif (is_numeric($row[$j]) && !strcmp((string)$row[$j], (string)((float)$row[$j] + 0))) { // test if it's a numeric type and the numeric version ($nb+0) == string version (eg: if we have 01, it's probably not a number but rather a string, else it would not have any leading 0) |
|
833 | + } elseif (is_numeric($row[$j]) && !strcmp((string) $row[$j], (string) ((float) $row[$j] + 0))) { // test if it's a numeric type and the numeric version ($nb+0) == string version (eg: if we have 01, it's probably not a number but rather a string, else it would not have any leading 0) |
|
834 | 834 | // if it's a number, we return it as-is |
835 | 835 | // $row[$j] = $row[$j]; |
836 | 836 | } else { // else for all other cases we escape the value and put quotes around |
@@ -1390,7 +1390,7 @@ discard block |
||
1390 | 1390 | |
1391 | 1391 | dol_syslog(__METHOD__, LOG_DEBUG); |
1392 | 1392 | |
1393 | - $this->error = "Error sending backp file " . ((string)$error); |
|
1393 | + $this->error = "Error sending backp file " . ((string) $error); |
|
1394 | 1394 | $this->output = $output; |
1395 | 1395 | |
1396 | 1396 | if ($result) { |
@@ -1431,7 +1431,7 @@ discard block |
||
1431 | 1431 | } |
1432 | 1432 | |
1433 | 1433 | $cron_job = new Cronjob($db); |
1434 | - $cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, [], 1); // Fetch jobs that are currently running |
|
1434 | + $cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, [], 1); // Fetch jobs that are currently running |
|
1435 | 1435 | |
1436 | 1436 | // Iterate over all jobs in processing (this can't be this job since his state is set to 0 before) |
1437 | 1437 | foreach ($cron_job->lines as $job_line) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | // $type = "GIF" | "JPEG" |
137 | 137 | //$this->properties["PHOTO;MEDIATYPE=$type;ENCODING=BASE64"] = base64_encode($photo); |
138 | - $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
138 | + $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
139 | 139 | //$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo); // must be content of image |
140 | 140 | } |
141 | 141 | |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | public function getVCard() |
360 | 360 | { |
361 | 361 | $text = "BEGIN:VCARD\r\n"; |
362 | - $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
362 | + $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
363 | 363 | //$text.= "VERSION:2.1\r\n"; |
364 | 364 | foreach ($this->properties as $key => $value) { |
365 | 365 | $newkey = preg_replace('/-.*$/', '', $key); // remove suffix -twitter, -facebook, ... |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | return array(); |
103 | 103 | } |
104 | 104 | |
105 | - $data = array(); // This is the return value |
|
106 | - $datay = array(); // This is a work value |
|
105 | + $data = array(); // This is the return value |
|
106 | + $datay = array(); // This is a work value |
|
107 | 107 | |
108 | 108 | // Search into cache |
109 | 109 | if (!empty($cachedelay)) { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | $datay = array(); |
208 | - $data = array(); // Return value |
|
208 | + $data = array(); // Return value |
|
209 | 209 | |
210 | 210 | // Search into cache |
211 | 211 | if (!empty($cachedelay)) { |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | if ($foundintocache) { // Cache file found and is not too old |
360 | 360 | dol_syslog(get_class($this) . '::' . __FUNCTION__ . " read data from cache file " . $newpathofdestfile . " " . $filedate . "."); |
361 | 361 | $data = json_decode(file_get_contents($newpathofdestfile), true); |
362 | - '@phan-var-force array<int<0,11>,array{0:int<1,12>,1:int|float}> $data'; // Phan can't decode json_decode's return value |
|
362 | + '@phan-var-force array<int<0,11>,array{0:int<1,12>,1:int|float}> $data'; // Phan can't decode json_decode's return value |
|
363 | 363 | } else { |
364 | 364 | // This method is defined in parent object only, not into abstract, so we disable phpstan warning |
365 | 365 | /** @phpstan-ignore-next-line */ |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | $this->fk_user = $obj->fk_user; |
368 | 368 | $this->email = $obj->email; |
369 | 369 | $this->threshold = $obj->threshold; |
370 | - $this->context = $obj->context; |
|
370 | + $this->context = $obj->context; |
|
371 | 371 | $this->datec = $this->db->jdate($obj->datec); |
372 | 372 | $this->datem = $this->db->jdate($obj->datem); |
373 | 373 | } |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | while ($i < $num) { |
489 | 489 | $obj = $this->db->fetch_object($resql); |
490 | 490 | // we want to notify only if contact is enable |
491 | - if ($obj && $obj->status == 1) { |
|
491 | + if ($obj && $obj->status == 1) { |
|
492 | 492 | $newval2 = trim($obj->email); |
493 | 493 | $isvalid = isValidEmail($newval2); |
494 | 494 | if (empty($resarray[$newval2])) { |
@@ -133,17 +133,17 @@ discard block |
||
133 | 133 | |
134 | 134 | if (!self::$operatorString) { |
135 | 135 | self::$operatorString = |
136 | - '('.implode('|', array_map( |
|
136 | + '(' . implode('|', array_map( |
|
137 | 137 | array('lessc', 'preg_quote'), |
138 | 138 | array_keys(self::$precedence) |
139 | - )).')'; |
|
139 | + )) . ')'; |
|
140 | 140 | |
141 | 141 | $commentSingle = Lessc::preg_quote(self::$commentSingle); |
142 | 142 | $commentMultiLeft = Lessc::preg_quote(self::$commentMultiLeft); |
143 | 143 | $commentMultiRight = Lessc::preg_quote(self::$commentMultiRight); |
144 | 144 | |
145 | - self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight; |
|
146 | - self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais'; |
|
145 | + self::$commentMulti = $commentMultiLeft . '.*?' . $commentMultiRight; |
|
146 | + self::$whitePattern = '/' . $commentSingle . '[^\n]*\s*|(' . self::$commentMulti . ')\s*|\s+/Ais'; |
|
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | while (false !== $this->parseChunk()); |
177 | 177 | |
178 | 178 | if ($this->count != strlen($this->buffer)) { |
179 | - $this->throwError('parse error count '.$this->count.' != len buffer '.strlen($this->buffer)); |
|
179 | + $this->throwError('parse error count ' . $this->count . ' != len buffer ' . strlen($this->buffer)); |
|
180 | 180 | |
181 | 181 | } |
182 | 182 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | // mixin |
384 | 384 | if ($this->mixinTags($tags) && |
385 | 385 | $this->argumentDef($argv, $isVararg) && |
386 | - $this->keyword($suffix) && $this->end() |
|
386 | + $this->keyword($suffix) && $this->end() |
|
387 | 387 | ) { |
388 | 388 | $tags = $this->fixTags($tags); |
389 | 389 | $this->append(array('mixin', $tags, $argv, $suffix), $s); |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | "|", |
408 | 408 | array_map(array("lessc", "preg_quote"), $directives) |
409 | 409 | ); |
410 | - $pattern = '/^(-[a-z-]+-)?('.$pattern.')$/i'; |
|
410 | + $pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i'; |
|
411 | 411 | |
412 | 412 | return preg_match($pattern, $dirname); |
413 | 413 | } |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | $needWhite = $whiteBefore && !$this->inParens; |
492 | 492 | |
493 | 493 | $m = array(); |
494 | - if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { |
|
494 | + if ($this->match(self::$operatorString . ($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { |
|
495 | 495 | if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) { |
496 | 496 | foreach (self::$supressDivisionProps as $pattern) { |
497 | 497 | if (preg_match($pattern, $this->env->currentProperty)) { |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | // css hack: \0 |
654 | 654 | $m = array(); |
655 | 655 | if ($this->literal('\\') && $this->match('([0-9]+)', $m)) { |
656 | - $value = array('keyword', '\\'.$m[1]); |
|
656 | + $value = array('keyword', '\\' . $m[1]); |
|
657 | 657 | return true; |
658 | 658 | } else { |
659 | 659 | $this->seek($s); |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | $stop = array_merge($stop, $rejectStrs); |
778 | 778 | } |
779 | 779 | |
780 | - $patt = '(.*?)('.implode("|", $stop).')'; |
|
780 | + $patt = '(.*?)(' . implode("|", $stop) . ')'; |
|
781 | 781 | |
782 | 782 | $nestingLevel = 0; |
783 | 783 | |
@@ -851,8 +851,8 @@ discard block |
||
851 | 851 | $content = array(); |
852 | 852 | |
853 | 853 | // look for either ending delim , escape, or string interpolation |
854 | - $patt = '([^\n]*?)(@\{|\\\\|'. |
|
855 | - Lessc::preg_quote($delim).')'; |
|
854 | + $patt = '([^\n]*?)(@\{|\\\\|' . |
|
855 | + Lessc::preg_quote($delim) . ')'; |
|
856 | 856 | |
857 | 857 | $oldWhite = $this->eatWhiteDefault; |
858 | 858 | $this->eatWhiteDefault = false; |
@@ -1199,7 +1199,7 @@ discard block |
||
1199 | 1199 | |
1200 | 1200 | while (true) { |
1201 | 1201 | $m = array(); |
1202 | - if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) { |
|
1202 | + if ($this->match('([' . $chars . '0-9][' . $chars . ']*)', $m)) { |
|
1203 | 1203 | $parts[] = $m[1]; |
1204 | 1204 | if ($simple) { |
1205 | 1205 | break; |
@@ -1312,7 +1312,7 @@ discard block |
||
1312 | 1312 | if (!empty($sub)) { |
1313 | 1313 | $name = array('variable', $sub); |
1314 | 1314 | } else { |
1315 | - $name = $this->lessc->vPrefix.$name; |
|
1315 | + $name = $this->lessc->vPrefix . $name; |
|
1316 | 1316 | } |
1317 | 1317 | return true; |
1318 | 1318 | } |
@@ -1499,7 +1499,7 @@ discard block |
||
1499 | 1499 | $validChars = $allowNewline ? "." : "[^\n]"; |
1500 | 1500 | } |
1501 | 1501 | $m = array(); |
1502 | - if (!$this->match('('.$validChars.'*?)'.Lessc::preg_quote($what), $m, !$until)) { |
|
1502 | + if (!$this->match('(' . $validChars . '*?)' . Lessc::preg_quote($what), $m, !$until)) { |
|
1503 | 1503 | return false; |
1504 | 1504 | } |
1505 | 1505 | if ($until) { |
@@ -1516,7 +1516,7 @@ discard block |
||
1516 | 1516 | $eatWhitespace = $this->eatWhiteDefault; |
1517 | 1517 | } |
1518 | 1518 | |
1519 | - $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais'; |
|
1519 | + $r = '/' . $regex . ($eatWhitespace && !$this->writeComments ? '\s*' : '') . '/Ais'; |
|
1520 | 1520 | if (preg_match($r, $this->buffer, $out, 0, $this->count)) { |
1521 | 1521 | $this->count += strlen($out[0]); |
1522 | 1522 | if ($eatWhitespace && $this->writeComments) { |
@@ -1554,7 +1554,7 @@ discard block |
||
1554 | 1554 | if (is_null($from)) { |
1555 | 1555 | $from = $this->count; |
1556 | 1556 | } |
1557 | - $r = '/'.$regex.'/Ais'; |
|
1557 | + $r = '/' . $regex . '/Ais'; |
|
1558 | 1558 | $result = preg_match($r, $this->buffer, $out, 0, $from); |
1559 | 1559 | |
1560 | 1560 | return $result; |
@@ -1674,7 +1674,7 @@ discard block |
||
1674 | 1674 | case '"': |
1675 | 1675 | case "'": |
1676 | 1676 | $m = array(); |
1677 | - if (preg_match('/'.$min[0].'.*?(?<!\\\\)'.$min[0].'/', $text, $m, 0, $count)) { |
|
1677 | + if (preg_match('/' . $min[0] . '.*?(?<!\\\\)' . $min[0] . '/', $text, $m, 0, $count)) { |
|
1678 | 1678 | $count += strlen($m[0]) - 1; |
1679 | 1679 | } |
1680 | 1680 | break; |
@@ -1699,12 +1699,12 @@ discard block |
||
1699 | 1699 | $count += strlen($min[0]); |
1700 | 1700 | } |
1701 | 1701 | |
1702 | - $out .= substr($text, 0, $count).str_repeat("\n", $newlines); |
|
1702 | + $out .= substr($text, 0, $count) . str_repeat("\n", $newlines); |
|
1703 | 1703 | $text = substr($text, $count + $skip); |
1704 | 1704 | |
1705 | 1705 | $min = null; |
1706 | 1706 | } |
1707 | 1707 | |
1708 | - return $out.$text; |
|
1708 | + return $out . $text; |
|
1709 | 1709 | } |
1710 | 1710 | } |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | } |
589 | 589 | // Most servers expect a 2nd pass of EHLO after TLS is established to get another time |
590 | 590 | // the answer with list of supported AUTH methods. They may differs between non STARTTLS and with STARTTLS. |
591 | - if (! $_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) { |
|
591 | + if (!$_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) { |
|
592 | 592 | $this->_setErr(126, '"' . $hosth . '" does not support authenticated connections or temporary error. Error after 2nd sending EHLO ' . $hosth . ' : ' . $this->lastretval); |
593 | 593 | return $_retVal; |
594 | 594 | } |
@@ -1709,7 +1709,7 @@ discard block |
||
1709 | 1709 | $this->_msgContent['attachment'][$strFileName]['mimeType'] = $strMimeType; |
1710 | 1710 | $this->_msgContent['attachment'][$strFileName]['fileName'] = $strFileName; |
1711 | 1711 | $this->_msgContent['attachment'][$strFileName]['data'] = $strContent; |
1712 | - $this->_msgContent['attachment'][$strFileName]['cid'] = $strCid; // If defined, it means this attachment must be shown inline |
|
1712 | + $this->_msgContent['attachment'][$strFileName]['cid'] = $strCid; // If defined, it means this attachment must be shown inline |
|
1713 | 1713 | |
1714 | 1714 | if ($this->getMD5flag()) { |
1715 | 1715 | $this->_msgContent['attachment'][$strFileName]['md5'] = dol_hash($strContent, 3); |