mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-13 21:19:36 +00:00
Improved code style of tests
This commit is contained in:
parent
5629215ce4
commit
684334ba22
73 changed files with 196 additions and 38 deletions
|
|
@ -32,6 +32,9 @@ use Locale;
|
|||
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* @see \App\Tests\Services\Parts\PricedetailHelperTest
|
||||
*/
|
||||
class PricedetailHelper
|
||||
{
|
||||
protected string $locale;
|
||||
|
|
@ -54,7 +57,7 @@ class PricedetailHelper
|
|||
foreach ($orderdetails as $orderdetail) {
|
||||
$pricedetails = $orderdetail->getPricedetails();
|
||||
//The orderdetail must have pricedetails, otherwise this will not work!
|
||||
if (0 === count($pricedetails)) {
|
||||
if (0 === (is_countable($pricedetails) ? count($pricedetails) : 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +102,7 @@ class PricedetailHelper
|
|||
foreach ($orderdetails as $orderdetail) {
|
||||
$pricedetails = $orderdetail->getPricedetails();
|
||||
//The orderdetail must have pricedetails, otherwise this will not work!
|
||||
if (0 === count($pricedetails)) {
|
||||
if (0 === (is_countable($pricedetails) ? count($pricedetails) : 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue