@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $signature = GETPOST('signaturebase64'); |
62 | 62 | $ref = GETPOST('ref', 'aZ09'); |
63 | -$mode = GETPOST('mode', 'aZ09'); // 'proposal', ... |
|
63 | +$mode = GETPOST('mode', 'aZ09'); // 'proposal', ... |
|
64 | 64 | $SECUREKEY = GETPOST("securekey"); // Secure key |
65 | 65 | $online_sign_name = GETPOST("onlinesignname") ? GETPOST("onlinesignname") : ''; |
66 | 66 | |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | $upload_dir = !empty($conf->propal->multidir_output[$object->entity]) ? $conf->propal->multidir_output[$object->entity] : $conf->propal->dir_output; |
115 | 115 | $upload_dir .= '/' . dol_sanitizeFileName($object->ref) . '/'; |
116 | 116 | |
117 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
118 | - $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
117 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
118 | + $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
119 | 119 | $langs->loadLangs(array("main", "companies")); |
120 | 120 | |
121 | 121 | $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | if (!$error) { |
139 | 139 | // Defined modele of doc |
140 | 140 | $last_main_doc_file = $object->last_main_doc; |
141 | - $directdownloadlink = $object->getLastMainDocLink('proposal'); // url to download the $object->last_main_doc |
|
141 | + $directdownloadlink = $object->getLastMainDocLink('proposal'); // url to download the $object->last_main_doc |
|
142 | 142 | |
143 | 143 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
144 | 144 | // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | //$pdf->Open(); |
162 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
162 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
163 | 163 | |
164 | 164 | $param = array(); |
165 | 165 | $param['online_sign_name'] = $online_sign_name; |
166 | 166 | $param['pathtoimage'] = $upload_dir . $filename; |
167 | 167 | |
168 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
168 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
169 | 169 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
170 | 170 | try { |
171 | 171 | $tppl = $pdf->importPage($i); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | if (!$error) { |
297 | 297 | // Defined modele of doc |
298 | 298 | $last_main_doc_file = $object->last_main_doc; |
299 | - $directdownloadlink = $object->getLastMainDocLink('contrat'); // url to download the $object->last_main_doc |
|
299 | + $directdownloadlink = $object->getLastMainDocLink('contrat'); // url to download the $object->last_main_doc |
|
300 | 300 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
301 | 301 | // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile |
302 | 302 | $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; |
@@ -316,13 +316,13 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | //$pdf->Open(); |
319 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
319 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
320 | 320 | |
321 | 321 | $param = array(); |
322 | 322 | $param['online_sign_name'] = $online_sign_name; |
323 | 323 | $param['pathtoimage'] = $upload_dir . $filename; |
324 | 324 | |
325 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
325 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
326 | 326 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
327 | 327 | try { |
328 | 328 | $tppl = $pdf->importPage($i); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | $langs->loadLangs(array("main", "companies")); |
388 | 388 | |
389 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
389 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
390 | 390 | $default_font = pdf_getPDFFont($langs); // Must be |
391 | 391 | |
392 | 392 | $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | if (!$error) { |
410 | 410 | // Defined modele of doc |
411 | 411 | $last_main_doc_file = $object->last_main_doc; |
412 | - $directdownloadlink = $object->getLastMainDocLink('fichinter'); // url to download the $object->last_main_doc |
|
412 | + $directdownloadlink = $object->getLastMainDocLink('fichinter'); // url to download the $object->last_main_doc |
|
413 | 413 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
414 | 414 | // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile |
415 | 415 | $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; |
@@ -429,13 +429,13 @@ discard block |
||
429 | 429 | } |
430 | 430 | |
431 | 431 | //$pdf->Open(); |
432 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
432 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
433 | 433 | |
434 | 434 | $param = array(); |
435 | 435 | $param['online_sign_name'] = $online_sign_name; |
436 | 436 | $param['pathtoimage'] = $upload_dir . $filename; |
437 | 437 | |
438 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
438 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
439 | 439 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
440 | 440 | try { |
441 | 441 | $tppl = $pdf->importPage($i); |
@@ -501,8 +501,8 @@ discard block |
||
501 | 501 | |
502 | 502 | $upload_dir = $conf->societe->multidir_output[$object->thirdparty->entity] . '/' . dol_sanitizeFileName($object->thirdparty->id) . '/'; |
503 | 503 | |
504 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
505 | - $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
504 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
505 | + $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance |
|
506 | 506 | $langs->loadLangs(array("main", "companies")); |
507 | 507 | |
508 | 508 | $date = dol_print_date(dol_now(), "%Y%m%d%H%M%S"); |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | // Defined modele of doc |
527 | 527 | $last_main_doc_file = $object->last_main_doc; |
528 | 528 | $last_modelpdf = $object->model_pdf; |
529 | - $directdownloadlink = $object->getLastMainDocLink('company'); // url to download the $object->last_main_doc |
|
529 | + $directdownloadlink = $object->getLastMainDocLink('company'); // url to download the $object->last_main_doc |
|
530 | 530 | |
531 | 531 | if (preg_match('/\.pdf/i', $last_main_doc_file)) { |
532 | 532 | $sourcefile = ''; |
@@ -549,9 +549,9 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | //$pdf->Open(); |
552 | - $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
552 | + $pagecount = $pdf->setSourceFile($sourcefile); // original PDF |
|
553 | 553 | |
554 | - $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
554 | + $s = array(); // Array with size of each page. Example array(w'=>210, 'h'=>297); |
|
555 | 555 | for ($i = 1; $i < ($pagecount + 1); $i++) { |
556 | 556 | try { |
557 | 557 | $tppl = $pdf->importPage($i); |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | */ |
704 | 704 | function dolPrintSignatureImage(TCPDF $pdf, $langs, $params) |
705 | 705 | { |
706 | - $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
706 | + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance |
|
707 | 707 | $default_font = pdf_getPDFFont($langs); // Must be |
708 | 708 | $xforimgstart = $params['xforimgstart']; |
709 | 709 | $yforimgstart = $params['yforimgstart']; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | // Security check |
48 | 48 | if (!isModEnabled('incoterm')) { |
49 | - httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. |
|
49 | + httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. |
|
50 | 50 | } |
51 | 51 | // There is no other permission on this component. Everybody connected can read content of the incoterm table |
52 | 52 |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | if ($reshook > 0) { |
140 | 140 | $perm = $hookmanager->resArray['perm']; |
141 | 141 | } |
142 | - if (! $perm) { |
|
142 | + if (!$perm) { |
|
143 | 143 | // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. |
144 | 144 | // If we are here, it is a hack attempt, so we report a warning. |
145 | 145 | print 'Bad permission to modify position of lines for object in table ' . $table_element_line; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | // Reorder line to have position of children lines sharing same counter than parent lines |
163 | 163 | // This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database. |
164 | - if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) { |
|
164 | + if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) { |
|
165 | 165 | $result = $row->line_order(true); |
166 | 166 | } |
167 | 167 | } else { |
@@ -81,19 +81,19 @@ discard block |
||
81 | 81 | $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString($keyforuploaddir)))); |
82 | 82 | |
83 | 83 | foreach ($listofdir as $key => $tmpdir) { |
84 | - $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
84 | + $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
85 | 85 | if (!$tmpdir) { |
86 | 86 | unset($listofdir[$key]); |
87 | 87 | continue; |
88 | 88 | } |
89 | - $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
89 | + $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
90 | 90 | if (!is_dir($tmpdir)) { |
91 | 91 | if (empty($nomessageinsetmoduleoptions)) { |
92 | 92 | setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); |
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | $upload_dir = $tmpdir; |
96 | - break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
96 | + break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
@@ -133,19 +133,19 @@ discard block |
||
133 | 133 | |
134 | 134 | foreach ($listofdir as $key => $tmpdir) { |
135 | 135 | $tmpdir = trim($tmpdir); |
136 | - $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
136 | + $tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT |
|
137 | 137 | if (!$tmpdir) { |
138 | 138 | unset($listofdir[$key]); |
139 | 139 | continue; |
140 | 140 | } |
141 | - $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
141 | + $tmpdir = DOL_DATA_ROOT . '/' . $tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set |
|
142 | 142 | if (!is_dir($tmpdir)) { |
143 | 143 | if (empty($nomessageinsetmoduleoptions)) { |
144 | 144 | setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); |
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | $upload_dir = $tmpdir; |
148 | - break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
148 | + break; // So we take the first directory found into setup $conf->global->$keyforuploaddir |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | foreach ($this->data as $x) { // Loop on each x |
638 | 638 | for ($i = 0; $i < $nbseries; $i++) { // Loop on each series |
639 | 639 | if (is_null($max)) { |
640 | - $max = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
640 | + $max = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
641 | 641 | } elseif ($max < $x[$i + 1]) { |
642 | 642 | $max = $x[$i + 1]; |
643 | 643 | } |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | foreach ($this->data as $x) { // Loop on each x |
668 | 668 | for ($i = 0; $i < $nbseries; $i++) { // Loop on each series |
669 | 669 | if (is_null($min)) { |
670 | - $min = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
670 | + $min = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
671 | 671 | } elseif ($min > $x[$i + 1]) { |
672 | 672 | $min = $x[$i + 1]; |
673 | 673 | } |
@@ -1283,7 +1283,7 @@ discard block |
||
1283 | 1283 | if ($i > 0) { |
1284 | 1284 | $this->stringtoshow .= ', '; |
1285 | 1285 | } |
1286 | - $this->stringtoshow .= "'" . dol_escape_js(dol_trunc($val, 25)) . "'"; // Lower than 25 make some important label (that we can't shorten) to be truncated |
|
1286 | + $this->stringtoshow .= "'" . dol_escape_js(dol_trunc($val, 25)) . "'"; // Lower than 25 make some important label (that we can't shorten) to be truncated |
|
1287 | 1287 | $i++; |
1288 | 1288 | } |
1289 | 1289 |
@@ -240,7 +240,7 @@ |
||
240 | 240 | |
241 | 241 | $this->id = $obj->rowid; |
242 | 242 | $this->ref = $obj->rowid; |
243 | - $this->date_start = $this->db->jdate($obj->date_start); |
|
243 | + $this->date_start = $this->db->jdate($obj->date_start); |
|
244 | 244 | $this->date_end = $this->db->jdate($obj->date_end); |
245 | 245 | $this->label = $obj->label; |
246 | 246 | $this->statut = $obj->status; |
@@ -47,16 +47,16 @@ |
||
47 | 47 | public $total_ht; |
48 | 48 | public $total_tva; |
49 | 49 | public $total_ttc; |
50 | - public $amount_ht; // deprecated |
|
50 | + public $amount_ht; // deprecated |
|
51 | 51 | public $amount_tva; // deprecated |
52 | 52 | public $amount_ttc; // deprecated |
53 | 53 | |
54 | 54 | public $multicurrency_total_ht; |
55 | 55 | public $multicurrency_total_tva; |
56 | 56 | public $multicurrency_total_ttc; |
57 | - public $multicurrency_amount_ht; // deprecated |
|
58 | - public $multicurrency_amount_tva; // deprecated |
|
59 | - public $multicurrency_amount_ttc; // deprecated |
|
57 | + public $multicurrency_amount_ht; // deprecated |
|
58 | + public $multicurrency_amount_tva; // deprecated |
|
59 | + public $multicurrency_amount_ttc; // deprecated |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @var double |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | protected function findImport($url) |
80 | 80 | { |
81 | 81 | foreach ((array) $this->importDir as $dir) { |
82 | - $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url; |
|
83 | - if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) { |
|
82 | + $full = $dir . (substr($dir, -1) != '/' ? '/' : '') . $url; |
|
83 | + if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) { |
|
84 | 84 | return $file; |
85 | 85 | } |
86 | 86 | } |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | $this->compileMedia($block); |
232 | 232 | break; |
233 | 233 | case "directive": |
234 | - $name = "@".$block->name; |
|
234 | + $name = "@" . $block->name; |
|
235 | 235 | if (!empty($block->value)) { |
236 | - $name .= " ".$this->compileValue($this->reduce($block->value)); |
|
236 | + $name .= " " . $this->compileValue($this->reduce($block->value)); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | $this->compileNestedBlock($block, array($name)); |
@@ -405,8 +405,8 @@ discard block |
||
405 | 405 | break; |
406 | 406 | case "mediaExp": |
407 | 407 | if (isset($q[2])) { |
408 | - $parts[] = "($q[1]: ". |
|
409 | - $this->compileValue($this->reduce($q[2])).")"; |
|
408 | + $parts[] = "($q[1]: " . |
|
409 | + $this->compileValue($this->reduce($q[2])) . ")"; |
|
410 | 410 | } else { |
411 | 411 | $parts[] = "($q[1])"; |
412 | 412 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | |
425 | 425 | $out = "@media"; |
426 | 426 | if (!empty($parts)) { |
427 | - $out .= " ". |
|
427 | + $out .= " " . |
|
428 | 428 | implode($this->formatter->selectorSeparator, $compiledQueries); |
429 | 429 | } |
430 | 430 | return $out; |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | if ($count > 0) { |
512 | 512 | $out[] = trim($child); |
513 | 513 | } else { |
514 | - $out[] = trim($parent.' '.$child); |
|
514 | + $out[] = trim($parent . ' ' . $child); |
|
515 | 515 | } |
516 | 516 | } |
517 | 517 | } |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | $value = $a[2]; |
717 | 717 | } else { |
718 | 718 | $value = null; // :( |
719 | - $this->throwError("Failed to assign arg ".$a[1]); // This ends function by throwing an exception |
|
719 | + $this->throwError("Failed to assign arg " . $a[1]); // This ends function by throwing an exception |
|
720 | 720 | } |
721 | 721 | |
722 | 722 | $value = $this->reduce($value); |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | $orderedArgs[] = $this->reduce($arg[1]); |
782 | 782 | break; |
783 | 783 | default: |
784 | - $this->throwError("Unknown arg type: ".$arg[0]); |
|
784 | + $this->throwError("Unknown arg type: " . $arg[0]); |
|
785 | 785 | } |
786 | 786 | } |
787 | 787 | |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | break; |
847 | 847 | case "directive": |
848 | 848 | list(, $name, $value) = $prop; |
849 | - $out->lines[] = "@$name ".$this->compileValue($this->reduce($value)).';'; |
|
849 | + $out->lines[] = "@$name " . $this->compileValue($this->reduce($value)) . ';'; |
|
850 | 850 | break; |
851 | 851 | case "comment": |
852 | 852 | $out->lines[] = $prop[1]; |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | $result = $this->tryImport($importPath, $block, $out); |
863 | 863 | |
864 | 864 | $this->env->imports[$importId] = $result === false ? |
865 | - array(false, "@import ".$this->compileValue($importPath).";") : $result; |
|
865 | + array(false, "@import " . $this->compileValue($importPath) . ";") : $result; |
|
866 | 866 | |
867 | 867 | break; |
868 | 868 | case "import_mixin": |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | if ($this->numberPrecision !== null) { |
918 | 918 | $num = round($num, $this->numberPrecision); |
919 | 919 | } |
920 | - return $num.$unit; |
|
920 | + return $num . $unit; |
|
921 | 921 | case 'string': |
922 | 922 | // [1] - contents of string (includes quotes) |
923 | 923 | list(, $delim, $content) = $value; |
@@ -926,7 +926,7 @@ discard block |
||
926 | 926 | $part = $this->compileValue($part); |
927 | 927 | } |
928 | 928 | } |
929 | - return $delim.implode($content).$delim; |
|
929 | + return $delim . implode($content) . $delim; |
|
930 | 930 | case 'color': |
931 | 931 | // [1] - red component (either number or a %) |
932 | 932 | // [2] - green component |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | $b = round($b); |
939 | 939 | |
940 | 940 | if (count($value) == 5 && $value[4] != 1) { // rgba |
941 | - return 'rgba('.$r.','.$g.','.$b.','.$value[4].')'; |
|
941 | + return 'rgba(' . $r . ',' . $g . ',' . $b . ',' . $value[4] . ')'; |
|
942 | 942 | } |
943 | 943 | |
944 | 944 | $h = sprintf("#%02x%02x%02x", $r, $g, $b); |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | if (!empty($this->formatter->compressColors)) { |
947 | 947 | // Converting hex color to short notation (e.g. #003399 to #039) |
948 | 948 | if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) { |
949 | - $h = '#'.$h[1].$h[3].$h[5]; |
|
949 | + $h = '#' . $h[1] . $h[3] . $h[5]; |
|
950 | 950 | } |
951 | 951 | } |
952 | 952 | |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | |
955 | 955 | case 'function': |
956 | 956 | list(, $name, $args) = $value; |
957 | - return $name.'('.$this->compileValue($args).')'; |
|
957 | + return $name . '(' . $this->compileValue($args) . ')'; |
|
958 | 958 | default: // assumed to be unit |
959 | 959 | $this->throwError("unknown value type: $value[0]"); |
960 | 960 | } |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | } |
1120 | 1120 | } |
1121 | 1121 | |
1122 | - return 'url("'.$url.'")'; |
|
1122 | + return 'url("' . $url . '")'; |
|
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | // utility func to unquote a string |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | $i++; |
1168 | 1168 | $rep = $this->compileValue($this->lib_e($val)); |
1169 | 1169 | $template = preg_replace( |
1170 | - '/'.self::preg_quote($match).'/', |
|
1170 | + '/' . self::preg_quote($match) . '/', |
|
1171 | 1171 | $rep, |
1172 | 1172 | $template, |
1173 | 1173 | 1 |
@@ -1520,7 +1520,7 @@ discard block |
||
1520 | 1520 | $numValues = count($values); |
1521 | 1521 | if ($expectedArgs != $numValues) { |
1522 | 1522 | if ($name) { |
1523 | - $name = $name.": "; |
|
1523 | + $name = $name . ": "; |
|
1524 | 1524 | } |
1525 | 1525 | |
1526 | 1526 | $this->throwError("{$name}expecting $expectedArgs arguments, got $numValues"); |
@@ -1712,7 +1712,7 @@ discard block |
||
1712 | 1712 | case "interpolate": |
1713 | 1713 | $reduced = $this->reduce($value[1]); |
1714 | 1714 | $var = $this->compileValue($reduced); |
1715 | - $res = $this->reduce(array("variable", $this->vPrefix.$var)); |
|
1715 | + $res = $this->reduce(array("variable", $this->vPrefix . $var)); |
|
1716 | 1716 | |
1717 | 1717 | if ($res[0] == "raw_color") { |
1718 | 1718 | $res = $this->coerceColor($res); |
@@ -1727,7 +1727,7 @@ discard block |
||
1727 | 1727 | $key = $value[1]; |
1728 | 1728 | if (is_array($key)) { |
1729 | 1729 | $key = $this->reduce($key); |
1730 | - $key = $this->vPrefix.$this->compileValue($this->lib_e($key)); |
|
1730 | + $key = $this->vPrefix . $this->compileValue($this->lib_e($key)); |
|
1731 | 1731 | } |
1732 | 1732 | |
1733 | 1733 | $seen = & $this->env->seenNames; |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | } |
1774 | 1774 | |
1775 | 1775 | $f = isset($this->libFunctions[$name]) ? |
1776 | - $this->libFunctions[$name] : array($this, 'lib_'.str_replace('-', '_', $name)); |
|
1776 | + $this->libFunctions[$name] : array($this, 'lib_' . str_replace('-', '_', $name)); |
|
1777 | 1777 | |
1778 | 1778 | if (is_callable($f)) { |
1779 | 1779 | if ($args[0] == 'list') { |
@@ -1849,7 +1849,7 @@ discard block |
||
1849 | 1849 | $t = intval($num) % $width; |
1850 | 1850 | $num /= $width; |
1851 | 1851 | |
1852 | - $c[$i] = $t * (256 / $width) + $t * floor(16/$width); |
|
1852 | + $c[$i] = $t * (256 / $width) + $t * floor(16 / $width); |
|
1853 | 1853 | } |
1854 | 1854 | |
1855 | 1855 | return $c; |
@@ -1938,7 +1938,7 @@ discard block |
||
1938 | 1938 | // make the expression look it did before being parsed |
1939 | 1939 | $paddedOp = $op; |
1940 | 1940 | if ($whiteBefore) { |
1941 | - $paddedOp = " ".$paddedOp; |
|
1941 | + $paddedOp = " " . $paddedOp; |
|
1942 | 1942 | } |
1943 | 1943 | if ($whiteAfter) { |
1944 | 1944 | $paddedOp .= " "; |
@@ -2028,7 +2028,7 @@ discard block |
||
2028 | 2028 | $out[] = $lval / $rval; |
2029 | 2029 | break; |
2030 | 2030 | default: |
2031 | - $this->throwError('evaluate error: color op number failed on op '.$op); |
|
2031 | + $this->throwError('evaluate error: color op number failed on op ' . $op); |
|
2032 | 2032 | } |
2033 | 2033 | } |
2034 | 2034 | return $this->fixColor($out); |
@@ -2099,7 +2099,7 @@ discard block |
||
2099 | 2099 | case '=<': |
2100 | 2100 | return $this->toBool($left[1] <= $right[1]); |
2101 | 2101 | default: |
2102 | - $this->throwError('parse error: unknown number operator: '.$op); |
|
2102 | + $this->throwError('parse error: unknown number operator: ' . $op); |
|
2103 | 2103 | } |
2104 | 2104 | |
2105 | 2105 | return array("number", $value, $unit); |
@@ -2151,7 +2151,7 @@ discard block |
||
2151 | 2151 | { |
2152 | 2152 | $current = $this->env; |
2153 | 2153 | |
2154 | - $isArguments = $name == $this->vPrefix.'arguments'; |
|
2154 | + $isArguments = $name == $this->vPrefix . 'arguments'; |
|
2155 | 2155 | while ($current) { |
2156 | 2156 | if ($isArguments && isset($current->arguments)) { |
2157 | 2157 | return array('list', ' ', $current->arguments); |
@@ -2176,7 +2176,7 @@ discard block |
||
2176 | 2176 | $value = null; |
2177 | 2177 | foreach ($args as $name => $strValue) { |
2178 | 2178 | if ($name[0] !== '@') { |
2179 | - $name = '@'.$name; |
|
2179 | + $name = '@' . $name; |
|
2180 | 2180 | } |
2181 | 2181 | $parser->count = 0; |
2182 | 2182 | $parser->buffer = (string) $strValue; |
@@ -2230,7 +2230,7 @@ discard block |
||
2230 | 2230 | public function compileFile($fname, $outFname = null) |
2231 | 2231 | { |
2232 | 2232 | if (!is_readable($fname)) { |
2233 | - throw new Exception('load error: failed to find '.$fname); |
|
2233 | + throw new Exception('load error: failed to find ' . $fname); |
|
2234 | 2234 | } |
2235 | 2235 | |
2236 | 2236 | $pi = pathinfo($fname); |
@@ -2238,7 +2238,7 @@ discard block |
||
2238 | 2238 | $oldImport = $this->importDir; |
2239 | 2239 | |
2240 | 2240 | $this->importDir = (array) $this->importDir; |
2241 | - $this->importDir[] = $pi['dirname'].'/'; |
|
2241 | + $this->importDir[] = $pi['dirname'] . '/'; |
|
2242 | 2242 | |
2243 | 2243 | $this->addParsedFile($fname); |
2244 | 2244 | |
@@ -2684,17 +2684,17 @@ discard block |
||
2684 | 2684 | |
2685 | 2685 | if (!self::$operatorString) { |
2686 | 2686 | self::$operatorString = |
2687 | - '('.implode('|', array_map( |
|
2687 | + '(' . implode('|', array_map( |
|
2688 | 2688 | array('lessc', 'preg_quote'), |
2689 | 2689 | array_keys(self::$precedence) |
2690 | - )).')'; |
|
2690 | + )) . ')'; |
|
2691 | 2691 | |
2692 | 2692 | $commentSingle = Lessc::preg_quote(self::$commentSingle); |
2693 | 2693 | $commentMultiLeft = Lessc::preg_quote(self::$commentMultiLeft); |
2694 | 2694 | $commentMultiRight = Lessc::preg_quote(self::$commentMultiRight); |
2695 | 2695 | |
2696 | - self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight; |
|
2697 | - self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais'; |
|
2696 | + self::$commentMulti = $commentMultiLeft . '.*?' . $commentMultiRight; |
|
2697 | + self::$whitePattern = '/' . $commentSingle . '[^\n]*\s*|(' . self::$commentMulti . ')\s*|\s+/Ais'; |
|
2698 | 2698 | } |
2699 | 2699 | } |
2700 | 2700 | |
@@ -2727,7 +2727,7 @@ discard block |
||
2727 | 2727 | while (false !== $this->parseChunk()); |
2728 | 2728 | |
2729 | 2729 | if ($this->count != strlen($this->buffer)) { |
2730 | - $this->throwError('parse error count '.$this->count.' != len buffer '.strlen($this->buffer)); |
|
2730 | + $this->throwError('parse error count ' . $this->count . ' != len buffer ' . strlen($this->buffer)); |
|
2731 | 2731 | |
2732 | 2732 | } |
2733 | 2733 | |
@@ -2934,7 +2934,7 @@ discard block |
||
2934 | 2934 | // mixin |
2935 | 2935 | if ($this->mixinTags($tags) && |
2936 | 2936 | $this->argumentDef($argv, $isVararg) && |
2937 | - $this->keyword($suffix) && $this->end() |
|
2937 | + $this->keyword($suffix) && $this->end() |
|
2938 | 2938 | ) { |
2939 | 2939 | $tags = $this->fixTags($tags); |
2940 | 2940 | $this->append(array('mixin', $tags, $argv, $suffix), $s); |
@@ -2958,7 +2958,7 @@ discard block |
||
2958 | 2958 | "|", |
2959 | 2959 | array_map(array("lessc", "preg_quote"), $directives) |
2960 | 2960 | ); |
2961 | - $pattern = '/^(-[a-z-]+-)?('.$pattern.')$/i'; |
|
2961 | + $pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i'; |
|
2962 | 2962 | |
2963 | 2963 | return preg_match($pattern, $dirname); |
2964 | 2964 | } |
@@ -3042,7 +3042,7 @@ discard block |
||
3042 | 3042 | $needWhite = $whiteBefore && !$this->inParens; |
3043 | 3043 | |
3044 | 3044 | $m = array(); |
3045 | - if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { |
|
3045 | + if ($this->match(self::$operatorString . ($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { |
|
3046 | 3046 | if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) { |
3047 | 3047 | foreach (self::$supressDivisionProps as $pattern) { |
3048 | 3048 | if (preg_match($pattern, $this->env->currentProperty)) { |
@@ -3204,7 +3204,7 @@ discard block |
||
3204 | 3204 | // css hack: \0 |
3205 | 3205 | $m = array(); |
3206 | 3206 | if ($this->literal('\\') && $this->match('([0-9]+)', $m)) { |
3207 | - $value = array('keyword', '\\'.$m[1]); |
|
3207 | + $value = array('keyword', '\\' . $m[1]); |
|
3208 | 3208 | return true; |
3209 | 3209 | } else { |
3210 | 3210 | $this->seek($s); |
@@ -3328,7 +3328,7 @@ discard block |
||
3328 | 3328 | $stop = array_merge($stop, $rejectStrs); |
3329 | 3329 | } |
3330 | 3330 | |
3331 | - $patt = '(.*?)('.implode("|", $stop).')'; |
|
3331 | + $patt = '(.*?)(' . implode("|", $stop) . ')'; |
|
3332 | 3332 | |
3333 | 3333 | $nestingLevel = 0; |
3334 | 3334 | |
@@ -3402,8 +3402,8 @@ discard block |
||
3402 | 3402 | $content = array(); |
3403 | 3403 | |
3404 | 3404 | // look for either ending delim , escape, or string interpolation |
3405 | - $patt = '([^\n]*?)(@\{|\\\\|'. |
|
3406 | - Lessc::preg_quote($delim).')'; |
|
3405 | + $patt = '([^\n]*?)(@\{|\\\\|' . |
|
3406 | + Lessc::preg_quote($delim) . ')'; |
|
3407 | 3407 | |
3408 | 3408 | $oldWhite = $this->eatWhiteDefault; |
3409 | 3409 | $this->eatWhiteDefault = false; |
@@ -3750,7 +3750,7 @@ discard block |
||
3750 | 3750 | |
3751 | 3751 | while (true) { |
3752 | 3752 | $m = array(); |
3753 | - if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) { |
|
3753 | + if ($this->match('([' . $chars . '0-9][' . $chars . ']*)', $m)) { |
|
3754 | 3754 | $parts[] = $m[1]; |
3755 | 3755 | if ($simple) { |
3756 | 3756 | break; |
@@ -3863,7 +3863,7 @@ discard block |
||
3863 | 3863 | if (!empty($sub)) { |
3864 | 3864 | $name = array('variable', $sub); |
3865 | 3865 | } else { |
3866 | - $name = $this->lessc->vPrefix.$name; |
|
3866 | + $name = $this->lessc->vPrefix . $name; |
|
3867 | 3867 | } |
3868 | 3868 | return true; |
3869 | 3869 | } |
@@ -4050,7 +4050,7 @@ discard block |
||
4050 | 4050 | $validChars = $allowNewline ? "." : "[^\n]"; |
4051 | 4051 | } |
4052 | 4052 | $m = array(); |
4053 | - if (!$this->match('('.$validChars.'*?)'.Lessc::preg_quote($what), $m, !$until)) { |
|
4053 | + if (!$this->match('(' . $validChars . '*?)' . Lessc::preg_quote($what), $m, !$until)) { |
|
4054 | 4054 | return false; |
4055 | 4055 | } |
4056 | 4056 | if ($until) { |
@@ -4067,7 +4067,7 @@ discard block |
||
4067 | 4067 | $eatWhitespace = $this->eatWhiteDefault; |
4068 | 4068 | } |
4069 | 4069 | |
4070 | - $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais'; |
|
4070 | + $r = '/' . $regex . ($eatWhitespace && !$this->writeComments ? '\s*' : '') . '/Ais'; |
|
4071 | 4071 | if (preg_match($r, $this->buffer, $out, 0, $this->count)) { |
4072 | 4072 | $this->count += strlen($out[0]); |
4073 | 4073 | if ($eatWhitespace && $this->writeComments) { |
@@ -4105,7 +4105,7 @@ discard block |
||
4105 | 4105 | if (is_null($from)) { |
4106 | 4106 | $from = $this->count; |
4107 | 4107 | } |
4108 | - $r = '/'.$regex.'/Ais'; |
|
4108 | + $r = '/' . $regex . '/Ais'; |
|
4109 | 4109 | $result = preg_match($r, $this->buffer, $out, 0, $from); |
4110 | 4110 | |
4111 | 4111 | return $result; |
@@ -4225,7 +4225,7 @@ discard block |
||
4225 | 4225 | case '"': |
4226 | 4226 | case "'": |
4227 | 4227 | $m = array(); |
4228 | - if (preg_match('/'.$min[0].'.*?(?<!\\\\)'.$min[0].'/', $text, $m, 0, $count)) { |
|
4228 | + if (preg_match('/' . $min[0] . '.*?(?<!\\\\)' . $min[0] . '/', $text, $m, 0, $count)) { |
|
4229 | 4229 | $count += strlen($m[0]) - 1; |
4230 | 4230 | } |
4231 | 4231 | break; |
@@ -4250,13 +4250,13 @@ discard block |
||
4250 | 4250 | $count += strlen($min[0]); |
4251 | 4251 | } |
4252 | 4252 | |
4253 | - $out .= substr($text, 0, $count).str_repeat("\n", $newlines); |
|
4253 | + $out .= substr($text, 0, $count) . str_repeat("\n", $newlines); |
|
4254 | 4254 | $text = substr($text, $count + $skip); |
4255 | 4255 | |
4256 | 4256 | $min = null; |
4257 | 4257 | } |
4258 | 4258 | |
4259 | - return $out.$text; |
|
4259 | + return $out . $text; |
|
4260 | 4260 | } |
4261 | 4261 | } |
4262 | 4262 | |
@@ -4291,7 +4291,7 @@ discard block |
||
4291 | 4291 | |
4292 | 4292 | public function property($name, $value) |
4293 | 4293 | { |
4294 | - return $name.$this->assignSeparator.$value.";"; |
|
4294 | + return $name . $this->assignSeparator . $value . ";"; |
|
4295 | 4295 | } |
4296 | 4296 | |
4297 | 4297 | protected function isEmpty($block) |
@@ -4323,25 +4323,25 @@ discard block |
||
4323 | 4323 | $this->indentLevel++; |
4324 | 4324 | |
4325 | 4325 | if ($this->breakSelectors) { |
4326 | - $selectorSeparator = $this->selectorSeparator.$this->break.$pre; |
|
4326 | + $selectorSeparator = $this->selectorSeparator . $this->break . $pre; |
|
4327 | 4327 | } else { |
4328 | 4328 | $selectorSeparator = $this->selectorSeparator; |
4329 | 4329 | } |
4330 | 4330 | |
4331 | - echo $pre. |
|
4331 | + echo $pre . |
|
4332 | 4332 | implode($selectorSeparator, $block->selectors); |
4333 | 4333 | if ($isSingle) { |
4334 | 4334 | echo $this->openSingle; |
4335 | 4335 | $inner = ""; |
4336 | 4336 | } else { |
4337 | - echo $this->open.$this->break; |
|
4337 | + echo $this->open . $this->break; |
|
4338 | 4338 | $inner = $this->indentStr(); |
4339 | 4339 | } |
4340 | 4340 | } |
4341 | 4341 | |
4342 | 4342 | if (!empty($block->lines)) { |
4343 | - $glue = $this->break.$inner; |
|
4344 | - echo $inner.implode($glue, $block->lines); |
|
4343 | + $glue = $this->break . $inner; |
|
4344 | + echo $inner . implode($glue, $block->lines); |
|
4345 | 4345 | if (!$isSingle && !empty($block->children)) { |
4346 | 4346 | echo $this->break; |
4347 | 4347 | } |
@@ -4357,9 +4357,9 @@ discard block |
||
4357 | 4357 | } |
4358 | 4358 | |
4359 | 4359 | if ($isSingle) { |
4360 | - echo $this->closeSingle.$this->break; |
|
4360 | + echo $this->closeSingle . $this->break; |
|
4361 | 4361 | } else { |
4362 | - echo $pre.$this->close.$this->break; |
|
4362 | + echo $pre . $this->close . $this->break; |
|
4363 | 4363 | } |
4364 | 4364 | |
4365 | 4365 | $this->indentLevel--; |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | public $posxlabel; |
167 | 167 | public $posxup; |
168 | 168 | public $posxref; |
169 | - public $posxpicture; // For picture |
|
170 | - public $posxdesc; // For description |
|
169 | + public $posxpicture; // For picture |
|
170 | + public $posxdesc; // For description |
|
171 | 171 | public $posxqty; |
172 | 172 | public $posxpuht; |
173 | 173 | public $posxtva; |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | |
547 | 547 | if (get_class($object) == 'CommandeFournisseur') { |
548 | 548 | /** @var CommandeFournisseur $object*/ |
549 | - $object->date_validation = $object->date_valid; |
|
549 | + $object->date_validation = $object->date_valid; |
|
550 | 550 | $object->date_commande = $object->date; |
551 | 551 | } |
552 | 552 | $resarray = array( |
@@ -1500,7 +1500,7 @@ discard block |
||
1500 | 1500 | * @param stdClass $b |
1501 | 1501 | * @return int<-1,1> |
1502 | 1502 | */ |
1503 | - static function ($a, $b) { |
|
1503 | + static function($a, $b) { |
|
1504 | 1504 | return ($a->rank > $b->rank) ? 1 : -1; |
1505 | 1505 | } |
1506 | 1506 | ); |