diff --git a/retailcrm/lib/RetailcrmIcml.php b/retailcrm/lib/RetailcrmIcml.php index ee1b207..57a6222 100755 --- a/retailcrm/lib/RetailcrmIcml.php +++ b/retailcrm/lib/RetailcrmIcml.php @@ -259,7 +259,7 @@ class RetailcrmIcml if ( empty($feature['id_feature']) || empty($feature['name']) - || $feature['value'] === null + || null === $feature['value'] ) { continue; } @@ -272,7 +272,7 @@ class RetailcrmIcml $this->writer->startElement('param'); $this->writer->writeAttribute('code', 'feature_' . $feature['id_feature'] . '_' . $numberCode); - $this->writer->writeAttribute('name' , $feature['name']); + $this->writer->writeAttribute('name', $feature['name']); $this->writer->text($feature['value']); $this->writer->endElement(); diff --git a/tests/lib/RetailcrmCatalogTest.php b/tests/lib/RetailcrmCatalogTest.php index 7e56e1c..e990a6f 100644 --- a/tests/lib/RetailcrmCatalogTest.php +++ b/tests/lib/RetailcrmCatalogTest.php @@ -139,7 +139,8 @@ class RetailcrmCatalogTest extends RetailcrmTestCase $this->assertNotFalse($xml); } - private function getFeaturesData() { + private function getFeaturesData() + { return [ [ 'id_feature' => 1, @@ -165,7 +166,7 @@ class RetailcrmCatalogTest extends RetailcrmTestCase 'id_feature' => 2, 'name' => 'test', 'value' => 'value2', - ] + ], ]; } }