mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-12 14:09:31 +00:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue