fix phpstan (#30231)

* fix phpstan

* Update product.class.php

* Update product.class.php
This commit is contained in:
Frédéric FRANCE 2024-07-01 19:05:50 +02:00 committed by GitHub
parent f7c0253035
commit 4cb64b5a60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -2380,7 +2380,7 @@ class Product extends CommonObject
return -1;
}
if ($newprice !== '' || $newprice === 0) {
if ($newprice === 0 || $newprice !== '') {
if ($newpricebase == 'TTC') {
$price_ttc = price2num($newprice, 'MU');
$price = (float) price2num($newprice) / (1 + ((float) $newvat / 100));

View File

@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2009-2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2009-2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.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
@ -41,7 +42,7 @@ class ActionsStripeconnect extends CommonHookActions
*/
public $db;
private $config = array();
private $config = array(); // @phpstan-ignore-line
/**