| @@ -142,7 +142,7 @@ | ||
| 142 | 142 | /** | 
| 143 | 143 | * Return's the configured processor instance. | 
| 144 | 144 | * | 
| 145 | - * @return object The processor instance | |
| 145 | + * @return CategoryProcessorInterface The processor instance | |
| 146 | 146 | * @throws \Exception Is thrown, if no processor factory has been configured | 
| 147 | 147 | */ | 
| 148 | 148 | protected function getProcessor() | 
| @@ -116,7 +116,7 @@ | ||
| 116 | 116 | * | 
| 117 | 117 | * @param string $attributeCode The attribute code | 
| 118 | 118 | * | 
| 119 | - * @return array The array with the EAV attribute | |
| 119 | + * @return integer The array with the EAV attribute | |
| 120 | 120 | * @throws \Exception Is thrown if the attribute with the passed code is not available | 
| 121 | 121 | */ | 
| 122 | 122 | protected function getEavAttributeByAttributeCode($attributeCode) | 
| @@ -197,7 +197,7 @@ | ||
| 197 | 197 |      { | 
| 198 | 198 | |
| 199 | 199 | // explode the path of the root category | 
| 200 | -        list ($rootCategoryPath, ) = explode('/', $path); | |
| 200 | +        list ($rootCategoryPath,) = explode('/', $path); | |
| 201 | 201 | |
| 202 | 202 | // query whether or not a root category with the given path exists | 
| 203 | 203 |          if ($rootCategory = $this->getCategoryByPath($rootCategoryPath)) { | 
| @@ -303,7 +303,7 @@ | ||
| 303 | 303 | |
| 304 | 304 | // load the global data we've prepared initially | 
| 305 | 305 | $this->taxClasses = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::TAX_CLASSES]; | 
| 306 | - $this->storeWebsites = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::STORE_WEBSITES]; | |
| 306 | + $this->storeWebsites = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::STORE_WEBSITES]; | |
| 307 | 307 | |
| 308 | 308 | // load the categories for the admin store view from the global data | 
| 309 | 309 | $this->categories = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::CATEGORIES][StoreViewCodes::ADMIN]; | 
| @@ -18,10 +18,6 @@ | ||
| 18 | 18 | * @link http://www.techdivision.com | 
| 19 | 19 | */ | 
| 20 | 20 | |
| 21 | -use Lurker\Event\FilesystemEvent; | |
| 22 | - | |
| 23 | -use Symfony\Component\Finder\Finder; | |
| 24 | - | |
| 25 | 21 | /** | 
| 26 | 22 | * Defines the available build tasks. | 
| 27 | 23 | * | 
| @@ -328,7 +328,7 @@ discard block | ||
| 328 | 328 | * Commits a transaction, returning the database connection to autocommit mode until the next call to | 
| 329 | 329 | * ProductProcessor::beginTransaction() starts a new transaction. | 
| 330 | 330 | * | 
| 331 | - * @return boolean Returns TRUE on success or FALSE on failure | |
| 331 | + * @return boolean|null Returns TRUE on success or FALSE on failure | |
| 332 | 332 | * @link http://php.net/manual/en/pdo.commit.php | 
| 333 | 333 | */ | 
| 334 | 334 | public function commit() | 
| @@ -887,7 +887,7 @@ discard block | ||
| 887 | 887 | * @param string $entityTypeCode The entity type code to return the raw entity for | 
| 888 | 888 | * @param array $data An array with data that will be used to initialize the raw entity with | 
| 889 | 889 | * | 
| 890 | - * @return array The initialized entity | |
| 890 | + * @return \ArrayAccess The initialized entity | |
| 891 | 891 | */ | 
| 892 | 892 | public function loadRawEntity($entityTypeCode, array $data = array()) | 
| 893 | 893 |      { | 
| @@ -86,8 +86,8 @@ | ||
| 86 | 86 | // load the columns from the metadata | 
| 87 | 87 | $columns = array_filter( | 
| 88 | 88 | $columnMetadataLoader->load($entityType), | 
| 89 | -                function ($value) { | |
| 90 | - return $value['Key'] !== 'PRI' && $value['Null'] === 'NO' ; | |
| 89 | +                function($value) { | |
| 90 | + return $value['Key'] !== 'PRI' && $value['Null'] === 'NO'; | |
| 91 | 91 | } | 
| 92 | 92 | ); | 
| 93 | 93 | // initialize the raw entities and their default values, if available | 
| @@ -164,11 +164,9 @@ discard block | ||
| 164 | 164 | |
| 165 | 165 | // sort the main rows by the path, store_view_code and position | 
| 166 | 166 | // ATTENTION: we use uasort, because we NEED to preserve the keys | 
| 167 | -            uasort($this->mainRows, function ($a, $b) { | |
| 167 | +            uasort($this->mainRows, function($a, $b) { | |
| 168 | 168 | return | 
| 169 | - strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?: | |
| 170 | - strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]) ?: | |
| 171 | - strcmp($a[ColumnKeys::POSITION], $b[ColumnKeys::POSITION]); | |
| 169 | + strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?: strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]) ?: strcmp($a[ColumnKeys::POSITION], $b[ColumnKeys::POSITION]); | |
| 172 | 170 | }); | 
| 173 | 171 | |
| 174 | 172 | // update the position of the categories and the categories on the same level | 
| @@ -181,10 +179,9 @@ discard block | ||
| 181 | 179 | $this->artefacts = array_merge(array_values($this->artefacts), $this->storeViewRows); | 
| 182 | 180 | |
| 183 | 181 | // sort the artefacts again, because we want to export them in the expected order | 
| 184 | -            usort($this->artefacts, function ($a, $b) { | |
| 182 | +            usort($this->artefacts, function($a, $b) { | |
| 185 | 183 | return | 
| 186 | - strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?: | |
| 187 | - strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]); | |
| 184 | + strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?: strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]); | |
| 188 | 185 | }); | 
| 189 | 186 | |
| 190 | 187 | // replace the artefacts to be exported later | 
| @@ -284,7 +281,7 @@ discard block | ||
| 284 | 281 | } | 
| 285 | 282 | |
| 286 | 283 | // sor the categories by their position and KEEP the keys | 
| 287 | -        uasort($categoriesOnSameLevel, function ($a, $b) { | |
| 284 | +        uasort($categoriesOnSameLevel, function($a, $b) { | |
| 288 | 285 | // return 0 when the position is equal (should never happen) | 
| 289 | 286 |              if ($a[MemberNames::POSITION] == $b[MemberNames::POSITION]) { | 
| 290 | 287 | return 0; | 
| @@ -432,7 +429,7 @@ discard block | ||
| 432 | 429 | // iterate over the IDs | 
| 433 | 430 |          foreach ($ids as $id) { | 
| 434 | 431 | // load the category with the actual ID | 
| 435 | -            $existingCategories = array_filter($this->existingCategories, function ($existingCategory) use ($id) { | |
| 432 | +            $existingCategories = array_filter($this->existingCategories, function($existingCategory) use ($id) { | |
| 436 | 433 | return (int) $existingCategory[MemberNames::ENTITY_ID] === (int) $id; | 
| 437 | 434 | }); | 
| 438 | 435 | |
| @@ -68,7 +68,7 @@ | ||
| 68 | 68 | $enclosure = $subject->getConfiguration()->getEnclosure(); | 
| 69 | 69 | |
| 70 | 70 | // filter the category elements and upgrade them for expoort purposes | 
| 71 | -        array_walk($elements, function (&$element) use ($enclosure, $delimiter) { | |
| 71 | +        array_walk($elements, function(&$element) use ($enclosure, $delimiter) { | |
| 72 | 72 | // add one quote to each quote | 
| 73 | 73 | $element = str_replace($enclosure, str_pad($enclosure, 2, $enclosure), $element); | 
| 74 | 74 | // if the element contains the delimiter char OR the enclosur char, surround it with additional quotes |