From 3b8dd718165a87e05ba2369fcd0126b75775ecce Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 3 Dec 2018 21:25:44 +0100 Subject: [PATCH] Remove public $db --- htdocs/core/class/fiscalyear.class.php | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index e49cfe31938..c1c288cbf79 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * * 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 @@ -28,11 +28,6 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; */ class Fiscalyear extends CommonObject { - /** - * @var DoliDB Database handler. - */ - public $db; - /** * @var string ID to identify managed object */ @@ -65,9 +60,9 @@ class Fiscalyear extends CommonObject public $rowid; /** - * @var string fiscal year label - */ - public $label; + * @var string fiscal year label + */ + public $label; public $date_start; public $date_end; @@ -170,10 +165,10 @@ class Fiscalyear extends CommonObject // Check parameters if (empty($this->date_start) && empty($this->date_end)) - { - $this->error='ErrorBadParameter'; - return -1; - } + { + $this->error='ErrorBadParameter'; + return -1; + } $this->db->begin(); @@ -274,7 +269,7 @@ class Fiscalyear extends CommonObject return $this->LibStatut($this->statut,$mode); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Give a label from a status * @@ -284,7 +279,7 @@ class Fiscalyear extends CommonObject */ function LibStatut($statut,$mode=0) { - // phpcs:enable + // phpcs:enable global $langs; if ($mode == 0)