@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | 'u.statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000), |
| 148 | 148 | ); |
| 149 | 149 | // Extra fields |
| 150 | -include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 150 | +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 151 | 151 | |
| 152 | 152 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 153 | 153 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | if ($searchCategoryUserOperator == 0) { |
| 468 | 468 | $searchCategoryUserSqlList[] = " EXISTS (SELECT ck.fk_user FROM ".MAIN_DB_PREFIX."categorie_user as ck WHERE u.rowid = ck.fk_user AND ck.fk_categorie = ".((int) $searchCategoryUser).")"; |
| 469 | 469 | } else { |
| 470 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryUser); |
|
| 470 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryUser); |
|
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | } |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | } |
| 986 | 986 | |
| 987 | 987 | if (empty($obj->country_code)) { |
| 988 | - $obj->country_code = ''; // TODO Add join in select with country table to get country_code |
|
| 988 | + $obj->country_code = ''; // TODO Add join in select with country table to get country_code |
|
| 989 | 989 | } |
| 990 | 990 | |
| 991 | 991 | // Store properties in $object |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | if ($api_key) { |
| 1189 | 1189 | if ($canreadsecretapi) { |
| 1190 | 1190 | print '<span class="opacitymedium">'; |
| 1191 | - print showValueWithClipboardCPButton($object->api_key, 1, dol_trunc($api_key, 3)); // TODO Add an option to also reveal the hash, not only copy paste |
|
| 1191 | + print showValueWithClipboardCPButton($object->api_key, 1, dol_trunc($api_key, 3)); // TODO Add an option to also reveal the hash, not only copy paste |
|
| 1192 | 1192 | print '</span>'; |
| 1193 | 1193 | } else { |
| 1194 | 1194 | print '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
| 255 | 255 | // Set path to the background PDF File |
| 256 | 256 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
| 257 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 257 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 258 | 258 | $tplidx = $pdf->importPage(1); |
| 259 | 259 | } |
| 260 | 260 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $height_trackingnumber = 4; |
| 336 | 336 | |
| 337 | 337 | $pdf->SetFont('', 'B', $default_font_size - 2); |
| 338 | - $pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber") . " : " . $object->tracking_number, 0, 1, false, true, 'L'); |
|
| 338 | + $pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L'); |
|
| 339 | 339 | |
| 340 | 340 | $tab_top_alt = $pdf->GetY(); |
| 341 | 341 | $object->getUrlTrackingStatus($object->tracking_number); |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | if ($object->volume_units < 50) { |
| 838 | 838 | $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); |
| 839 | 839 | } else { |
| 840 | - $totalVolumetoshow = price($object->trueVolume, 0, $outputlangs, 0, 0).' '.measuringUnitString(0, "volume", $object->volume_units); |
|
| 840 | + $totalVolumetoshow = price($object->trueVolume, 0, $outputlangs, 0, 0).' '.measuringUnitString(0, "volume", $object->volume_units); |
|
| 841 | 841 | } |
| 842 | 842 | } |
| 843 | 843 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | |
| 65 | 65 | $addheaders = array( |
| 66 | - 'Content-Type: application/json','Accept: application/json', "DOLAPIKEY: {$this->api_key}"); |
|
| 66 | + 'Content-Type: application/json', 'Accept: application/json', "DOLAPIKEY: {$this->api_key}"); |
|
| 67 | 67 | |
| 68 | 68 | // $url = $this->api_url.'/'.$endpoint.'?'.http_build_query(['api_key'=>$this->api_key]); |
| 69 | 69 | // |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | "inventorycode" => "PRODUCEAPI-YY-MM-DD", |
| 161 | 161 | "autoclose" => 1, |
| 162 | 162 | "arraytoconsume" => [], |
| 163 | - "arraytoproduce" => [$mod_id] ]; |
|
| 163 | + "arraytoproduce" => [$mod_id]]; |
|
| 164 | 164 | |
| 165 | 165 | $result = $this->getUrl("mos/{$mos_state_id}/produceandconsume", $test, 'POST', $data); |
| 166 | 166 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | * Init phpunit tests |
| 70 | 70 | * |
| 71 | 71 | * @return void |
| 72 | - */ |
|
| 72 | + */ |
|
| 73 | 73 | protected function setUp(): void |
| 74 | 74 | { |
| 75 | 75 | parent::setUp(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * \brief Abstract Class for Rest API Tests |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -global $conf,$user,$langs,$db; |
|
| 27 | +global $conf, $user, $langs, $db; |
|
| 28 | 28 | //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver |
| 29 | 29 | //require_once 'PHPUnit/Autoload.php'; |
| 30 | 30 | require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | parent::setUp(); |
| 76 | 76 | |
| 77 | - global $conf,$user,$langs,$db; |
|
| 77 | + global $conf, $user, $langs, $db; |
|
| 78 | 78 | $conf = $this->savconf; |
| 79 | 79 | $user = $this->savuser; |
| 80 | 80 | $langs = $this->savlangs; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | print "$method result = ".var_export($result, true)."\n"; |
| 95 | 95 | print "$method curl_error_no: ".$result['curl_error_no']."\n"; |
| 96 | 96 | $this->assertEquals('', $result['curl_error_no'], "$test Should not have a curl error"); |
| 97 | - $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
| 97 | + $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
| 98 | 98 | |
| 99 | 99 | $this->assertNotNull($object, "$test Parsing of JSON result must not be null"); |
| 100 | 100 | $this->assertNotEquals(500, (empty($object['error']['code']) ? 0 : $object['error']['code']), "$test Error".(empty($object['error']['message']) ? '' : ' '.$object['error']['message'])); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function testRestGetUser() |
| 48 | 48 | { |
| 49 | - global $conf,$user,$langs,$db; |
|
| 49 | + global $conf, $user, $langs, $db; |
|
| 50 | 50 | |
| 51 | 51 | $test = "Invalid User -"; |
| 52 | 52 | $url = $this->api_url.'/users/123456789?api_key='.$this->api_key; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | print __METHOD__." result code for creating non existing user = ".var_export($result, true)."\n"; |
| 123 | 123 | print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; |
| 124 | 124 | $this->assertEquals('', $result['curl_error_no'], "$test Should not have a curl error"); |
| 125 | - $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
| 125 | + $object = json_decode($result['content'], true); // If success content is just an id, if not an array |
|
| 126 | 126 | |
| 127 | 127 | $this->assertNotNull($object, "$test Parsing of JSON result must not be null"); |
| 128 | 128 | $this->assertNotEquals(500, ((is_scalar($object) || empty($object['error']) || empty($object['error']['code'])) ? 0 : $object['error']['code']), "$test Error".(empty($object['error']['message']) ? '' : ' '.$object['error']['message'])); |