Applied rector suggestions

This commit is contained in:
Jan Böhmer 2024-06-22 00:31:43 +02:00
parent 4106bcef5f
commit 20f32c7f12
170 changed files with 808 additions and 761 deletions

View file

@ -116,7 +116,7 @@ class PKOptionalImporter
//All imported users get assigned to the "PartKeepr Users" group
$group_users = $this->em->find(Group::class, 3);
$group = $this->em->getRepository(Group::class)->findOneBy(['name' => 'PartKeepr Users', 'parent' => $group_users]);
if (!$group) {
if ($group === null) {
$group = new Group();
$group->setName('PartKeepr Users');
$group->setParent($group_users);

View file

@ -218,7 +218,7 @@ class PKPartImporter
'iso_code' => $currency_iso_code,
]);
if (!$currency) {
if ($currency === null) {
$currency = new Currency();
$currency->setIsoCode($currency_iso_code);
$currency->setName(Currencies::getName($currency_iso_code));
@ -265,7 +265,7 @@ class PKPartImporter
]);
//When no orderdetail exists, create one
if (!$orderdetail) {
if ($orderdetail === null) {
$orderdetail = new Orderdetail();
$orderdetail->setSupplier($supplier);
$orderdetail->setSupplierpartnr($spn);