Remove bad exakat rules

This commit is contained in:
Laurent Destailleur 2020-09-27 21:20:39 +02:00
parent 1aaf1fe357
commit 51d0856f50
4 changed files with 6 additions and 13 deletions

View File

@ -13,5 +13,5 @@ jobs:
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/RepeatedPrint,Structures/UselessParenthesis'
ignore_rules: 'Performances/PrePostIncrement,Functions/WrongNumberOfArguments,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/RepeatedPrint,Structures/UselessParenthesis'
ignore_dirs: '/htdocs/includes,/htdocs/build,/htdocs/dev,/htdocs/doc,/htdocs/scripts,/htdocs/test'

View File

@ -32,14 +32,6 @@ if (!$user->admin)
$error = 0;
// List of statut
static $tmpstatus2label = array(
'0'=>'OpenEtablishment',
'1'=>'CloseEtablishment'
);
$status2label = array('');
foreach ($tmpstatus2label as $key => $val) $status2label[$key] = $langs->trans($val);
/*
* Actions

View File

@ -58,9 +58,11 @@ if ($action == 'update') {
}
}
/*
* View
*/
llxHeader('', $langs->trans('Parameters'));
$form = new Form($db);

View File

@ -148,10 +148,9 @@ class Establishment extends CommonObject
$now = dol_now();
// Clean parameters
$this->address = ($this->address > 0 ? $this->address : $this->address);
$this->zip = ($this->zip > 0 ? $this->zip : $this->zip);
$this->town = ($this->town > 0 ? $this->town : $this->town);
$this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id);
$this->address = trim($this->address);
$this->zip = trim($this->zip);
$this->town = trim($this->town);
if (empty($this->ref)) $this->ref = '(PROV)';