From 4384786c0450ee8533af0b1ce0861c5aa333ccb4 Mon Sep 17 00:00:00 2001 From: MDW Date: Sat, 17 Aug 2024 21:12:48 +0200 Subject: [PATCH] Fix phpcs for intracom --- .../intracommreport/admin/intracommreport.php | 9 +++++---- .../class/intracommreport.class.php | 20 +++++++++---------- htdocs/intracommreport/list.php | 6 +++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/htdocs/intracommreport/admin/intracommreport.php b/htdocs/intracommreport/admin/intracommreport.php index ad0ae7d226a08..95f9f16180699 100644 --- a/htdocs/intracommreport/admin/intracommreport.php +++ b/htdocs/intracommreport/admin/intracommreport.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2020 Open-DSI + * Copyright (C) 2024 MDW * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -129,7 +130,7 @@ print ''; print ''.$langs->trans("INTRACOMMREPORT_TYPE_ACTEUR").''; -$arraychoices = array(''=>$langs->trans("None"), 'PSI'=>'Déclarant pour son compte', 'TDP'=>'Tiers déclarant'); +$arraychoices = array('' => $langs->trans("None"), 'PSI' => 'Déclarant pour son compte', 'TDP' => 'Tiers déclarant'); print ''; print $form->selectarray('INTRACOMMREPORT_TYPE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_TYPE_ACTEUR, 0); print ''; @@ -137,7 +138,7 @@ print ''; print ''.$langs->trans("INTRACOMMREPORT_ROLE_ACTEUR").''; -$arraychoices = array(''=>$langs->trans("None"), 'sender'=>'Emetteur', 'PSI'=>'Déclarant'); +$arraychoices = array('' => $langs->trans("None"), 'sender' => 'Emetteur', 'PSI' => 'Déclarant'); print ''; print $form->selectarray('INTRACOMMREPORT_ROLE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_ROLE_ACTEUR, 0); print ''; @@ -145,7 +146,7 @@ print ''; print ''.$langs->trans("INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION").''; -$arraychoices = array(1=>'Seuil de 460 000 €', 2=>'En dessous de 460 000 €'); +$arraychoices = array(1 => 'Seuil de 460 000 €', 2 => 'En dessous de 460 000 €'); print ''; print $form->selectarray('INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION, 0); print ''; @@ -153,7 +154,7 @@ print ''; print ''.$langs->trans("INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION").''; -$arraychoices = array(3=>'Seuil de 460 000 €', 4=>'En dessous de 460 000 €'); +$arraychoices = array(3 => 'Seuil de 460 000 €', 4 => 'En dessous de 460 000 €'); print ''; print $form->selectarray('INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION, 0); print ''; diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index 1f4c455cd2280..2ca98e31396b7 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -103,16 +103,16 @@ class IntracommReport extends CommonObject /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( - "rowid" => array("type"=>"integer", "label"=>"TechnicalID", "enabled"=>"1", 'position'=>10, 'notnull'=>1, "visible"=>"0",), - "ref" => array("type"=>"varchar(30)", "label"=>"Ref", "enabled"=>"1", 'position'=>15, 'notnull'=>1, "visible"=>"1", "csslist"=>"tdoverflowmax150", "showoncombobox"=>"1",), - "type_declaration" => array("type"=>"varchar(32)", "label"=>"TypeOfDeclaration", "enabled"=>"1", 'position'=>25, 'notnull'=>0, "visible"=>"1", 'arrayofkeyval' => array("deb" => "DEB", "des" => "DES")), - "periods" => array("type"=>"varchar(32)", "label"=>"Periods", "enabled"=>"1", 'position'=>30, 'notnull'=>0, "visible"=>"-1",), - "mode" => array("type"=>"varchar(32)", "label"=>"Mode", "enabled"=>"1", 'position'=>35, 'notnull'=>0, "visible"=>"-1",), - "content_xml" => array("type"=>"text", "label"=>"Contentxml", "enabled"=>"1", 'position'=>40, 'notnull'=>0, "visible"=>"-1",), - "type_export" => array("type"=>"varchar(10)", "label"=>"TypeOfExport", "enabled"=>"1", 'position'=>45, 'notnull'=>0, "visible"=>"-1", 'arrayofkeyval' => array("in" => "Input", "out" => "Output")), - "datec" => array("type"=>"datetime", "label"=>"DateCreation", "enabled"=>"1", 'position'=>50, 'notnull'=>0, "visible"=>"-1",), - "tms" => array("type"=>"timestamp", "label"=>"DateModification", "enabled"=>"1", 'position'=>55, 'notnull'=>1, "visible"=>"-1",), + public $fields = array( + "rowid" => array("type" => "integer", "label" => "TechnicalID", "enabled" => "1", 'position' => 10, 'notnull' => 1, "visible" => "0",), + "ref" => array("type" => "varchar(30)", "label" => "Ref", "enabled" => "1", 'position' => 15, 'notnull' => 1, "visible" => "1", "csslist" => "tdoverflowmax150", "showoncombobox" => "1",), + "type_declaration" => array("type" => "varchar(32)", "label" => "TypeOfDeclaration", "enabled" => "1", 'position' => 25, 'notnull' => 0, "visible" => "1", 'arrayofkeyval' => array("deb" => "DEB", "des" => "DES")), + "periods" => array("type" => "varchar(32)", "label" => "Periods", "enabled" => "1", 'position' => 30, 'notnull' => 0, "visible" => "-1",), + "mode" => array("type" => "varchar(32)", "label" => "Mode", "enabled" => "1", 'position' => 35, 'notnull' => 0, "visible" => "-1",), + "content_xml" => array("type" => "text", "label" => "Contentxml", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "-1",), + "type_export" => array("type" => "varchar(10)", "label" => "TypeOfExport", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "-1", 'arrayofkeyval' => array("in" => "Input", "out" => "Output")), + "datec" => array("type" => "datetime", "label" => "DateCreation", "enabled" => "1", 'position' => 50, 'notnull' => 0, "visible" => "-1",), + "tms" => array("type" => "timestamp", "label" => "DateModification", "enabled" => "1", 'position' => 55, 'notnull' => 1, "visible" => "-1",), ); public $rowid; public $ref; diff --git a/htdocs/intracommreport/list.php b/htdocs/intracommreport/list.php index 5f8b5108bf941..d57d5a69972ee 100644 --- a/htdocs/intracommreport/list.php +++ b/htdocs/intracommreport/list.php @@ -516,8 +516,8 @@ $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/intracommreport/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); @@ -619,7 +619,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; /*if (!empty($arrayfields['anotherfield']['checked'])) {