| @@ -189,7 +189,7 @@ | ||
| 189 | 189 | * | 
| 190 | 190 | * @param array $attribute The attribute to persist | 
| 191 | 191 | * | 
| 192 | - * @return void | |
| 192 | + * @return string | |
| 193 | 193 | */ | 
| 194 | 194 | protected function persistAttribute(array $attribute) | 
| 195 | 195 |      { | 
| @@ -164,7 +164,7 @@ | ||
| 164 | 164 | * | 
| 165 | 165 | * @param array $attributeOption The attribute option to persist | 
| 166 | 166 | * | 
| 167 | - * @return void | |
| 167 | + * @return string | |
| 168 | 168 | */ | 
| 169 | 169 | protected function persistAttributeOption(array $attributeOption) | 
| 170 | 170 |      { | 
| @@ -203,7 +203,7 @@ | ||
| 203 | 203 | */ | 
| 204 | 204 | public function preLoadAttributeId(array $attribute) | 
| 205 | 205 |      { | 
| 206 | - $this->preLoadedAttributeIds[$attribute[MemberNames::ATTRIBUTE_CODE]]= $attribute[MemberNames::ATTRIBUTE_ID]; | |
| 206 | + $this->preLoadedAttributeIds[$attribute[MemberNames::ATTRIBUTE_CODE]] = $attribute[MemberNames::ATTRIBUTE_ID]; | |
| 207 | 207 | } | 
| 208 | 208 | |
| 209 | 209 | /** | 
| @@ -76,7 +76,7 @@ | ||
| 76 | 76 | unset($keys[array_search(EntityStatus::MEMBER_NAME, $keys, true)]); | 
| 77 | 77 | |
| 78 | 78 | // prepare the SET part of the SQL statement | 
| 79 | -            array_walk($keys, function (&$value, $key) { | |
| 79 | +            array_walk($keys, function(&$value, $key) { | |
| 80 | 80 |                  $value = sprintf('%s=:%s', $value, $value); | 
| 81 | 81 | }); | 
| 82 | 82 | |
| @@ -90,7 +90,7 @@ | ||
| 90 | 90 | /** | 
| 91 | 91 | * Returns the swatch type loader instance. | 
| 92 | 92 | * | 
| 93 | - * @return \\TechDivision\Import\Attribute\Callbacks\SwatchTypeLoaderInterface The swatch type loader instance | |
| 93 | + * @return SwatchTypeLoaderInterface The swatch type loader instance | |
| 94 | 94 | */ | 
| 95 | 95 | protected function getSwatchTypeLoader() | 
| 96 | 96 |      { | 
| @@ -61,7 +61,7 @@ | ||
| 61 | 61 | $artefacts = array(); | 
| 62 | 62 | |
| 63 | 63 | // load the attribute option values for the custom store views | 
| 64 | -        $attributeOptionValues = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_VALUES, array(), function ($value) { | |
| 64 | +        $attributeOptionValues = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_VALUES, array(), function($value) { | |
| 65 | 65 | return $this->explode($value, $this->getMultipleFieldDelimiter()); | 
| 66 | 66 | }); | 
| 67 | 67 | |
| @@ -58,13 +58,13 @@ | ||
| 58 | 58 | $artefacts = array(); | 
| 59 | 59 | |
| 60 | 60 | // load the attribute option values/positions | 
| 61 | -        $attributeOptionValues = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_VALUES, array(), function ($value) { | |
| 61 | +        $attributeOptionValues = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_VALUES, array(), function($value) { | |
| 62 | 62 | return $this->explode($value, $this->getMultipleFieldDelimiter()); | 
| 63 | 63 | }); | 
| 64 | -        $attributeOptionSortOrder = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_SORT_ORDER, array(), function ($value) { | |
| 64 | +        $attributeOptionSortOrder = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_SORT_ORDER, array(), function($value) { | |
| 65 | 65 | return $this->explode($value, $this->getMultipleFieldDelimiter()); | 
| 66 | 66 | }); | 
| 67 | -        $attributeOptionSwatch = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_SWATCH, array(), function ($value) { | |
| 67 | +        $attributeOptionSwatch = $this->getValue(ColumnKeys::ATTRIBUTE_OPTION_SWATCH, array(), function($value) { | |
| 68 | 68 | return $this->explode($value, $this->getMultipleValueDelimiter()); | 
| 69 | 69 | }); | 
| 70 | 70 | |
| @@ -18,9 +18,6 @@ | ||
| 18 | 18 | * @link http://www.techdivision.com | 
| 19 | 19 | */ | 
| 20 | 20 | |
| 21 | -use Lurker\Event\FilesystemEvent; | |
| 22 | -use Symfony\Component\Finder\Finder; | |
| 23 | - | |
| 24 | 21 | /** | 
| 25 | 22 | * Defines the available build tasks. | 
| 26 | 23 | * | 
| @@ -57,9 +57,9 @@ discard block | ||
| 57 | 57 |      { | 
| 58 | 58 | // optimize autoloader with custom path | 
| 59 | 59 | return $this->taskComposerInstall() | 
| 60 | - ->preferDist() | |
| 61 | - ->optimizeAutoloader() | |
| 62 | - ->run(); | |
| 60 | + ->preferDist() | |
| 61 | + ->optimizeAutoloader() | |
| 62 | + ->run(); | |
| 63 | 63 | } | 
| 64 | 64 | |
| 65 | 65 | /** | 
| @@ -71,9 +71,9 @@ discard block | ||
| 71 | 71 |      { | 
| 72 | 72 | // optimize autoloader with custom path | 
| 73 | 73 | return $this->taskComposerUpdate() | 
| 74 | - ->preferDist() | |
| 75 | - ->optimizeAutoloader() | |
| 76 | - ->run(); | |
| 74 | + ->preferDist() | |
| 75 | + ->optimizeAutoloader() | |
| 76 | + ->run(); | |
| 77 | 77 | } | 
| 78 | 78 | |
| 79 | 79 | /** | 
| @@ -94,10 +94,10 @@ discard block | ||
| 94 | 94 | public function prepare() | 
| 95 | 95 |      { | 
| 96 | 96 | return $this->taskFileSystemStack() | 
| 97 | - ->mkdir($this->properties['dist.dir']) | |
| 98 | - ->mkdir($this->properties['target.dir']) | |
| 99 | -             ->mkdir(sprintf('%s/reports', $this->properties['target.dir'])) | |
| 100 | - ->run(); | |
| 97 | + ->mkdir($this->properties['dist.dir']) | |
| 98 | + ->mkdir($this->properties['target.dir']) | |
| 99 | +                ->mkdir(sprintf('%s/reports', $this->properties['target.dir'])) | |
| 100 | + ->run(); | |
| 101 | 101 | } | 
| 102 | 102 | |
| 103 | 103 | /** | 
| @@ -167,8 +167,8 @@ discard block | ||
| 167 | 167 | |
| 168 | 168 | // run PHPUnit | 
| 169 | 169 |          return $this->taskPHPUnit(sprintf('%s/bin/phpunit', $this->properties['vendor.dir'])) | 
| 170 | -             ->configFile('phpunit.xml') | |
| 171 | - ->run(); | |
| 170 | +                ->configFile('phpunit.xml') | |
| 171 | + ->run(); | |
| 172 | 172 | } | 
| 173 | 173 | |
| 174 | 174 | /** | 
| @@ -57,14 +57,14 @@ | ||
| 57 | 57 | |
| 58 | 58 | // add debug log entry | 
| 59 | 59 | $this->getSubject() | 
| 60 | - ->getSystemLogger() | |
| 61 | - ->debug( | |
| 62 | - sprintf( | |
| 63 | - 'Successfully copied image %s for swatch with id %s', | |
| 64 | - $imagePath, | |
| 65 | - $attributeOptionSwatch[MemberNames::SWATCH_ID] | |
| 66 | - ) | |
| 67 | - ); | |
| 60 | + ->getSystemLogger() | |
| 61 | + ->debug( | |
| 62 | + sprintf( | |
| 63 | + 'Successfully copied image %s for swatch with id %s', | |
| 64 | + $imagePath, | |
| 65 | + $attributeOptionSwatch[MemberNames::SWATCH_ID] | |
| 66 | + ) | |
| 67 | + ); | |
| 68 | 68 | } | 
| 69 | 69 | } | 
| 70 | 70 | } | 
| @@ -47,7 +47,7 @@ | ||
| 47 | 47 | )); | 
| 48 | 48 | |
| 49 | 49 | // skip this step for color swatches and text swatches | 
| 50 | -        if (isset($attributeOptionSwatch[MemberNames::TYPE]) &&  $attributeOptionSwatch[MemberNames::TYPE] === SwatchTypes::IMAGE) { | |
| 50 | +        if (isset($attributeOptionSwatch[MemberNames::TYPE]) && $attributeOptionSwatch[MemberNames::TYPE] === SwatchTypes::IMAGE) { | |
| 51 | 51 | // upload the file to the configured directory | 
| 52 | 52 | $imagePath = $this->getSubject()->uploadFile($attributeOptionSwatch[MemberNames::VALUE]); | 
| 53 | 53 | |