| Total Complexity | 45 |
| Total Lines | 653 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like CustomerAddressBunchProcessor often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use CustomerAddressBunchProcessor, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 45 | class CustomerAddressBunchProcessor implements CustomerAddressBunchProcessorInterface |
||
| 46 | { |
||
| 47 | |||
| 48 | /** |
||
| 49 | * A PDO connection initialized with the values from the Doctrine EntityManager. |
||
| 50 | * |
||
| 51 | * @var \TechDivision\Import\Connection\ConnectionInterface |
||
| 52 | */ |
||
| 53 | protected $connection; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * The repository to access EAV attribute option values. |
||
| 57 | * |
||
| 58 | * @var \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface |
||
| 59 | */ |
||
| 60 | protected $eavAttributeOptionValueRepository; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * The repository to access customer data. |
||
| 64 | * |
||
| 65 | * @var \TechDivision\Import\Customer\Repositories\CustomerRepositoryInterface |
||
| 66 | */ |
||
| 67 | protected $customerRepository; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * The repository to access customer address address data. |
||
| 71 | * |
||
| 72 | * @var \TechDivision\Import\Customer\Address\Repositories\CustomerAddressRepositoryInterface |
||
| 73 | */ |
||
| 74 | protected $customerAddressRepository; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * The repository to access EAV attributes. |
||
| 78 | * |
||
| 79 | * @var \TechDivision\Import\Repositories\EavAttributeRepositoryInterface |
||
| 80 | */ |
||
| 81 | protected $eavAttributeRepository; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * The action for customer address CRUD methods. |
||
| 85 | * |
||
| 86 | * @var \TechDivision\Import\Customer\Address\Actions\CustomerAddressActionInterface |
||
| 87 | */ |
||
| 88 | protected $customerAddressAction; |
||
| 89 | |||
| 90 | /** |
||
| 91 | * The action for customer address varchar attribute CRUD methods. |
||
| 92 | * |
||
| 93 | * @var \TechDivision\Import\Customer\Address\Actions\CustomerAddressVarcharActionInterface |
||
| 94 | */ |
||
| 95 | protected $customerAddressVarcharAction; |
||
| 96 | |||
| 97 | /** |
||
| 98 | * The action for customer address text attribute CRUD methods. |
||
| 99 | * |
||
| 100 | * @var \TechDivision\Import\Customer\Address\Actions\CustomerAddressTextActionInterface |
||
| 101 | */ |
||
| 102 | protected $customerAddressTextAction; |
||
| 103 | |||
| 104 | /** |
||
| 105 | * The action for customer address int attribute CRUD methods. |
||
| 106 | * |
||
| 107 | * @var \TechDivision\Import\Customer\Address\Actions\CustomerAddressIntActionInterface |
||
| 108 | */ |
||
| 109 | protected $customerAddressIntAction; |
||
| 110 | |||
| 111 | /** |
||
| 112 | * The action for customer address decimal attribute CRUD methods. |
||
| 113 | * |
||
| 114 | * @var \TechDivision\Import\Customer\Address\Actions\CustomerAddressDecimalActionInterface |
||
| 115 | */ |
||
| 116 | protected $customerAddressDecimalAction; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * The action for customer address datetime attribute CRUD methods. |
||
| 120 | * |
||
| 121 | * @var \TechDivision\Import\Customer\Address\Actions\CustomerAddressDatetimeActionInterface |
||
| 122 | */ |
||
| 123 | protected $customerAddressDatetimeAction; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * The assembler to load the customer address attributes with. |
||
| 127 | * |
||
| 128 | * @var \TechDivision\Import\Customer\Address\Assemblers\CustomerAddressAttributeAssemblerInterface |
||
| 129 | */ |
||
| 130 | protected $customerAddressAttributeAssembler; |
||
| 131 | |||
| 132 | /** |
||
| 133 | * Initialize the processor with the necessary assembler and repository instances. |
||
| 134 | * |
||
| 135 | * @param \TechDivision\Import\Connection\ConnectionInterface connection The connection to use |
||
|
|
|||
| 136 | * @param \TechDivision\Import\Customer\Address\Assemblers\CustomerAddressAttributeAssemblerInterface $customerAddressAttributeAssembler The customer address attribute assembler to use |
||
| 137 | * @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The EAV attribute option value repository to use |
||
| 138 | * @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The EAV attribute repository to use |
||
| 139 | * @param \TechDivision\Import\Customer\Repositories\CustomerRepositoryInterface $customerRepository The customer repository to use |
||
| 140 | * @param \TechDivision\Import\Customer\Address\Repositories\CustomerAddressRepositoryInterface $customerAddressRepository The customer address repository to use |
||
| 141 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressActionInterface $customerAddressAction The customer address action to use |
||
| 142 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressDatetimeActionInterface $customerAddressDatetimeAction The customer address datetime action to use |
||
| 143 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressDecimalActionInterface $customerAddressDecimalAction The customer address decimal action to use |
||
| 144 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressIntActionInterface $customerAddressIntAction The customer address integer action to use |
||
| 145 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressTextActionInterface $customerAddressTextAction The customer address text action to use |
||
| 146 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressVarcharActionInterface $customerAddressVarcharAction The customer address varchar action to use |
||
| 147 | */ |
||
| 148 | public function __construct( |
||
| 149 | ConnectionInterface $connection, |
||
| 150 | CustomerAddressAttributeAssemblerInterface $customerAddressAttributeAssembler, |
||
| 151 | EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository, |
||
| 152 | EavAttributeRepositoryInterface $eavAttributeRepository, |
||
| 153 | CustomerRepositoryInterface $customerRepository, |
||
| 154 | CustomerAddressRepositoryInterface $customerAddressRepository, |
||
| 155 | CustomerAddressActionInterface $customerAddressAction, |
||
| 156 | CustomerAddressDatetimeActionInterface $customerAddressDatetimeAction, |
||
| 157 | CustomerAddressDecimalActionInterface $customerAddressDecimalAction, |
||
| 158 | CustomerAddressIntActionInterface $customerAddressIntAction, |
||
| 159 | CustomerAddressTextActionInterface $customerAddressTextAction, |
||
| 160 | CustomerAddressVarcharActionInterface $customerAddressVarcharAction |
||
| 161 | ) { |
||
| 162 | $this->setConnection($connection); |
||
| 163 | $this->setCustomerAddressAttributeAssembler($customerAddressAttributeAssembler); |
||
| 164 | $this->setEavAttributeOptionValueRepository($eavAttributeOptionValueRepository); |
||
| 165 | $this->setEavAttributeRepository($eavAttributeRepository); |
||
| 166 | $this->setCustomerRepository($customerRepository); |
||
| 167 | $this->setCustomerAddressRepository($customerAddressRepository); |
||
| 168 | $this->setCustomerAddressAction($customerAddressAction); |
||
| 169 | $this->setCustomerAddressDatetimeAction($customerAddressDatetimeAction); |
||
| 170 | $this->setCustomerAddressDecimalAction($customerAddressDecimalAction); |
||
| 171 | $this->setCustomerAddressIntAction($customerAddressIntAction); |
||
| 172 | $this->setCustomerAddressTextAction($customerAddressTextAction); |
||
| 173 | $this->setCustomerAddressVarcharAction($customerAddressVarcharAction); |
||
| 174 | } |
||
| 175 | |||
| 176 | /** |
||
| 177 | * Set's the passed connection. |
||
| 178 | * |
||
| 179 | * @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to set |
||
| 180 | * |
||
| 181 | * @return void |
||
| 182 | */ |
||
| 183 | public function setConnection(ConnectionInterface $connection) |
||
| 184 | { |
||
| 185 | $this->connection = $connection; |
||
| 186 | } |
||
| 187 | |||
| 188 | /** |
||
| 189 | * Return's the connection. |
||
| 190 | * |
||
| 191 | * @return \TechDivision\Import\Connection\ConnectionInterface The connection instance |
||
| 192 | */ |
||
| 193 | public function getConnection() |
||
| 194 | { |
||
| 195 | return $this->connection; |
||
| 196 | } |
||
| 197 | |||
| 198 | /** |
||
| 199 | * Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
||
| 200 | * object instance are not committed until you end the transaction by calling CustomerProcessor::commit(). |
||
| 201 | * Calling CustomerProcessor::rollBack() will roll back all changes to the database and return the connection |
||
| 202 | * to autocommit mode. |
||
| 203 | * |
||
| 204 | * @return boolean Returns TRUE on success or FALSE on failure |
||
| 205 | * @link http://php.net/manual/en/pdo.begintransaction.php |
||
| 206 | */ |
||
| 207 | public function beginTransaction() |
||
| 208 | { |
||
| 209 | return $this->connection->beginTransaction(); |
||
| 210 | } |
||
| 211 | |||
| 212 | /** |
||
| 213 | * Commits a transaction, returning the database connection to autocommit mode until the next call to |
||
| 214 | * CustomerProcessor::beginTransaction() starts a new transaction. |
||
| 215 | * |
||
| 216 | * @return boolean Returns TRUE on success or FALSE on failure |
||
| 217 | * @link http://php.net/manual/en/pdo.commit.php |
||
| 218 | */ |
||
| 219 | public function commit() |
||
| 220 | { |
||
| 221 | return $this->connection->commit(); |
||
| 222 | } |
||
| 223 | |||
| 224 | /** |
||
| 225 | * Rolls back the current transaction, as initiated by CustomerProcessor::beginTransaction(). |
||
| 226 | * |
||
| 227 | * If the database was set to autocommit mode, this function will restore autocommit mode after it has |
||
| 228 | * rolled back the transaction. |
||
| 229 | * |
||
| 230 | * Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
||
| 231 | * language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
||
| 232 | * COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
||
| 233 | * |
||
| 234 | * @return boolean Returns TRUE on success or FALSE on failure |
||
| 235 | * @link http://php.net/manual/en/pdo.rollback.php |
||
| 236 | */ |
||
| 237 | public function rollBack() |
||
| 238 | { |
||
| 239 | return $this->connection->rollBack(); |
||
| 240 | } |
||
| 241 | |||
| 242 | /** |
||
| 243 | * Set's the repository to load the customers with. |
||
| 244 | * |
||
| 245 | * @param \TechDivision\Import\Customer\Repositories\CustomerRepositoryInterface $customerRepository The repository instance |
||
| 246 | * |
||
| 247 | * @return void |
||
| 248 | */ |
||
| 249 | public function setCustomerRepository(CustomerRepositoryInterface $customerRepository) |
||
| 250 | { |
||
| 251 | $this->customerRepository = $customerRepository; |
||
| 252 | } |
||
| 253 | |||
| 254 | /** |
||
| 255 | * Return's the repository to load the customers with. |
||
| 256 | * |
||
| 257 | * @return \TechDivision\Import\Customer\Repositories\CustomerRepositoryInterface The repository instance |
||
| 258 | */ |
||
| 259 | public function getCustomerRepository() |
||
| 260 | { |
||
| 261 | return $this->customerRepository; |
||
| 262 | } |
||
| 263 | |||
| 264 | /** |
||
| 265 | * Set's the repository to load the customer addresses with. |
||
| 266 | * |
||
| 267 | * @param \TechDivision\Import\Customer\Address\Repositories\CustomerAddressRepositoryInterface $customerAddressRepository The repository instance |
||
| 268 | * |
||
| 269 | * @return void |
||
| 270 | */ |
||
| 271 | public function setCustomerAddressRepository(CustomerAddressRepositoryInterface $customerAddressRepository) |
||
| 272 | { |
||
| 273 | $this->customerAddressRepository = $customerAddressRepository; |
||
| 274 | } |
||
| 275 | |||
| 276 | /** |
||
| 277 | * Return's the repository to load the customer addresses with. |
||
| 278 | * |
||
| 279 | * @return \TechDivision\Import\Customer\Address\Repositories\CustomerAddressRepositoryInterface The repository instance |
||
| 280 | */ |
||
| 281 | public function getCustomerAddressRepository() |
||
| 282 | { |
||
| 283 | return $this->customerAddressRepository; |
||
| 284 | } |
||
| 285 | |||
| 286 | /** |
||
| 287 | * Set's the action with the customer address CRUD methods. |
||
| 288 | * |
||
| 289 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressActionInterface $customerAddressAction The action with the customer CRUD methods |
||
| 290 | * |
||
| 291 | * @return void |
||
| 292 | */ |
||
| 293 | public function setCustomerAddressAction(CustomerAddressActionInterface $customerAddressAction) |
||
| 294 | { |
||
| 295 | $this->customerAddressAction = $customerAddressAction; |
||
| 296 | } |
||
| 297 | |||
| 298 | /** |
||
| 299 | * Return's the action with the customer address CRUD methods. |
||
| 300 | * |
||
| 301 | * @return \TechDivision\Import\Customer\Address\Actions\CustomerAddressActionInterface The action instance |
||
| 302 | */ |
||
| 303 | public function getCustomerAddressAction() |
||
| 304 | { |
||
| 305 | return $this->customerAddressAction; |
||
| 306 | } |
||
| 307 | |||
| 308 | /** |
||
| 309 | * Set's the action with the customer address varchar attribute CRUD methods. |
||
| 310 | * |
||
| 311 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressVarcharActionInterface $customerAddressVarcharAction The action with the customer varchar attriute CRUD methods |
||
| 312 | * |
||
| 313 | * @return void |
||
| 314 | */ |
||
| 315 | public function setCustomerAddressVarcharAction(CustomerAddressVarcharActionInterface $customerAddressVarcharAction) |
||
| 316 | { |
||
| 317 | $this->customerAddressVarcharAction = $customerAddressVarcharAction; |
||
| 318 | } |
||
| 319 | |||
| 320 | /** |
||
| 321 | * Return's the action with the customer address varchar attribute CRUD methods. |
||
| 322 | * |
||
| 323 | * @return \TechDivision\Import\Customer\Address\Actions\CustomerAddressVarcharActionInterface The action instance |
||
| 324 | */ |
||
| 325 | public function getCustomerAddressVarcharAction() |
||
| 326 | { |
||
| 327 | return $this->customerAddressVarcharAction; |
||
| 328 | } |
||
| 329 | |||
| 330 | /** |
||
| 331 | * Set's the action with the customer address text attribute CRUD methods. |
||
| 332 | * |
||
| 333 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressTextActionInterface $customerAddressTextAction The action with the customer text attriute CRUD methods |
||
| 334 | * |
||
| 335 | * @return void |
||
| 336 | */ |
||
| 337 | public function setCustomerAddressTextAction(CustomerAddressTextActionInterface $customerAddressTextAction) |
||
| 338 | { |
||
| 339 | $this->customerAddressTextAction = $customerAddressTextAction; |
||
| 340 | } |
||
| 341 | |||
| 342 | /** |
||
| 343 | * Return's the action with the customer address text attribute CRUD methods. |
||
| 344 | * |
||
| 345 | * @return \TechDivision\Import\Customer\Address\Actions\CustomerAddressTextActionInterface The action instance |
||
| 346 | */ |
||
| 347 | public function getCustomerAddressTextAction() |
||
| 348 | { |
||
| 349 | return $this->customerAddressTextAction; |
||
| 350 | } |
||
| 351 | |||
| 352 | /** |
||
| 353 | * Set's the action with the customer address int attribute CRUD methods. |
||
| 354 | * |
||
| 355 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressIntActionInterface $customerAddressIntAction The action with the customer int attriute CRUD methods |
||
| 356 | * |
||
| 357 | * @return void |
||
| 358 | */ |
||
| 359 | public function setCustomerAddressIntAction(CustomerAddressIntActionInterface $customerAddressIntAction) |
||
| 360 | { |
||
| 361 | $this->customerAddressIntAction = $customerAddressIntAction; |
||
| 362 | } |
||
| 363 | |||
| 364 | /** |
||
| 365 | * Return's the action with the customer address int attribute CRUD methods. |
||
| 366 | * |
||
| 367 | * @return \TechDivision\Import\Customer\Address\Actions\CustomerAddressIntActionInterface The action instance |
||
| 368 | */ |
||
| 369 | public function getCustomerAddressIntAction() |
||
| 370 | { |
||
| 371 | return $this->customerAddressIntAction; |
||
| 372 | } |
||
| 373 | |||
| 374 | /** |
||
| 375 | * Set's the action with the customer address decimal attribute CRUD methods. |
||
| 376 | * |
||
| 377 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressDecimalActionInterface $customerAddressDecimalAction The action with the customer decimal attriute CRUD methods |
||
| 378 | * |
||
| 379 | * @return void |
||
| 380 | */ |
||
| 381 | public function setCustomerAddressDecimalAction(CustomerAddressDecimalActionInterface $customerAddressDecimalAction) |
||
| 382 | { |
||
| 383 | $this->customerAddressDecimalAction = $customerAddressDecimalAction; |
||
| 384 | } |
||
| 385 | |||
| 386 | /** |
||
| 387 | * Return's the action with the customer address decimal attribute CRUD methods. |
||
| 388 | * |
||
| 389 | * @return \TechDivision\Import\Customer\Address\Actions\CustomerAddressDecimalActionInterface The action instance |
||
| 390 | */ |
||
| 391 | public function getCustomerAddressDecimalAction() |
||
| 392 | { |
||
| 393 | return $this->customerAddressDecimalAction; |
||
| 394 | } |
||
| 395 | |||
| 396 | /** |
||
| 397 | * Set's the action with the customer address datetime attribute CRUD methods. |
||
| 398 | * |
||
| 399 | * @param \TechDivision\Import\Customer\Address\Actions\CustomerAddressDatetimeActionInterface $customerAddressDatetimeAction The action with the customer datetime attriute CRUD methods |
||
| 400 | * |
||
| 401 | * @return void |
||
| 402 | */ |
||
| 403 | public function setCustomerAddressDatetimeAction(CustomerAddressDatetimeActionInterface $customerAddressDatetimeAction) |
||
| 404 | { |
||
| 405 | $this->customerAddressDatetimeAction = $customerAddressDatetimeAction; |
||
| 406 | } |
||
| 407 | |||
| 408 | /** |
||
| 409 | * Return's the action with the customer address datetime attribute CRUD methods. |
||
| 410 | * |
||
| 411 | * @return \TechDivision\Import\Customer\Address\Actions\CustomerAddressDatetimeActionInterface The action instance |
||
| 412 | */ |
||
| 413 | public function getCustomerAddressDatetimeAction() |
||
| 414 | { |
||
| 415 | return $this->customerAddressDatetimeAction; |
||
| 416 | } |
||
| 417 | |||
| 418 | /** |
||
| 419 | * Set's the repository to access EAV attribute option values. |
||
| 420 | * |
||
| 421 | * @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The repository to access EAV attribute option values |
||
| 422 | * |
||
| 423 | * @return void |
||
| 424 | */ |
||
| 425 | public function setEavAttributeOptionValueRepository(EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository) |
||
| 426 | { |
||
| 427 | $this->eavAttributeOptionValueRepository = $eavAttributeOptionValueRepository; |
||
| 428 | } |
||
| 429 | |||
| 430 | /** |
||
| 431 | * Return's the repository to access EAV attribute option values. |
||
| 432 | * |
||
| 433 | * @return \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface The repository instance |
||
| 434 | */ |
||
| 435 | public function getEavAttributeOptionValueRepository() |
||
| 436 | { |
||
| 437 | return $this->eavAttributeOptionValueRepository; |
||
| 438 | } |
||
| 439 | |||
| 440 | /** |
||
| 441 | * Set's the repository to access EAV attributes. |
||
| 442 | * |
||
| 443 | * @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The repository to access EAV attributes |
||
| 444 | * |
||
| 445 | * @return void |
||
| 446 | */ |
||
| 447 | public function setEavAttributeRepository(EavAttributeRepositoryInterface $eavAttributeRepository) |
||
| 448 | { |
||
| 449 | $this->eavAttributeRepository = $eavAttributeRepository; |
||
| 450 | } |
||
| 451 | |||
| 452 | /** |
||
| 453 | * Return's the repository to access EAV attributes. |
||
| 454 | * |
||
| 455 | * @return \TechDivision\Import\Repositories\EavAttributeRepositoryInterface The repository instance |
||
| 456 | */ |
||
| 457 | public function getEavAttributeRepository() |
||
| 458 | { |
||
| 459 | return $this->eavAttributeRepository; |
||
| 460 | } |
||
| 461 | |||
| 462 | /** |
||
| 463 | * Set's the assembler to load the customer address attributes with. |
||
| 464 | * |
||
| 465 | * @param \TechDivision\Import\Customer\Address\Assemblers\CustomerAddressAttributeAssemblerInterface $customerAddressAttributeAssembler The assembler instance |
||
| 466 | * |
||
| 467 | * @return void |
||
| 468 | */ |
||
| 469 | public function setCustomerAddressAttributeAssembler(CustomerAddressAttributeAssemblerInterface $customerAddressAttributeAssembler) |
||
| 470 | { |
||
| 471 | $this->customerAddressAttributeAssembler = $customerAddressAttributeAssembler; |
||
| 472 | } |
||
| 473 | |||
| 474 | /** |
||
| 475 | * Return's the assembler to load the customer address attributes with. |
||
| 476 | * |
||
| 477 | * @return \TechDivision\Import\Customer\Address\Assemblers\CustomerAddressAttributeAssemblerInterface The assembler instance |
||
| 478 | */ |
||
| 479 | public function getCustomerAddressAttributeAssembler() |
||
| 480 | { |
||
| 481 | return $this->customerAddressAttributeAssembler; |
||
| 482 | } |
||
| 483 | |||
| 484 | /** |
||
| 485 | * Return's an array with the available EAV attributes for the passed is user defined flag. |
||
| 486 | * |
||
| 487 | * @param integer $isUserDefined The flag itself |
||
| 488 | * |
||
| 489 | * @return array The array with the EAV attributes matching the passed flag |
||
| 490 | */ |
||
| 491 | public function getEavAttributeByIsUserDefined($isUserDefined = 1) |
||
| 492 | { |
||
| 493 | return $this->getEavAttributeRepository()->findAllByIsUserDefined($isUserDefined); |
||
| 494 | } |
||
| 495 | |||
| 496 | /** |
||
| 497 | * Intializes the existing attributes for the entity with the passed entity ID. |
||
| 498 | * |
||
| 499 | * @param integer $entityId The entity ID of the entity to load the attributes for |
||
| 500 | * |
||
| 501 | * @return array The entity attributes |
||
| 502 | */ |
||
| 503 | public function getCustomerAddressAttributesByEntityId($entityId) |
||
| 504 | { |
||
| 505 | return $this->getCustomerAddressAttributeAssembler()->getCustomerAddressAttributesByEntityId($entityId); |
||
| 506 | } |
||
| 507 | |||
| 508 | /** |
||
| 509 | * Load's and return's the EAV attribute option value with the passed code, store ID and value. |
||
| 510 | * |
||
| 511 | * @param string $attributeCode The code of the EAV attribute option to load |
||
| 512 | * @param integer $storeId The store ID of the attribute option to load |
||
| 513 | * @param string $value The value of the attribute option to load |
||
| 514 | * |
||
| 515 | * @return array The EAV attribute option value |
||
| 516 | */ |
||
| 517 | public function loadEavAttributeOptionValueByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value) |
||
| 518 | { |
||
| 519 | return $this->getEavAttributeOptionValueRepository()->findOneByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value); |
||
| 520 | } |
||
| 521 | |||
| 522 | /** |
||
| 523 | * Return's the customer with the passed email and website ID. |
||
| 524 | * |
||
| 525 | * @param string $email The email of the customer to return |
||
| 526 | * @param string $websiteId The website ID of the customer to return |
||
| 527 | * |
||
| 528 | * @return array|null The customer |
||
| 529 | */ |
||
| 530 | public function loadCustomerByEmailAndWebsiteId($email, $websiteId) |
||
| 531 | { |
||
| 532 | return $this->getCustomerRepository()->findOneByEmailAndWebsiteId($email, $websiteId); |
||
| 533 | } |
||
| 534 | |||
| 535 | /** |
||
| 536 | * Persist's the passed customer address data and return's the ID. |
||
| 537 | * |
||
| 538 | * @param array $customerAddress The customer data to persist |
||
| 539 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 540 | * |
||
| 541 | * @return string The ID of the persisted entity |
||
| 542 | */ |
||
| 543 | public function persistCustomerAddress($customerAddress, $name = null) |
||
| 544 | { |
||
| 545 | return $this->getCustomerAddressAction()->persist($customerAddress, $name); |
||
| 546 | } |
||
| 547 | |||
| 548 | /** |
||
| 549 | * Persist's the passed customer address varchar attribute. |
||
| 550 | * |
||
| 551 | * @param array $attribute The attribute to persist |
||
| 552 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 553 | * |
||
| 554 | * @return void |
||
| 555 | */ |
||
| 556 | public function persistCustomerAddressVarcharAttribute($attribute, $name = null) |
||
| 557 | { |
||
| 558 | $this->getCustomerAddressVarcharAction()->persist($attribute, $name); |
||
| 559 | } |
||
| 560 | |||
| 561 | /** |
||
| 562 | * Persist's the passed customer address integer attribute. |
||
| 563 | * |
||
| 564 | * @param array $attribute The attribute to persist |
||
| 565 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 566 | * |
||
| 567 | * @return void |
||
| 568 | */ |
||
| 569 | public function persistCustomerAddressIntAttribute($attribute, $name = null) |
||
| 570 | { |
||
| 571 | $this->getCustomerAddressIntAction()->persist($attribute, $name); |
||
| 572 | } |
||
| 573 | |||
| 574 | /** |
||
| 575 | * Persist's the passed customer address decimal attribute. |
||
| 576 | * |
||
| 577 | * @param array $attribute The attribute to persist |
||
| 578 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 579 | * |
||
| 580 | * @return void |
||
| 581 | */ |
||
| 582 | public function persistCustomerAddressDecimalAttribute($attribute, $name = null) |
||
| 583 | { |
||
| 584 | $this->getCustomerAddressDecimalAction()->persist($attribute, $name); |
||
| 585 | } |
||
| 586 | |||
| 587 | /** |
||
| 588 | * Persist's the passed customer address datetime attribute. |
||
| 589 | * |
||
| 590 | * @param array $attribute The attribute to persist |
||
| 591 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 592 | * |
||
| 593 | * @return void |
||
| 594 | */ |
||
| 595 | public function persistCustomerAddressDatetimeAttribute($attribute, $name = null) |
||
| 596 | { |
||
| 597 | $this->getCustomerAddressDatetimeAction()->persist($attribute, $name); |
||
| 598 | } |
||
| 599 | |||
| 600 | /** |
||
| 601 | * Persist's the passed customer address text attribute. |
||
| 602 | * |
||
| 603 | * @param array $attribute The attribute to persist |
||
| 604 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 605 | * |
||
| 606 | * @return void |
||
| 607 | */ |
||
| 608 | public function persistCustomerAddressTextAttribute($attribute, $name = null) |
||
| 609 | { |
||
| 610 | $this->getCustomerAddressTextAction()->persist($attribute, $name); |
||
| 611 | } |
||
| 612 | |||
| 613 | /** |
||
| 614 | * Delete's the entity with the passed attributes. |
||
| 615 | * |
||
| 616 | * @param array $row The attributes of the entity to delete |
||
| 617 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 618 | * |
||
| 619 | * @return void |
||
| 620 | */ |
||
| 621 | public function deleteCustomerAddress($row, $name = null) |
||
| 622 | { |
||
| 623 | $this->getCustomerAddressAction()->delete($row, $name); |
||
| 624 | } |
||
| 625 | |||
| 626 | /** |
||
| 627 | * Delete's the customer address datetime attribute with the passed attributes. |
||
| 628 | * |
||
| 629 | * @param array $row The attributes of the entity to delete |
||
| 630 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 631 | * |
||
| 632 | * @return void |
||
| 633 | */ |
||
| 634 | public function deleteCustomerAddressDatetimeAttribute($row, $name = null) |
||
| 635 | { |
||
| 636 | $this->getCustomerAddressDatetimeAction()->delete($row, $name); |
||
| 637 | } |
||
| 638 | |||
| 639 | /** |
||
| 640 | * Delete's the customer address decimal attribute with the passed attributes. |
||
| 641 | * |
||
| 642 | * @param array $row The attributes of the entity to delete |
||
| 643 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 644 | * |
||
| 645 | * @return void |
||
| 646 | */ |
||
| 647 | public function deleteCustomerAddressDecimalAttribute($row, $name = null) |
||
| 650 | } |
||
| 651 | |||
| 652 | /** |
||
| 653 | * Delete's the customer address integer attribute with the passed attributes. |
||
| 654 | * |
||
| 655 | * @param array $row The attributes of the entity to delete |
||
| 656 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 657 | * |
||
| 658 | * @return void |
||
| 659 | */ |
||
| 660 | public function deleteCustomerAddressIntAttribute($row, $name = null) |
||
| 661 | { |
||
| 662 | $this->getCustomerAddressIntAction()->delete($row, $name); |
||
| 663 | } |
||
| 664 | |||
| 665 | /** |
||
| 666 | * Delete's the customer address text attribute with the passed attributes. |
||
| 667 | * |
||
| 668 | * @param array $row The attributes of the entity to delete |
||
| 669 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 670 | * |
||
| 671 | * @return void |
||
| 672 | */ |
||
| 673 | public function deleteCustomerAddressTextAttribute($row, $name = null) |
||
| 674 | { |
||
| 675 | $this->getCustomerAddressTextAction()->delete($row, $name); |
||
| 676 | } |
||
| 677 | |||
| 678 | /** |
||
| 679 | * Delete's the customer address varchar attribute with the passed attributes. |
||
| 680 | * |
||
| 681 | * @param array $row The attributes of the entity to delete |
||
| 682 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 683 | * |
||
| 684 | * @return void |
||
| 685 | */ |
||
| 686 | public function deleteCustomerAddressVarcharAttribute($row, $name = null) |
||
| 689 | } |
||
| 690 | |||
| 691 | /** |
||
| 692 | * Clean-Up the repositories to free memory. |
||
| 693 | * |
||
| 694 | * @return void |
||
| 695 | */ |
||
| 696 | public function cleanUp() |
||
| 697 | { |
||
| 698 | // flush the cache |
||
| 699 | } |
||
| 700 | } |
||
| 701 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths