Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like AbstractSubject 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. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
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 AbstractSubject, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 48 | abstract class AbstractSubject implements SubjectInterface |
||
| 49 | { |
||
| 50 | |||
| 51 | /** |
||
| 52 | * The trait that provides basic filesystem handling functionality. |
||
| 53 | * |
||
| 54 | * @var TechDivision\Import\Subjects\FilesystemTrait |
||
| 55 | */ |
||
| 56 | use FilesystemTrait; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The trait that provides basic filesystem handling functionality. |
||
| 60 | * |
||
| 61 | * @var TechDivision\Import\SystemLoggerTrait |
||
| 62 | */ |
||
| 63 | use SystemLoggerTrait; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * The trait that provides header handling functionality. |
||
| 67 | * |
||
| 68 | * @var TechDivision\Import\HeaderTrait |
||
| 69 | */ |
||
| 70 | use HeaderTrait; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * The trait that provides row handling functionality. |
||
| 74 | * |
||
| 75 | * @var TechDivision\Import\RowTrait |
||
| 76 | */ |
||
| 77 | use RowTrait; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * The name of the file to be imported. |
||
| 81 | * |
||
| 82 | * @var string |
||
| 83 | */ |
||
| 84 | protected $filename; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * The actual line number. |
||
| 88 | * |
||
| 89 | * @var integer |
||
| 90 | */ |
||
| 91 | protected $lineNumber = 0; |
||
| 92 | |||
| 93 | /** |
||
| 94 | * The actual operation name. |
||
| 95 | * |
||
| 96 | * @var string |
||
| 97 | */ |
||
| 98 | protected $operationName ; |
||
| 99 | |||
| 100 | /** |
||
| 101 | * The flag that stop's overserver execution on the actual row. |
||
| 102 | * |
||
| 103 | * @var boolean |
||
| 104 | */ |
||
| 105 | protected $skipRow = false; |
||
| 106 | |||
| 107 | /** |
||
| 108 | * The import adapter instance. |
||
| 109 | * |
||
| 110 | * @var \TechDivision\Import\Adapter\ImportAdapterInterface |
||
| 111 | */ |
||
| 112 | protected $importAdapter; |
||
| 113 | |||
| 114 | /** |
||
| 115 | * The system configuration. |
||
| 116 | * |
||
| 117 | * @var \TechDivision\Import\Configuration\SubjectConfigurationInterface |
||
| 118 | */ |
||
| 119 | protected $configuration; |
||
| 120 | |||
| 121 | /** |
||
| 122 | * The RegistryProcessor instance to handle running threads. |
||
| 123 | * |
||
| 124 | * @var \TechDivision\Import\Services\RegistryProcessorInterface |
||
| 125 | */ |
||
| 126 | protected $registryProcessor; |
||
| 127 | |||
| 128 | /** |
||
| 129 | * The actions unique serial. |
||
| 130 | * |
||
| 131 | * @var string |
||
| 132 | */ |
||
| 133 | protected $serial; |
||
| 134 | |||
| 135 | /** |
||
| 136 | * Array with the subject's observers. |
||
| 137 | * |
||
| 138 | * @var array |
||
| 139 | */ |
||
| 140 | protected $observers = array(); |
||
| 141 | |||
| 142 | /** |
||
| 143 | * Array with the subject's callbacks. |
||
| 144 | * |
||
| 145 | * @var array |
||
| 146 | */ |
||
| 147 | protected $callbacks = array(); |
||
| 148 | |||
| 149 | /** |
||
| 150 | * The subject's callback mappings. |
||
| 151 | * |
||
| 152 | * @var array |
||
| 153 | */ |
||
| 154 | protected $callbackMappings = array(); |
||
| 155 | |||
| 156 | /** |
||
| 157 | * The available root categories. |
||
| 158 | * |
||
| 159 | * @var array |
||
| 160 | */ |
||
| 161 | protected $rootCategories = array(); |
||
| 162 | |||
| 163 | /** |
||
| 164 | * The Magento configuration. |
||
| 165 | * |
||
| 166 | * @var array |
||
| 167 | */ |
||
| 168 | protected $coreConfigData = array(); |
||
| 169 | |||
| 170 | /** |
||
| 171 | * The available stores. |
||
| 172 | * |
||
| 173 | * @var array |
||
| 174 | */ |
||
| 175 | protected $stores = array(); |
||
| 176 | |||
| 177 | /** |
||
| 178 | * The available websites. |
||
| 179 | * |
||
| 180 | * @var array |
||
| 181 | */ |
||
| 182 | protected $storeWebsites = array(); |
||
| 183 | |||
| 184 | /** |
||
| 185 | * The default store. |
||
| 186 | * |
||
| 187 | * @var array |
||
| 188 | */ |
||
| 189 | protected $defaultStore; |
||
| 190 | |||
| 191 | /** |
||
| 192 | * The store view code the create the product/attributes for. |
||
| 193 | * |
||
| 194 | * @var string |
||
| 195 | */ |
||
| 196 | protected $storeViewCode; |
||
| 197 | |||
| 198 | /** |
||
| 199 | * The UID generator for the core config data. |
||
| 200 | * |
||
| 201 | * @var \TechDivision\Import\Utils\Generators\GeneratorInterface |
||
| 202 | */ |
||
| 203 | protected $coreConfigDataUidGenerator; |
||
| 204 | |||
| 205 | /** |
||
| 206 | * UNIX timestamp with the date the last row counter has been logged. |
||
| 207 | * |
||
| 208 | * @var integer |
||
| 209 | */ |
||
| 210 | protected $lastLog = 0; |
||
| 211 | |||
| 212 | /** |
||
| 213 | * The number of the last line that has been logged with the row counter |
||
| 214 | * @var integer |
||
| 215 | */ |
||
| 216 | protected $lastLineNumber = 0; |
||
| 217 | |||
| 218 | /** |
||
| 219 | * Initialize the subject instance. |
||
| 220 | * |
||
| 221 | * @param \TechDivision\Import\Services\RegistryProcessorInterface $registryProcessor The registry processor instance |
||
| 222 | * @param \TechDivision\Import\Utils\Generators\GeneratorInterface $coreConfigDataUidGenerator The UID generator for the core config data |
||
| 223 | * @param \Doctrine\Common\Collections\Collection $systemLoggers The array with the system loggers instances |
||
| 224 | */ |
||
| 225 | 77 | public function __construct( |
|
| 234 | |||
| 235 | /** |
||
| 236 | * Set's the name of the file to import |
||
| 237 | * |
||
| 238 | * @param string $filename The filename |
||
| 239 | * |
||
| 240 | * @return void |
||
| 241 | */ |
||
| 242 | 13 | public function setFilename($filename) |
|
| 246 | |||
| 247 | /** |
||
| 248 | * Return's the name of the file to import. |
||
| 249 | * |
||
| 250 | * @return string The filename |
||
| 251 | */ |
||
| 252 | 13 | public function getFilename() |
|
| 256 | |||
| 257 | /** |
||
| 258 | * Set's the actual operation name. |
||
| 259 | * |
||
| 260 | * @param string $operationName The actual operation name |
||
| 261 | * |
||
| 262 | * @return void |
||
| 263 | */ |
||
| 264 | 1 | public function setOperationName($operationName) |
|
| 268 | |||
| 269 | /** |
||
| 270 | * Return's the actual operation name. |
||
| 271 | * |
||
| 272 | * @return string |
||
| 273 | */ |
||
| 274 | 1 | public function getOperationName() |
|
| 278 | |||
| 279 | /** |
||
| 280 | * Set's the actual line number. |
||
| 281 | * |
||
| 282 | * @param integer $lineNumber The line number |
||
| 283 | * |
||
| 284 | * @return void |
||
| 285 | */ |
||
| 286 | 1 | public function setLineNumber($lineNumber) |
|
| 290 | |||
| 291 | /** |
||
| 292 | * Return's the actual line number. |
||
| 293 | * |
||
| 294 | * @return integer The line number |
||
| 295 | */ |
||
| 296 | 13 | public function getLineNumber() |
|
| 300 | |||
| 301 | /** |
||
| 302 | * Stop's observer execution on the actual row. |
||
| 303 | * |
||
| 304 | * @return void |
||
| 305 | */ |
||
| 306 | 1 | public function skipRow() |
|
| 310 | |||
| 311 | /** |
||
| 312 | * Return's the default callback mappings. |
||
| 313 | * |
||
| 314 | * @return array The default callback mappings |
||
| 315 | */ |
||
| 316 | 1 | public function getDefaultCallbackMappings() |
|
| 320 | |||
| 321 | /** |
||
| 322 | * Tries to format the passed value to a valid date with format 'Y-m-d H:i:s'. |
||
| 323 | * If the passed value is NOT a valid date, NULL will be returned. |
||
| 324 | * |
||
| 325 | * @param string $value The value to format |
||
| 326 | * |
||
| 327 | * @return string|null The formatted date or NULL if the date is not valid |
||
| 328 | */ |
||
| 329 | 2 | public function formatDate($value) |
|
| 340 | |||
| 341 | /** |
||
| 342 | * Extracts the elements of the passed value by exploding them |
||
| 343 | * with the also passed delimiter. |
||
| 344 | * |
||
| 345 | * @param string $value The value to extract |
||
| 346 | * @param string|null $delimiter The delimiter used to extrace the elements |
||
| 347 | * |
||
| 348 | * @return array The exploded values |
||
| 349 | */ |
||
| 350 | 2 | public function explode($value, $delimiter = null) |
|
| 363 | |||
| 364 | /** |
||
| 365 | * Queries whether or not debug mode is enabled or not, default is TRUE. |
||
| 366 | * |
||
| 367 | * @return boolean TRUE if debug mode is enabled, else FALSE |
||
| 368 | */ |
||
| 369 | 1 | public function isDebugMode() |
|
| 373 | |||
| 374 | /** |
||
| 375 | * Set's the subject configuration. |
||
| 376 | * |
||
| 377 | * @param \TechDivision\Import\Configuration\SubjectConfigurationInterface $configuration The subject configuration |
||
| 378 | * |
||
| 379 | * @return void |
||
| 380 | */ |
||
| 381 | 77 | public function setConfiguration(SubjectConfigurationInterface $configuration) |
|
| 385 | |||
| 386 | /** |
||
| 387 | * Return's the subject configuration. |
||
| 388 | * |
||
| 389 | * @return \TechDivision\Import\Configuration\SubjectConfigurationInterface The subject configuration |
||
| 390 | */ |
||
| 391 | 77 | public function getConfiguration() |
|
| 395 | |||
| 396 | /** |
||
| 397 | * Set's the import adapter instance. |
||
| 398 | * |
||
| 399 | * @param \TechDivision\Import\Adapter\ImportAdapterInterface $importAdapter The import adapter instance |
||
| 400 | * |
||
| 401 | * @return void |
||
| 402 | */ |
||
| 403 | 3 | public function setImportAdapter(ImportAdapterInterface $importAdapter) |
|
| 407 | |||
| 408 | /** |
||
| 409 | * Return's the import adapter instance. |
||
| 410 | * |
||
| 411 | * @return \TechDivision\Import\Adapter\ImportAdapterInterface The import adapter instance |
||
| 412 | */ |
||
| 413 | 3 | public function getImportAdapter() |
|
| 417 | |||
| 418 | /** |
||
| 419 | * Return's the RegistryProcessor instance to handle the running threads. |
||
| 420 | * |
||
| 421 | * @return \TechDivision\Import\Services\RegistryProcessorInterface The registry processor instance |
||
| 422 | */ |
||
| 423 | 77 | public function getRegistryProcessor() |
|
| 427 | |||
| 428 | /** |
||
| 429 | * Set's the unique serial for this import process. |
||
| 430 | * |
||
| 431 | * @param string $serial The unique serial |
||
| 432 | * |
||
| 433 | * @return void |
||
| 434 | */ |
||
| 435 | 9 | public function setSerial($serial) |
|
| 439 | |||
| 440 | /** |
||
| 441 | * Return's the unique serial for this import process. |
||
| 442 | * |
||
| 443 | * @return string The unique serial |
||
| 444 | */ |
||
| 445 | 4 | public function getSerial() |
|
| 449 | |||
| 450 | /** |
||
| 451 | * Return's the source date format to use. |
||
| 452 | * |
||
| 453 | * @return string The source date format |
||
| 454 | */ |
||
| 455 | 4 | public function getSourceDateFormat() |
|
| 459 | |||
| 460 | /** |
||
| 461 | * Return's the multiple field delimiter character to use, default value is comma (,). |
||
| 462 | * |
||
| 463 | * @return string The multiple field delimiter character |
||
| 464 | */ |
||
| 465 | 1 | public function getMultipleFieldDelimiter() |
|
| 469 | |||
| 470 | /** |
||
| 471 | * Return's the multiple value delimiter character to use, default value is comma (|). |
||
| 472 | * |
||
| 473 | * @return string The multiple value delimiter character |
||
| 474 | */ |
||
| 475 | 1 | public function getMultipleValueDelimiter() |
|
| 479 | |||
| 480 | /** |
||
| 481 | * Intializes the previously loaded global data for exactly one bunch. |
||
| 482 | * |
||
| 483 | * @param string $serial The serial of the actual import |
||
| 484 | * |
||
| 485 | * @return void |
||
| 486 | */ |
||
| 487 | 77 | public function setUp($serial) |
|
| 525 | |||
| 526 | /** |
||
| 527 | * Clean up the global data after importing the variants. |
||
| 528 | * |
||
| 529 | * @param string $serial The serial of the actual import |
||
| 530 | * |
||
| 531 | * @return void |
||
| 532 | */ |
||
| 533 | 1 | public function tearDown($serial) |
|
| 553 | |||
| 554 | /** |
||
| 555 | * Return's the target directory for the artefact export. |
||
| 556 | * |
||
| 557 | * @return string The target directory for the artefact export |
||
| 558 | */ |
||
| 559 | 1 | public function getTargetDir() |
|
| 563 | |||
| 564 | /** |
||
| 565 | * Return's the next source directory, which will be the target directory |
||
| 566 | * of this subject, in most cases. |
||
| 567 | * |
||
| 568 | * @param string $serial The serial of the actual import |
||
| 569 | * |
||
| 570 | * @return string The new source directory |
||
| 571 | */ |
||
| 572 | 4 | public function getNewSourceDir($serial) |
|
| 576 | |||
| 577 | /** |
||
| 578 | * Register the passed observer with the specific type. |
||
| 579 | * |
||
| 580 | * @param \TechDivision\Import\Observers\ObserverInterface $observer The observer to register |
||
| 581 | * @param string $type The type to register the observer with |
||
| 582 | * |
||
| 583 | * @return void |
||
| 584 | */ |
||
| 585 | 6 | public function registerObserver(ObserverInterface $observer, $type) |
|
| 597 | |||
| 598 | /** |
||
| 599 | * Register the passed callback with the specific type. |
||
| 600 | * |
||
| 601 | * @param \TechDivision\Import\Callbacks\CallbackInterface $callback The subject to register the callbacks for |
||
| 602 | * @param string $type The type to register the callback with |
||
| 603 | * |
||
| 604 | * @return void |
||
| 605 | */ |
||
| 606 | 2 | public function registerCallback(CallbackInterface $callback, $type) |
|
| 618 | |||
| 619 | /** |
||
| 620 | * Return's the array with callbacks for the passed type. |
||
| 621 | * |
||
| 622 | * @param string $type The type of the callbacks to return |
||
| 623 | * |
||
| 624 | * @return array The callbacks |
||
| 625 | */ |
||
| 626 | 1 | public function getCallbacksByType($type) |
|
| 640 | |||
| 641 | /** |
||
| 642 | * Return's the array with the available observers. |
||
| 643 | * |
||
| 644 | * @return array The observers |
||
| 645 | */ |
||
| 646 | 6 | public function getObservers() |
|
| 650 | |||
| 651 | /** |
||
| 652 | * Return's the array with the available callbacks. |
||
| 653 | * |
||
| 654 | * @return array The callbacks |
||
| 655 | */ |
||
| 656 | 1 | public function getCallbacks() |
|
| 660 | |||
| 661 | /** |
||
| 662 | * Return's the callback mappings for this subject. |
||
| 663 | * |
||
| 664 | * @return array The array with the subject's callback mappings |
||
| 665 | */ |
||
| 666 | 2 | public function getCallbackMappings() |
|
| 670 | |||
| 671 | /** |
||
| 672 | * Imports the content of the file with the passed filename. |
||
| 673 | * |
||
| 674 | * |
||
| 675 | * @param string $serial The serial of the actual import |
||
| 676 | * @param string $filename The filename to process |
||
| 677 | * |
||
| 678 | * @return void |
||
| 679 | * @throws \Exception Is thrown, if the import can't be processed |
||
| 680 | */ |
||
| 681 | 5 | public function import($serial, $filename) |
|
| 750 | |||
| 751 | /** |
||
| 752 | * This method queries whether or not the passed filename matches |
||
| 753 | * the pattern, based on the subjects configured prefix. |
||
| 754 | * |
||
| 755 | * @param string $filename The filename to match |
||
| 756 | * |
||
| 757 | * @return boolean TRUE if the filename matches, else FALSE |
||
| 758 | */ |
||
| 759 | 5 | protected function match($filename) |
|
| 772 | |||
| 773 | /** |
||
| 774 | * Imports the passed row into the database. If the import failed, the exception |
||
| 775 | * will be catched and logged, but the import process will be continued. |
||
| 776 | * |
||
| 777 | * @param array $row The row with the data to be imported |
||
| 778 | * |
||
| 779 | * @return void |
||
| 780 | */ |
||
| 781 | 7 | public function importRow(array $row) |
|
| 853 | |||
| 854 | /** |
||
| 855 | * Queries whether or not that the subject needs an OK file to be processed. |
||
| 856 | * |
||
| 857 | * @return boolean TRUE if the subject needs an OK file, else FALSE |
||
| 858 | */ |
||
| 859 | 1 | public function isOkFileNeeded() |
|
| 863 | |||
| 864 | /** |
||
| 865 | * Return's the default store. |
||
| 866 | * |
||
| 867 | * @return array The default store |
||
| 868 | */ |
||
| 869 | public function getDefaultStore() |
||
| 873 | |||
| 874 | /** |
||
| 875 | * Return's the default store view code. |
||
| 876 | * |
||
| 877 | * @return array The default store view code |
||
| 878 | */ |
||
| 879 | 5 | public function getDefaultStoreViewCode() |
|
| 883 | |||
| 884 | /** |
||
| 885 | * Set's the store view code the create the product/attributes for. |
||
| 886 | * |
||
| 887 | * @param string $storeViewCode The store view code |
||
| 888 | * |
||
| 889 | * @return void |
||
| 890 | */ |
||
| 891 | 4 | public function setStoreViewCode($storeViewCode) |
|
| 895 | |||
| 896 | /** |
||
| 897 | * Return's the store view code the create the product/attributes for. |
||
| 898 | * |
||
| 899 | * @param string|null $default The default value to return, if the store view code has not been set |
||
| 900 | * |
||
| 901 | * @return string The store view code |
||
| 902 | */ |
||
| 903 | 8 | public function getStoreViewCode($default = null) |
|
| 920 | |||
| 921 | /** |
||
| 922 | * Prepare's the store view code in the subject. If the store_view_code row doesn't contain |
||
| 923 | * any value, the default code of the default store view will be set. |
||
| 924 | * |
||
| 925 | * @return void |
||
| 926 | */ |
||
| 927 | 2 | public function prepareStoreViewCode() |
|
| 938 | |||
| 939 | /** |
||
| 940 | * Return's the store ID of the store with the passed store view code |
||
| 941 | * |
||
| 942 | * @param string $storeViewCode The store view code to return the store ID for |
||
| 943 | * |
||
| 944 | * @return integer The ID of the store with the passed ID |
||
| 945 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
| 946 | */ |
||
| 947 | 4 | public function getStoreId($storeViewCode) |
|
| 965 | |||
| 966 | /** |
||
| 967 | * Return's the store ID of the actual row, or of the default store |
||
| 968 | * if no store view code is set in the CSV file. |
||
| 969 | * |
||
| 970 | * @param string|null $default The default store view code to use, if no store view code is set in the CSV file |
||
| 971 | * |
||
| 972 | * @return integer The ID of the actual store |
||
| 973 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
| 974 | */ |
||
| 975 | 2 | public function getRowStoreId($default = null) |
|
| 986 | |||
| 987 | /** |
||
| 988 | * Return's the root category for the actual view store. |
||
| 989 | * |
||
| 990 | * @return array The store's root category |
||
| 991 | * @throws \Exception Is thrown if the root category for the passed store code is NOT available |
||
| 992 | */ |
||
| 993 | 2 | public function getRootCategory() |
|
| 1007 | |||
| 1008 | /** |
||
| 1009 | * Return's the Magento configuration value. |
||
| 1010 | * |
||
| 1011 | * @param string $path The Magento path of the requested configuration value |
||
| 1012 | * @param mixed $default The default value that has to be returned, if the requested configuration value is not set |
||
| 1013 | * @param string $scope The scope the configuration value has been set |
||
| 1014 | * @param integer $scopeId The scope ID the configuration value has been set |
||
| 1015 | * |
||
| 1016 | * @return mixed The configuration value |
||
| 1017 | * @throws \Exception Is thrown, if nor a value can be found or a default value has been passed |
||
| 1018 | */ |
||
| 1019 | 5 | public function getCoreConfigData($path, $default = null, $scope = ScopeKeys::SCOPE_DEFAULT, $scopeId = 0) |
|
| 1095 | |||
| 1096 | /** |
||
| 1097 | * Resolve the original column name for the passed one. |
||
| 1098 | * |
||
| 1099 | * @param string $columnName The column name that has to be resolved |
||
| 1100 | * |
||
| 1101 | * @return string|null The original column name |
||
| 1102 | */ |
||
| 1103 | 2 | public function resolveOriginalColumnName($columnName) |
|
| 1125 | |||
| 1126 | /** |
||
| 1127 | * Return's the original data if available, or an empty array. |
||
| 1128 | * |
||
| 1129 | * @return array The original data |
||
| 1130 | */ |
||
| 1131 | 2 | public function getOriginalData() |
|
| 1146 | |||
| 1147 | /** |
||
| 1148 | * Query's whether or not the actual column contains original data like |
||
| 1149 | * filename, line number and column names. |
||
| 1150 | * |
||
| 1151 | * @return boolean TRUE if the actual column contains origin data, else FALSE |
||
| 1152 | */ |
||
| 1153 | 3 | public function hasOriginalData() |
|
| 1157 | |||
| 1158 | /** |
||
| 1159 | * Wraps the passed exeception into a new one by trying to resolve the original filname, |
||
| 1160 | * line number and column names and use it for a detailed exception message. |
||
| 1161 | * |
||
| 1162 | * @param array $columnNames The column names that should be resolved and wrapped |
||
| 1163 | * @param \Exception $parent The exception we want to wrap |
||
| 1164 | * @param string $className The class name of the exception type we want to wrap the parent one |
||
| 1165 | * |
||
| 1166 | * @return \Exception the wrapped exception |
||
| 1167 | */ |
||
| 1168 | 2 | public function wrapException( |
|
| 1213 | |||
| 1214 | /** |
||
| 1215 | * Strip's the exception suffix containing filename and line number from the |
||
| 1216 | * passed message. |
||
| 1217 | * |
||
| 1218 | * @param string $message The message to strip the exception suffix from |
||
| 1219 | * |
||
| 1220 | * @return mixed The message without the exception suffix |
||
| 1221 | */ |
||
| 1222 | 2 | public function stripExceptionSuffix($message) |
|
| 1226 | |||
| 1227 | /** |
||
| 1228 | * Append's the exception suffix containing filename and line number to the |
||
| 1229 | * passed message. If no message has been passed, only the suffix will be |
||
| 1230 | * returned |
||
| 1231 | * |
||
| 1232 | * @param string|null $message The message to append the exception suffix to |
||
| 1233 | * @param string|null $filename The filename used to create the suffix |
||
| 1234 | * @param string|null $lineNumber The line number used to create the suffx |
||
| 1235 | * |
||
| 1236 | * @return string The message with the appended exception suffix |
||
| 1237 | */ |
||
| 1238 | 12 | public function appendExceptionSuffix($message = null, $filename = null, $lineNumber = null) |
|
| 1259 | |||
| 1260 | /** |
||
| 1261 | * Raises the value for the counter with the passed key by one. |
||
| 1262 | * |
||
| 1263 | * @param mixed $counterName The name of the counter to raise |
||
| 1264 | * |
||
| 1265 | * @return integer The counter's new value |
||
| 1266 | */ |
||
| 1267 | 1 | public function raiseCounter($counterName) |
|
| 1276 | |||
| 1277 | /** |
||
| 1278 | * Merge the passed array into the status of the actual import. |
||
| 1279 | * |
||
| 1280 | * @param array $status The status information to be merged |
||
| 1281 | * |
||
| 1282 | * @return void |
||
| 1283 | */ |
||
| 1284 | 1 | public function mergeAttributesRecursive(array $status) |
|
| 1293 | } |
||
| 1294 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..