-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean code and phpdoc #28773
clean code and phpdoc #28773
Changes from 9 commits
7bcb635
f19fc5c
e160ba6
6f3ba87
71a6555
50e8c19
ac5d19a
23ae219
aaf173a
a300206
7a7d342
e60db40
40ff3ca
7fabf59
7ad8f6b
c8c003a
8b79cfa
d666a0f
16f161e
424eabf
ddfd1fb
bb7ecb9
d7517b5
0bcd103
9b4c8f2
c8714ea
de4c564
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr> | ||
* Copyright (C) 2022-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 | ||
|
@@ -78,10 +78,10 @@ | |
* 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 Asset $object Object we need next value for | ||
* @return boolean false if conflict, true if ok | ||
*/ | ||
public function canBeActivated($object) | ||
Check warning on line 84 in htdocs/core/modules/asset/mod_asset_standard.php GitHub Actions / Run phan
|
||
{ | ||
global $conf, $langs, $db; | ||
|
||
|
@@ -118,7 +118,7 @@ | |
/** | ||
* Return next free value | ||
* | ||
* @param Object $object Object we need next value for | ||
* @param Asset $object Object we need next value for | ||
* @return string|-1 Next value if OK, -1 if KO | ||
*/ | ||
public function getNextValue($object) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Copyright (C) 2004-2007 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <[email protected]> | ||
* 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 | ||
|
@@ -119,7 +119,7 @@ public function getExample() | |
* Return next free value | ||
* | ||
* @param Product $objprod Object product | ||
* @param Object $object Object we need next value for | ||
* @param Bom $object Object we need next value for | ||
* @return string|0 Next value if OK, 0 if KO | ||
*/ | ||
public function getNextValue($objprod, $object) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -76,10 +77,10 @@ | |
* 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 | ||
* @return boolean false if conflict, true if ok | ||
* @param Bom $object Object we need next value for | ||
* @return boolean false if conflict, true if ok | ||
*/ | ||
public function canBeActivated($object) | ||
Check warning on line 83 in htdocs/core/modules/bom/mod_bom_standard.php GitHub Actions / Run phan
|
||
{ | ||
global $conf, $langs, $db; | ||
|
||
|
@@ -112,9 +113,9 @@ | |
/** | ||
* Return next free value | ||
* | ||
* @param Product $objprod Object product | ||
* @param Object $object Object we need next value for | ||
* @return string|-1 Next value if OK, -1 if KO | ||
* @param Product $objprod Object product | ||
* @param Bom $object Object we need next value for | ||
* @return string|-1 Next value if OK, -1 if KO | ||
*/ | ||
public function getNextValue($objprod, $object) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?php | ||
/* Copyright (C) 2015 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -73,10 +74,10 @@ | |
* 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 RemiseCheque $object Object we need next value for | ||
* @return boolean false if conflict, true if ok | ||
*/ | ||
public function canBeActivated($object) | ||
Check warning on line 80 in htdocs/core/modules/cheque/mod_chequereceipt_mint.php GitHub Actions / Run phan
|
||
{ | ||
global $conf, $langs, $db; | ||
|
||
|
@@ -150,19 +151,4 @@ | |
dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); | ||
return $this->prefix.$yymm."-".$num; | ||
} | ||
|
||
|
||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps | ||
/** | ||
* Return next free value | ||
* | ||
* @param Societe $objsoc Object third party | ||
* @param string $objforref Object for number to search | ||
* @return string Next free value | ||
*/ | ||
public function chequereceipt_get_num($objsoc, $objforref) | ||
{ | ||
// phpcs:enable | ||
return $this->getNextValue($objsoc, $objforref); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/* Copyright (C) 2015 Juanjo Menent <[email protected]> | ||
* 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 | ||
|
@@ -131,19 +131,4 @@ public function getNextValue($objsoc, $object) | |
|
||
return $numFinal; | ||
} | ||
|
||
|
||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps | ||
/** | ||
* Return next free value | ||
* | ||
* @param Societe $objsoc Object third party | ||
* @param string $objforref Object for number to search | ||
* @return string Next free value | ||
*/ | ||
public function chequereceipt_get_num($objsoc, $objforref) | ||
{ | ||
// phpcs:enable | ||
return $this->getNextValue($objsoc, $objforref); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -88,10 +89,10 @@ | |
* 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 Commande $object Object we need next value for | ||
* @return boolean false if conflict, true if ok | ||
*/ | ||
public function canBeActivated($object) | ||
Check warning on line 95 in htdocs/core/modules/commande/mod_commande_marbre.php GitHub Actions / Run phan
|
||
{ | ||
global $conf, $langs, $db; | ||
|
||
|
@@ -125,7 +126,7 @@ | |
* Return next free value | ||
* | ||
* @param Societe $objsoc Object thirdparty | ||
* @param Object $object Object we need next value for | ||
* @param Commande $object Object we need next value for | ||
* @return string|-1 Value if OK, -1 if KO | ||
*/ | ||
public function getNextValue($objsoc, $object) | ||
|
@@ -165,19 +166,4 @@ | |
dol_syslog("mod_commande_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
return $this->prefix.$yymm."-".$num; | ||
} | ||
|
||
|
||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps | ||
/** | ||
* Return next free value | ||
* | ||
* @param Societe $objsoc Object third party | ||
* @param string $objforref Object for number to search | ||
* @return string|-1 Next free value, -1 if KO | ||
*/ | ||
public function commande_get_num($objsoc, $objforref) | ||
{ | ||
// phpcs:enable | ||
return $this->getNextValue($objsoc, $objforref); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* Copyright (C) 2004-2007 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <[email protected]> | ||
* 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 | ||
|
@@ -119,7 +119,7 @@ public function getExample() | |
* Return next free value | ||
* | ||
* @param Societe $objsoc Object thirdparty | ||
* @param Object $object Object we need next value for | ||
* @param Commande $object Object we need next value for | ||
* @return string|0 Next value if OK, 0 if KO | ||
*/ | ||
public function getNextValue($objsoc, $object) | ||
|
@@ -149,19 +149,4 @@ public function getNextValue($objsoc, $object) | |
|
||
return $numFinal; | ||
} | ||
|
||
|
||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps | ||
/** | ||
* Return next free value | ||
* | ||
* @param Societe $objsoc Object third party | ||
* @param string $objforref Object for number to search | ||
* @return string Next free value | ||
*/ | ||
public function commande_get_num($objsoc, $objforref) | ||
{ | ||
// phpcs:enable | ||
return $this->getNextValue($objsoc, $objforref); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* Copyright (C) 2005 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2004-2008 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2010 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -86,10 +87,10 @@ | |
* 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 Delivery $object Object we need next value for | ||
* @return boolean false if conflict, true if ok | ||
*/ | ||
public function canBeActivated($object) | ||
Check warning on line 93 in htdocs/core/modules/delivery/mod_delivery_jade.php GitHub Actions / Run phan
|
||
{ | ||
global $langs, $conf, $db; | ||
|
||
|
@@ -126,7 +127,7 @@ | |
* Return next free value | ||
* | ||
* @param Societe $objsoc Object thirdparty | ||
* @param Object $object Object we need next value for | ||
* @param Delivery $object Object we need next value for | ||
* @return string|-1 Value if OK, -1 if KO | ||
*/ | ||
public function getNextValue($objsoc, $object) | ||
|
@@ -168,19 +169,4 @@ | |
dol_syslog("mod_delivery_jade::getNextValue return ".$this->prefix.$yymm."-".$num); | ||
return $this->prefix.$yymm."-".$num; | ||
} | ||
|
||
|
||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps | ||
/** | ||
* Return next free ref | ||
* | ||
* @param Societe $objsoc Object thirdparty | ||
* @param Object $object Object livraison | ||
* @return string|-1 Value if OK, -1 if KO | ||
*/ | ||
public function delivery_get_num($objsoc = 0, $object = '') | ||
{ | ||
// phpcs:enable | ||
return $this->getNextValue($objsoc, $object); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdeweerd phan warning here