clean code and phpdoc
This commit is contained in:
parent
7bcb635a4e
commit
f19fc5c70c
6 changed files with 17 additions and 43 deletions
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -121,7 +122,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
|||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Fichinter $object Object we need next value for
|
||||
* @return string|0 Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc = 0, $object = '')
|
||||
|
|
@ -148,7 +149,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
|||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $objforref Object for number to search
|
||||
* @param Fichinter $objforref Object for number to search
|
||||
* @return string|0 Next free value, 0 if KO
|
||||
*/
|
||||
public function getNumRef($objsoc, $objforref)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -82,7 +83,7 @@ class mod_pacific extends ModeleNumRefFicheinter
|
|||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Fichinter $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
|
|
@ -121,7 +122,7 @@ class mod_pacific extends ModeleNumRefFicheinter
|
|||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Fichinter $object Object we need next value for
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc = 0, $object = '')
|
||||
|
|
@ -161,9 +162,9 @@ class mod_pacific extends ModeleNumRefFicheinter
|
|||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Fichinter $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
public function getNumRef($objsoc, $objforref)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
|||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Object $holiday holiday object
|
||||
* @param Holiday $holiday holiday object
|
||||
* @return string|0 Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $holiday)
|
||||
|
|
@ -125,18 +125,4 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
|||
|
||||
return $numFinal;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
* @param User $fuser User object
|
||||
* @param Object $objforref Holiday object
|
||||
* @return string|0 Value if OK, 0 if KO
|
||||
*/
|
||||
public function holiday_get_num($fuser, $objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($fuser, $objforref);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
|||
/**
|
||||
* Test if existing numbers make problems with numbering
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Holiday $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
|
|
@ -114,7 +114,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
|||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Object $holiday Holiday object
|
||||
* @param Holiday $holiday Holiday object
|
||||
* @return string|-1 Value if OK, -1 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $holiday)
|
||||
|
|
@ -152,19 +152,4 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
|||
dol_syslog("mod_holiday_madonna::getNextValue return ".$this->prefix.$yymm."-".$num);
|
||||
return $this->prefix.$yymm."-".$num;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
* @param User $fuser User object
|
||||
* @param Object $objforref Holiday object
|
||||
* @return string|-1 Value if OK, -1 if KO
|
||||
*/
|
||||
public function holiday_get_num($fuser, $objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($fuser, $objforref);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -123,7 +123,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
|
|||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Evaluation $object Object we need next value for
|
||||
* @return string|0 Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -77,7 +78,7 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation
|
|||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Evaluation $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
|
|
@ -117,7 +118,7 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation
|
|||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @param Evaluation $object Object we need next value for
|
||||
* @return string|-1 Value if OK, -1 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
|
|
|
|||
Loading…
Reference in a new issue