mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-02-15 01:08:40 +00:00
phpstan fixes
This commit is contained in:
parent
9295262646
commit
300d0b94f2
|
|
@ -279,7 +279,7 @@ final class Importer extends ImporterAbstract
|
||||||
$addr->postal = \trim($customer->addr->zip, ",. \t");
|
$addr->postal = \trim($customer->addr->zip, ",. \t");
|
||||||
$addr->city = \trim($customer->addr->city, ",. \t");
|
$addr->city = \trim($customer->addr->city, ",. \t");
|
||||||
$addr->setCountry(ISO3166TwoEnum::_DEU);
|
$addr->setCountry(ISO3166TwoEnum::_DEU);
|
||||||
$obj->setMainAddress($addr);
|
$obj->mainAddress = $addr;
|
||||||
|
|
||||||
if (!empty(\trim($customer->addr->phone, ",. \t"))) {
|
if (!empty(\trim($customer->addr->phone, ",. \t"))) {
|
||||||
$phone = new ContactElement();
|
$phone = new ContactElement();
|
||||||
|
|
@ -358,7 +358,7 @@ final class Importer extends ImporterAbstract
|
||||||
$addr->postal = \trim($supplier->addr->zip, ",. \t");
|
$addr->postal = \trim($supplier->addr->zip, ",. \t");
|
||||||
$addr->city = \trim($supplier->addr->city, ",. \t");
|
$addr->city = \trim($supplier->addr->city, ",. \t");
|
||||||
$addr->setCountry(ISO3166TwoEnum::_DEU);
|
$addr->setCountry(ISO3166TwoEnum::_DEU);
|
||||||
$obj->setMainAddress($addr);
|
$obj->mainAddress = $addr;
|
||||||
|
|
||||||
if (!empty(\trim($supplier->addr->phone, ",. \t"))) {
|
if (!empty(\trim($supplier->addr->phone, ",. \t"))) {
|
||||||
$phone = new ContactElement();
|
$phone = new ContactElement();
|
||||||
|
|
@ -488,26 +488,26 @@ final class Importer extends ImporterAbstract
|
||||||
|
|
||||||
// German Language
|
// German Language
|
||||||
$obj->addL11n(new ItemL11n(
|
$obj->addL11n(new ItemL11n(
|
||||||
$itemL11nType['name1']->getId(),
|
$itemL11nType['name1'],
|
||||||
\trim($article->name1, " ,\t"),
|
\trim($article->name1, " ,\t"),
|
||||||
ISO639x1Enum::_DE
|
ISO639x1Enum::_DE
|
||||||
));
|
));
|
||||||
|
|
||||||
$obj->addL11n(new ItemL11n(
|
$obj->addL11n(new ItemL11n(
|
||||||
$itemL11nType['name2']->getId(),
|
$itemL11nType['name2'],
|
||||||
\trim($article->name2, " ,\t"),
|
\trim($article->name2, " ,\t"),
|
||||||
ISO639x1Enum::_DE
|
ISO639x1Enum::_DE
|
||||||
));
|
));
|
||||||
|
|
||||||
$obj->addL11n(new ItemL11n(
|
$obj->addL11n(new ItemL11n(
|
||||||
$itemL11nType['info']->getId(),
|
$itemL11nType['info'],
|
||||||
\trim($article->infoSales, " ,\t"),
|
\trim($article->infoSales, " ,\t"),
|
||||||
ISO639x1Enum::_DE
|
ISO639x1Enum::_DE
|
||||||
));
|
));
|
||||||
|
|
||||||
// English Language
|
// English Language
|
||||||
$obj->addL11n(new ItemL11n(
|
$obj->addL11n(new ItemL11n(
|
||||||
$itemL11nType['name1']->getId(),
|
$itemL11nType['name1'],
|
||||||
empty($t = \trim($article->name1Eng, " ,\t"))
|
empty($t = \trim($article->name1Eng, " ,\t"))
|
||||||
? \trim($article->name1, " ,\t")
|
? \trim($article->name1, " ,\t")
|
||||||
: $t,
|
: $t,
|
||||||
|
|
@ -515,7 +515,7 @@ final class Importer extends ImporterAbstract
|
||||||
));
|
));
|
||||||
|
|
||||||
$obj->addL11n(new ItemL11n(
|
$obj->addL11n(new ItemL11n(
|
||||||
$itemL11nType['name2']->getId(),
|
$itemL11nType['name2'],
|
||||||
empty($t = \trim($article->name2Eng, " ,\t"))
|
empty($t = \trim($article->name2Eng, " ,\t"))
|
||||||
? \trim($article->name2, " ,\t")
|
? \trim($article->name2, " ,\t")
|
||||||
: $t,
|
: $t,
|
||||||
|
|
@ -626,7 +626,7 @@ final class Importer extends ImporterAbstract
|
||||||
{
|
{
|
||||||
$itemAttrValue = [];
|
$itemAttrValue = [];
|
||||||
|
|
||||||
return $itemAttrType;
|
return $itemAttrValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class GSDCostCenter implements \JsonSerializable
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $description = '';
|
public string $description = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cost center.
|
* Cost center.
|
||||||
|
|
@ -84,32 +84,6 @@ class GSDCostCenter implements \JsonSerializable
|
||||||
return $this->createdAt ?? new \DateTimeImmutable();
|
return $this->createdAt ?? new \DateTimeImmutable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set description
|
|
||||||
*
|
|
||||||
* @param string $description Description
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function setDescription(string $description) : void
|
|
||||||
{
|
|
||||||
$this->description = $description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get description
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getDescription() : string
|
|
||||||
{
|
|
||||||
return $this->description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set cost center
|
* Set cost center
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class GSDCostObject implements \JsonSerializable
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected string $description = '';
|
public string $description = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cost object.
|
* Cost object.
|
||||||
|
|
@ -84,32 +84,6 @@ class GSDCostObject implements \JsonSerializable
|
||||||
return $this->createdAt ?? new \DateTimeImmutable();
|
return $this->createdAt ?? new \DateTimeImmutable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set description
|
|
||||||
*
|
|
||||||
* @param string $description Description
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function setDescription(string $description) : void
|
|
||||||
{
|
|
||||||
$this->description = $description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get description
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getDescription() : string
|
|
||||||
{
|
|
||||||
return $this->description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set cost object
|
* Set cost object
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user