From 5905d3be64b6c126fc103f2f391c69aa51092258 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Oct 2020 00:06:26 +0200 Subject: [PATCH] Fix phpcs --- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/lib/functions.lib.php | 5 +++-- htdocs/loan/class/paymentloan.class.php | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 987630e3660..5d3bd181753 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -763,7 +763,7 @@ class FormOther }, function(color, context) { console.log("close"); }, function(color, context) { var hex = color.val(\'hex\'); console.log("new color selected in jpicker "+hex);'; - if ($setpropertyonselect) { $out .= ' if (hex != null) document.documentElement.style.setProperty(\'--'.$setpropertyonselect.'\', \'#\'+hex);'; } + if ($setpropertyonselect) { $out .= ' if (hex != null) document.documentElement.style.setProperty(\'--'.$setpropertyonselect.'\', \'#\'+hex);'; } $out .= '}, function(color, context) { console.log("cancel"); } ); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 75ac46b6989..e3ebd7b3087 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5653,8 +5653,9 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = * Clean a string to keep only desirable HTML tags. * * @param string $stringtoclean String to clean - * @param boolean $cleanalsosomestyles Remove absolute/fixed positioning from inline styles - * @param boolean $removeclassattribute Remove the class attribute from tags + * @param int $cleanalsosomestyles Remove absolute/fixed positioning from inline styles + * @param int $removeclassattribute Remove the class attribute from tags + * @param int $cleanalsojavascript Remove also occurence of (javascript:' * @return string String cleaned * * @see dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_neverthesehtmltags() diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 508d1044d85..dc6d72094b2 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -428,6 +428,7 @@ class PaymentLoan extends CommonObject return $this->LibStatut($this->statut, $mode); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Renvoi le libelle d'un statut donne * @@ -437,7 +438,7 @@ class PaymentLoan extends CommonObject */ public function LibStatut($status, $mode = 0) { - // + // phpcs:enable return ''; }