@@ -59,9 +59,9 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | // optimize autoloader with custom path |
| 61 | 61 | $this->taskComposerInstall() |
| 62 | - ->preferDist() |
|
| 63 | - ->optimizeAutoloader() |
|
| 64 | - ->run(); |
|
| 62 | + ->preferDist() |
|
| 63 | + ->optimizeAutoloader() |
|
| 64 | + ->run(); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -73,9 +73,9 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | // optimize autoloader with custom path |
| 75 | 75 | $this->taskComposerUpdate() |
| 76 | - ->preferDist() |
|
| 77 | - ->optimizeAutoloader() |
|
| 78 | - ->run(); |
|
| 76 | + ->preferDist() |
|
| 77 | + ->optimizeAutoloader() |
|
| 78 | + ->run(); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | public function prepare() |
| 97 | 97 | { |
| 98 | 98 | $this->taskFileSystemStack() |
| 99 | - ->mkdir($this->properties['dist.dir']) |
|
| 100 | - ->mkdir($this->properties['target.dir']) |
|
| 101 | - ->mkdir(sprintf('%s/reports', $this->properties['target.dir'])) |
|
| 102 | - ->run(); |
|
| 99 | + ->mkdir($this->properties['dist.dir']) |
|
| 100 | + ->mkdir($this->properties['target.dir']) |
|
| 101 | + ->mkdir(sprintf('%s/reports', $this->properties['target.dir'])) |
|
| 102 | + ->run(); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -169,8 +169,8 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | // run PHPUnit |
| 171 | 171 | $this->taskPHPUnit(sprintf('%s/bin/phpunit', $this->properties['vendor.dir'])) |
| 172 | - ->configFile('phpunit.xml') |
|
| 173 | - ->run(); |
|
| 172 | + ->configFile('phpunit.xml') |
|
| 173 | + ->run(); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
@@ -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 | |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | // mock the attribute bunch processor |
| 64 | 64 | $this->mockBunchProcessor = $this->getMockBuilder('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface') |
| 65 | - ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 66 | - ->getMock(); |
|
| 65 | + ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 66 | + ->getMock(); |
|
| 67 | 67 | |
| 68 | 68 | // the observer instance we want to test |
| 69 | 69 | $this->observer = new CatalogAttributeObserver($this->mockBunchProcessor); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | array(ColumnKeys::IS_FILTERABLE_IN_GRID), |
| 117 | 117 | array(ColumnKeys::SEARCH_WEIGHT), |
| 118 | 118 | array(ColumnKeys::ADDITIONAL_DATA) |
| 119 | - ) |
|
| 119 | + ) |
|
| 120 | 120 | ->willReturnOnConsecutiveCalls( |
| 121 | 121 | true, |
| 122 | 122 | false, |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | // mock the method that persists the entity |
| 165 | 165 | $this->mockBunchProcessor->expects($this->once()) |
| 166 | - ->method('persistCatalogAttribute') |
|
| 167 | - ->with($expectedEntity) |
|
| 168 | - ->willReturn(null); |
|
| 166 | + ->method('persistCatalogAttribute') |
|
| 167 | + ->with($expectedEntity) |
|
| 168 | + ->willReturn(null); |
|
| 169 | 169 | |
| 170 | 170 | // invoke the handle method |
| 171 | 171 | $this->assertSame($row, $this->observer->handle($mockSubject)); |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | // mock the attribute bunch processor |
| 64 | 64 | $this->mockBunchProcessor = $this->getMockBuilder('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface') |
| 65 | - ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 66 | - ->getMock(); |
|
| 65 | + ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 66 | + ->getMock(); |
|
| 67 | 67 | |
| 68 | 68 | // the observer instance we want to test |
| 69 | 69 | $this->observer = new CatalogAttributeUpdateObserver($this->mockBunchProcessor); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | array(ColumnKeys::IS_FILTERABLE_IN_GRID), |
| 117 | 117 | array(ColumnKeys::SEARCH_WEIGHT), |
| 118 | 118 | array(ColumnKeys::ADDITIONAL_DATA) |
| 119 | - ) |
|
| 119 | + ) |
|
| 120 | 120 | ->willReturnOnConsecutiveCalls( |
| 121 | 121 | true, |
| 122 | 122 | false, |
@@ -189,14 +189,14 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | // mock the method that loads the existing entity |
| 191 | 191 | $this->mockBunchProcessor->expects($this->once()) |
| 192 | - ->method('loadCatalogAttribute') |
|
| 193 | - ->with($lastAttributeId) |
|
| 194 | - ->willReturn($existingEntity); |
|
| 192 | + ->method('loadCatalogAttribute') |
|
| 193 | + ->with($lastAttributeId) |
|
| 194 | + ->willReturn($existingEntity); |
|
| 195 | 195 | // mock the method that persists the entity |
| 196 | 196 | $this->mockBunchProcessor->expects($this->once()) |
| 197 | - ->method('persistCatalogAttribute') |
|
| 198 | - ->with($expectedEntity) |
|
| 199 | - ->willReturn(null); |
|
| 197 | + ->method('persistCatalogAttribute') |
|
| 198 | + ->with($expectedEntity) |
|
| 199 | + ->willReturn(null); |
|
| 200 | 200 | |
| 201 | 201 | // invoke the handle method |
| 202 | 202 | $this->assertSame($row, $this->observer->handle($mockSubject)); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | array(ColumnKeys::ADDITIONAL_DATA), |
| 310 | 310 | array(ColumnKeys::ATTRIBUTE_OPTION_VALUES), |
| 311 | 311 | array(ColumnKeys::ATTRIBUTE_OPTION_SWATCH) |
| 312 | - ) |
|
| 312 | + ) |
|
| 313 | 313 | ->willReturnOnConsecutiveCalls( |
| 314 | 314 | 0, |
| 315 | 315 | 1, |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | 23, |
| 360 | 360 | 7, |
| 361 | 361 | 8 |
| 362 | - ); |
|
| 362 | + ); |
|
| 363 | 363 | $mockSubject->expects($this->once()) |
| 364 | 364 | ->method('hasBeenProcessed') |
| 365 | 365 | ->with($attributeCode) |
@@ -444,14 +444,14 @@ discard block |
||
| 444 | 444 | |
| 445 | 445 | // mock the method that loads the existing entity |
| 446 | 446 | $this->mockBunchProcessor->expects($this->once()) |
| 447 | - ->method('loadCatalogAttribute') |
|
| 448 | - ->with($lastAttributeId) |
|
| 449 | - ->willReturn($existingEntity); |
|
| 447 | + ->method('loadCatalogAttribute') |
|
| 448 | + ->with($lastAttributeId) |
|
| 449 | + ->willReturn($existingEntity); |
|
| 450 | 450 | // mock the method that persists the entity |
| 451 | 451 | $this->mockBunchProcessor->expects($this->once()) |
| 452 | - ->method('persistCatalogAttribute') |
|
| 453 | - ->with($expectedEntity) |
|
| 454 | - ->willReturn(null); |
|
| 452 | + ->method('persistCatalogAttribute') |
|
| 453 | + ->with($expectedEntity) |
|
| 454 | + ->willReturn(null); |
|
| 455 | 455 | |
| 456 | 456 | // invoke the handle method |
| 457 | 457 | $this->assertSame($row, $this->observer->handle($mockSubject)); |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * Commits a transaction, returning the database connection to autocommit mode until the next call to |
| 247 | 247 | * ProductProcessor::beginTransaction() starts a new transaction. |
| 248 | 248 | * |
| 249 | - * @return boolean Returns TRUE on success or FALSE on failure |
|
| 249 | + * @return boolean|null Returns TRUE on success or FALSE on failure |
|
| 250 | 250 | * @link http://php.net/manual/en/pdo.commit.php |
| 251 | 251 | */ |
| 252 | 252 | public function commit() |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | /** |
| 310 | 310 | * Return's the attribute label repository instance. |
| 311 | 311 | * |
| 312 | - * @return \TechDivision\Import\Attribute\Repositories\AttributeRepositoryInterface The attribute label repository instance |
|
| 312 | + * @return AttributeLabelRepositoryInterface The attribute label repository instance |
|
| 313 | 313 | */ |
| 314 | 314 | public function getAttributeLabelRepository() |
| 315 | 315 | { |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | /** |
| 464 | 464 | * Return's the attribute label action instance. |
| 465 | 465 | * |
| 466 | - * @return \TechDivision\Import\Attribute\Actions\AttributeActionInterface The attribute label action instance |
|
| 466 | + * @return AttributeLabelActionInterface The attribute label action instance |
|
| 467 | 467 | */ |
| 468 | 468 | public function getAttributeLabelAction() |
| 469 | 469 | { |