Skip to content
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

Qual: Fix phan notifications for compta/facture/card #30667

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

mdeweerd
Copy link
Contributor

Qual: Fix phan notifications for compta/facture/card

Disable ignores for compta/facture/card.php and fix notices.

@mdeweerd
Copy link
Contributor Author

@eldy
Only a few things left.

The main question about these lines where $remise_percent and $dateinvoice are undefined is: should the be fetched with GETPOST or not?

if (!$remise_percent) {
$remise_percent = $soc->remise_percent;
}
if (!$dateinvoice) {
// Do not set 0 here (0 for a date is 1970)
$dateinvoice = (empty($dateinvoice) ? (!getDolGlobalString('MAIN_AUTOFILL_DATE') ? -1 : '') : $dateinvoice);
}

@mdeweerd mdeweerd force-pushed the fix/compta/facture/card branch 2 times, most recently from adc4456 to e3bde40 Compare September 13, 2024 11:41
@mdeweerd mdeweerd force-pushed the fix/compta/facture/card branch 2 times, most recently from 078690b to e3269e9 Compare September 29, 2024 10:41
@mdeweerd
Copy link
Contributor Author

@eldy I've ignored the PhanUndeclaredProperty notice again so that this PR can be integrated - I think that the remaining ones were introduced since I started this PR.

@mdeweerd mdeweerd marked this pull request as ready for review September 29, 2024 10:45
@@ -3297,7 +3302,7 @@
$classname = ucfirst($subelem);

$expesrc = new $classname($db);
'@phan-var-force CommonObject $expesrc';
'@phan-var-force Facture|Commande $expesrc';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the type of object in this case is Expedition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants