phpstan fixes

This commit is contained in:
Dennis Eichhorn 2020-11-27 22:56:15 +01:00
parent 9295262646
commit 300d0b94f2
3 changed files with 10 additions and 62 deletions

View File

@ -279,7 +279,7 @@ final class Importer extends ImporterAbstract
$addr->postal = \trim($customer->addr->zip, ",. \t");
$addr->city = \trim($customer->addr->city, ",. \t");
$addr->setCountry(ISO3166TwoEnum::_DEU);
$obj->setMainAddress($addr);
$obj->mainAddress = $addr;
if (!empty(\trim($customer->addr->phone, ",. \t"))) {
$phone = new ContactElement();
@ -358,7 +358,7 @@ final class Importer extends ImporterAbstract
$addr->postal = \trim($supplier->addr->zip, ",. \t");
$addr->city = \trim($supplier->addr->city, ",. \t");
$addr->setCountry(ISO3166TwoEnum::_DEU);
$obj->setMainAddress($addr);
$obj->mainAddress = $addr;
if (!empty(\trim($supplier->addr->phone, ",. \t"))) {
$phone = new ContactElement();
@ -488,26 +488,26 @@ final class Importer extends ImporterAbstract
// German Language
$obj->addL11n(new ItemL11n(
$itemL11nType['name1']->getId(),
$itemL11nType['name1'],
\trim($article->name1, " ,\t"),
ISO639x1Enum::_DE
));
$obj->addL11n(new ItemL11n(
$itemL11nType['name2']->getId(),
$itemL11nType['name2'],
\trim($article->name2, " ,\t"),
ISO639x1Enum::_DE
));
$obj->addL11n(new ItemL11n(
$itemL11nType['info']->getId(),
$itemL11nType['info'],
\trim($article->infoSales, " ,\t"),
ISO639x1Enum::_DE
));
// English Language
$obj->addL11n(new ItemL11n(
$itemL11nType['name1']->getId(),
$itemL11nType['name1'],
empty($t = \trim($article->name1Eng, " ,\t"))
? \trim($article->name1, " ,\t")
: $t,
@ -515,7 +515,7 @@ final class Importer extends ImporterAbstract
));
$obj->addL11n(new ItemL11n(
$itemL11nType['name2']->getId(),
$itemL11nType['name2'],
empty($t = \trim($article->name2Eng, " ,\t"))
? \trim($article->name2, " ,\t")
: $t,
@ -626,7 +626,7 @@ final class Importer extends ImporterAbstract
{
$itemAttrValue = [];
return $itemAttrType;
return $itemAttrValue;
}
/**

View File

@ -54,7 +54,7 @@ class GSDCostCenter implements \JsonSerializable
* @var string
* @since 1.0.0
*/
protected string $description = '';
public string $description = '';
/**
* Cost center.
@ -84,32 +84,6 @@ class GSDCostCenter implements \JsonSerializable
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
*

View File

@ -54,7 +54,7 @@ class GSDCostObject implements \JsonSerializable
* @var string
* @since 1.0.0
*/
protected string $description = '';
public string $description = '';
/**
* Cost object.
@ -84,32 +84,6 @@ class GSDCostObject implements \JsonSerializable
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
*