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 |
||
| 50 | abstract class AbstractSubject implements SubjectInterface, FilesystemSubjectInterface, DateConverterSubjectInterface |
||
| 51 | { |
||
| 52 | |||
| 53 | /** |
||
| 54 | * The trait that provides basic filesystem handling functionality. |
||
| 55 | * |
||
| 56 | * @var \TechDivision\Import\Subjects\FilesystemTrait |
||
| 57 | */ |
||
| 58 | use FilesystemTrait; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * The trait that provides basic filesystem handling functionality. |
||
| 62 | * |
||
| 63 | * @var \TechDivision\Import\SystemLoggerTrait |
||
| 64 | */ |
||
| 65 | use SystemLoggerTrait; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * The trait that provides date converting functionality. |
||
| 69 | * |
||
| 70 | * @var \TechDivision\Import\DateConverterTrait |
||
| 71 | */ |
||
| 72 | use DateConverterTrait; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * The trait that provides header handling functionality. |
||
| 76 | * |
||
| 77 | * @var \TechDivision\Import\HeaderTrait |
||
| 78 | */ |
||
| 79 | use HeaderTrait; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * The trait that provides row handling functionality. |
||
| 83 | * |
||
| 84 | * @var \TechDivision\Import\RowTrait |
||
| 85 | */ |
||
| 86 | use RowTrait; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * The name of the file to be imported. |
||
| 90 | * |
||
| 91 | * @var string |
||
| 92 | */ |
||
| 93 | protected $filename; |
||
| 94 | |||
| 95 | /** |
||
| 96 | * The actual line number. |
||
| 97 | * |
||
| 98 | * @var integer |
||
| 99 | */ |
||
| 100 | protected $lineNumber = 0; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * The import adapter instance. |
||
| 104 | * |
||
| 105 | * @var \TechDivision\Import\Adapter\ImportAdapterInterface |
||
| 106 | */ |
||
| 107 | protected $importAdapter; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * The system configuration. |
||
| 111 | * |
||
| 112 | * @var \TechDivision\Import\Configuration\SubjectConfigurationInterface |
||
| 113 | */ |
||
| 114 | protected $configuration; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * The RegistryProcessor instance to handle running threads. |
||
| 118 | * |
||
| 119 | * @var \TechDivision\Import\Services\RegistryProcessorInterface |
||
| 120 | */ |
||
| 121 | protected $registryProcessor; |
||
| 122 | |||
| 123 | /** |
||
| 124 | * The actions unique serial. |
||
| 125 | * |
||
| 126 | * @var string |
||
| 127 | */ |
||
| 128 | protected $serial; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * Array with the subject's observers. |
||
| 132 | * |
||
| 133 | * @var array |
||
| 134 | */ |
||
| 135 | protected $observers = array(); |
||
| 136 | |||
| 137 | /** |
||
| 138 | * Array with the subject's callbacks. |
||
| 139 | * |
||
| 140 | * @var array |
||
| 141 | */ |
||
| 142 | protected $callbacks = array(); |
||
| 143 | |||
| 144 | /** |
||
| 145 | * The subject's callback mappings. |
||
| 146 | * |
||
| 147 | * @var array |
||
| 148 | */ |
||
| 149 | protected $callbackMappings = array(); |
||
| 150 | |||
| 151 | /** |
||
| 152 | * The available root categories. |
||
| 153 | * |
||
| 154 | * @var array |
||
| 155 | */ |
||
| 156 | protected $rootCategories = array(); |
||
| 157 | |||
| 158 | /** |
||
| 159 | * The Magento configuration. |
||
| 160 | * |
||
| 161 | * @var array |
||
| 162 | */ |
||
| 163 | protected $coreConfigData = array(); |
||
| 164 | |||
| 165 | /** |
||
| 166 | * The available stores. |
||
| 167 | * |
||
| 168 | * @var array |
||
| 169 | */ |
||
| 170 | protected $stores = array(); |
||
| 171 | |||
| 172 | /** |
||
| 173 | * The available websites. |
||
| 174 | * |
||
| 175 | * @var array |
||
| 176 | */ |
||
| 177 | protected $storeWebsites = array(); |
||
| 178 | |||
| 179 | /** |
||
| 180 | * The default store. |
||
| 181 | * |
||
| 182 | * @var array |
||
| 183 | */ |
||
| 184 | protected $defaultStore; |
||
| 185 | |||
| 186 | /** |
||
| 187 | * The store view code the create the product/attributes for. |
||
| 188 | * |
||
| 189 | * @var string |
||
| 190 | */ |
||
| 191 | protected $storeViewCode; |
||
| 192 | |||
| 193 | /** |
||
| 194 | * The UID generator for the core config data. |
||
| 195 | * |
||
| 196 | * @var \TechDivision\Import\Utils\Generators\GeneratorInterface |
||
| 197 | */ |
||
| 198 | protected $coreConfigDataUidGenerator; |
||
| 199 | |||
| 200 | /** |
||
| 201 | * UNIX timestamp with the date the last row counter has been logged. |
||
| 202 | * |
||
| 203 | * @var integer |
||
| 204 | */ |
||
| 205 | protected $lastLog = 0; |
||
| 206 | |||
| 207 | /** |
||
| 208 | * The number of the last line that has been logged with the row counter |
||
| 209 | * @var integer |
||
| 210 | */ |
||
| 211 | protected $lastLineNumber = 0; |
||
| 212 | |||
| 213 | /** |
||
| 214 | * The event emitter instance. |
||
| 215 | * |
||
| 216 | * @var \League\Event\EmitterInterface |
||
| 217 | */ |
||
| 218 | protected $emitter; |
||
| 219 | |||
| 220 | /** |
||
| 221 | * Initialize the subject instance. |
||
| 222 | * |
||
| 223 | * @param \TechDivision\Import\Services\RegistryProcessorInterface $registryProcessor The registry processor instance |
||
| 224 | * @param \TechDivision\Import\Utils\Generators\GeneratorInterface $coreConfigDataUidGenerator The UID generator for the core config data |
||
| 225 | * @param \Doctrine\Common\Collections\Collection $systemLoggers The array with the system loggers instances |
||
| 226 | * @param \League\Event\EmitterInterface $emitter The event emitter instance |
||
| 227 | */ |
||
| 228 | public function __construct( |
||
| 239 | |||
| 240 | /** |
||
| 241 | * Return's the event emitter instance. |
||
| 242 | * |
||
| 243 | * @return \League\Event\EmitterInterface The event emitter instance |
||
| 244 | */ |
||
| 245 | public function getEmitter() |
||
| 249 | |||
| 250 | /** |
||
| 251 | * Set's the name of the file to import |
||
| 252 | * |
||
| 253 | * @param string $filename The filename |
||
| 254 | * |
||
| 255 | * @return void |
||
| 256 | */ |
||
| 257 | public function setFilename($filename) |
||
| 261 | |||
| 262 | /** |
||
| 263 | * Return's the name of the file to import. |
||
| 264 | * |
||
| 265 | * @return string The filename |
||
| 266 | */ |
||
| 267 | public function getFilename() |
||
| 271 | |||
| 272 | /** |
||
| 273 | * Set's the actual line number. |
||
| 274 | * |
||
| 275 | * @param integer $lineNumber The line number |
||
| 276 | * |
||
| 277 | * @return void |
||
| 278 | */ |
||
| 279 | public function setLineNumber($lineNumber) |
||
| 283 | |||
| 284 | /** |
||
| 285 | * Return's the actual line number. |
||
| 286 | * |
||
| 287 | * @return integer The line number |
||
| 288 | */ |
||
| 289 | public function getLineNumber() |
||
| 293 | |||
| 294 | /** |
||
| 295 | * Return's the default callback mappings. |
||
| 296 | * |
||
| 297 | * @return array The default callback mappings |
||
| 298 | */ |
||
| 299 | public function getDefaultCallbackMappings() |
||
| 303 | |||
| 304 | /** |
||
| 305 | * Tries to format the passed value to a valid date with format 'Y-m-d H:i:s'. |
||
| 306 | * If the passed value is NOT a valid date, NULL will be returned. |
||
| 307 | * |
||
| 308 | * @param string $value The value to format |
||
| 309 | * |
||
| 310 | * @return string|null The formatted date or NULL if the date is not valid |
||
| 311 | */ |
||
| 312 | public function formatDate($value) |
||
| 316 | |||
| 317 | /** |
||
| 318 | * Extracts the elements of the passed value by exploding them |
||
| 319 | * with the also passed delimiter. |
||
| 320 | * |
||
| 321 | * @param string $value The value to extract |
||
| 322 | * @param string|null $delimiter The delimiter used to extrace the elements |
||
| 323 | * |
||
| 324 | * @return array The exploded values |
||
| 325 | */ |
||
| 326 | public function explode($value, $delimiter = null) |
||
| 330 | |||
| 331 | /** |
||
| 332 | * Queries whether or not debug mode is enabled or not, default is TRUE. |
||
| 333 | * |
||
| 334 | * @return boolean TRUE if debug mode is enabled, else FALSE |
||
| 335 | */ |
||
| 336 | public function isDebugMode() |
||
| 340 | |||
| 341 | /** |
||
| 342 | * Set's the subject configuration. |
||
| 343 | * |
||
| 344 | * @param \TechDivision\Import\Configuration\SubjectConfigurationInterface $configuration The subject configuration |
||
| 345 | * |
||
| 346 | * @return void |
||
| 347 | */ |
||
| 348 | public function setConfiguration(SubjectConfigurationInterface $configuration) |
||
| 352 | |||
| 353 | /** |
||
| 354 | * Return's the subject configuration. |
||
| 355 | * |
||
| 356 | * @return \TechDivision\Import\Configuration\SubjectConfigurationInterface The subject configuration |
||
| 357 | */ |
||
| 358 | public function getConfiguration() |
||
| 362 | |||
| 363 | /** |
||
| 364 | * Set's the import adapter instance. |
||
| 365 | * |
||
| 366 | * @param \TechDivision\Import\Adapter\ImportAdapterInterface $importAdapter The import adapter instance |
||
| 367 | * |
||
| 368 | * @return void |
||
| 369 | */ |
||
| 370 | public function setImportAdapter(ImportAdapterInterface $importAdapter) |
||
| 374 | |||
| 375 | /** |
||
| 376 | * Return's the import adapter instance. |
||
| 377 | * |
||
| 378 | * @return \TechDivision\Import\Adapter\ImportAdapterInterface The import adapter instance |
||
| 379 | */ |
||
| 380 | public function getImportAdapter() |
||
| 384 | |||
| 385 | /** |
||
| 386 | * Return's the RegistryProcessor instance to handle the running threads. |
||
| 387 | * |
||
| 388 | * @return \TechDivision\Import\Services\RegistryProcessorInterface The registry processor instance |
||
| 389 | */ |
||
| 390 | public function getRegistryProcessor() |
||
| 394 | |||
| 395 | /** |
||
| 396 | * Set's the unique serial for this import process. |
||
| 397 | * |
||
| 398 | * @param string $serial The unique serial |
||
| 399 | * |
||
| 400 | * @return void |
||
| 401 | */ |
||
| 402 | public function setSerial($serial) |
||
| 406 | |||
| 407 | /** |
||
| 408 | * Return's the unique serial for this import process. |
||
| 409 | * |
||
| 410 | * @return string The unique serial |
||
| 411 | */ |
||
| 412 | public function getSerial() |
||
| 416 | |||
| 417 | /** |
||
| 418 | * Return's the source date format to use. |
||
| 419 | * |
||
| 420 | * @return string The source date format |
||
| 421 | */ |
||
| 422 | public function getSourceDateFormat() |
||
| 426 | |||
| 427 | /** |
||
| 428 | * Return's the multiple field delimiter character to use, default value is comma (,). |
||
| 429 | * |
||
| 430 | * @return string The multiple field delimiter character |
||
| 431 | */ |
||
| 432 | public function getMultipleFieldDelimiter() |
||
| 436 | |||
| 437 | /** |
||
| 438 | * Return's the multiple value delimiter character to use, default value is comma (|). |
||
| 439 | * |
||
| 440 | * @return string The multiple value delimiter character |
||
| 441 | */ |
||
| 442 | public function getMultipleValueDelimiter() |
||
| 446 | |||
| 447 | /** |
||
| 448 | * Intializes the previously loaded global data for exactly one bunch. |
||
| 449 | * |
||
| 450 | * @param string $serial The serial of the actual import |
||
| 451 | * |
||
| 452 | * @return void |
||
| 453 | */ |
||
| 454 | public function setUp($serial) |
||
| 494 | |||
| 495 | /** |
||
| 496 | * Clean up the global data after importing the variants. |
||
| 497 | * |
||
| 498 | * @param string $serial The serial of the actual import |
||
| 499 | * |
||
| 500 | * @return void |
||
| 501 | */ |
||
| 502 | public function tearDown($serial) |
||
| 522 | |||
| 523 | /** |
||
| 524 | * Return's the target directory for the artefact export. |
||
| 525 | * |
||
| 526 | * @return string The target directory for the artefact export |
||
| 527 | */ |
||
| 528 | public function getTargetDir() |
||
| 532 | |||
| 533 | /** |
||
| 534 | * Return's the next source directory, which will be the target directory |
||
| 535 | * of this subject, in most cases. |
||
| 536 | * |
||
| 537 | * @param string $serial The serial of the actual import |
||
| 538 | * |
||
| 539 | * @return string The new source directory |
||
| 540 | */ |
||
| 541 | public function getNewSourceDir($serial) |
||
| 545 | |||
| 546 | /** |
||
| 547 | * Register the passed observer with the specific type. |
||
| 548 | * |
||
| 549 | * @param \TechDivision\Import\Observers\ObserverInterface $observer The observer to register |
||
| 550 | * @param string $type The type to register the observer with |
||
| 551 | * |
||
| 552 | * @return void |
||
| 553 | */ |
||
| 554 | public function registerObserver(ObserverInterface $observer, $type) |
||
| 566 | |||
| 567 | /** |
||
| 568 | * Register the passed callback with the specific type. |
||
| 569 | * |
||
| 570 | * @param \TechDivision\Import\Callbacks\CallbackInterface $callback The subject to register the callbacks for |
||
| 571 | * @param string $type The type to register the callback with |
||
| 572 | * |
||
| 573 | * @return void |
||
| 574 | */ |
||
| 575 | public function registerCallback(CallbackInterface $callback, $type) |
||
| 587 | |||
| 588 | /** |
||
| 589 | * Return's the array with callbacks for the passed type. |
||
| 590 | * |
||
| 591 | * @param string $type The type of the callbacks to return |
||
| 592 | * |
||
| 593 | * @return array The callbacks |
||
| 594 | */ |
||
| 595 | public function getCallbacksByType($type) |
||
| 609 | |||
| 610 | /** |
||
| 611 | * Return's the array with the available observers. |
||
| 612 | * |
||
| 613 | * @return array The observers |
||
| 614 | */ |
||
| 615 | public function getObservers() |
||
| 619 | |||
| 620 | /** |
||
| 621 | * Return's the array with the available callbacks. |
||
| 622 | * |
||
| 623 | * @return array The callbacks |
||
| 624 | */ |
||
| 625 | public function getCallbacks() |
||
| 629 | |||
| 630 | /** |
||
| 631 | * Return's the callback mappings for this subject. |
||
| 632 | * |
||
| 633 | * @return array The array with the subject's callback mappings |
||
| 634 | */ |
||
| 635 | public function getCallbackMappings() |
||
| 639 | |||
| 640 | /** |
||
| 641 | * Imports the content of the file with the passed filename. |
||
| 642 | * |
||
| 643 | * |
||
| 644 | * @param string $serial The serial of the actual import |
||
| 645 | * @param string $filename The filename to process |
||
| 646 | * |
||
| 647 | * @return void |
||
| 648 | * @throws \Exception Is thrown, if the import can't be processed |
||
| 649 | */ |
||
| 650 | public function import($serial, $filename) |
||
| 726 | |||
| 727 | /** |
||
| 728 | * Imports the passed row into the database. If the import failed, the exception |
||
| 729 | * will be catched and logged, but the import process will be continued. |
||
| 730 | * |
||
| 731 | * @param array $row The row with the data to be imported |
||
| 732 | * |
||
| 733 | * @return void |
||
| 734 | */ |
||
| 735 | public function importRow(array $row) |
||
| 818 | |||
| 819 | /** |
||
| 820 | * Queries whether or not that the subject needs an OK file to be processed. |
||
| 821 | * |
||
| 822 | * @return boolean TRUE if the subject needs an OK file, else FALSE |
||
| 823 | */ |
||
| 824 | public function isOkFileNeeded() |
||
| 828 | |||
| 829 | /** |
||
| 830 | * Return's the default store. |
||
| 831 | * |
||
| 832 | * @return array The default store |
||
| 833 | */ |
||
| 834 | public function getDefaultStore() |
||
| 838 | |||
| 839 | /** |
||
| 840 | * Return's the default store view code. |
||
| 841 | * |
||
| 842 | * @return array The default store view code |
||
| 843 | */ |
||
| 844 | public function getDefaultStoreViewCode() |
||
| 848 | |||
| 849 | /** |
||
| 850 | * Set's the store view code the create the product/attributes for. |
||
| 851 | * |
||
| 852 | * @param string $storeViewCode The store view code |
||
| 853 | * |
||
| 854 | * @return void |
||
| 855 | */ |
||
| 856 | public function setStoreViewCode($storeViewCode) |
||
| 860 | |||
| 861 | /** |
||
| 862 | * Return's the store view code the create the product/attributes for. |
||
| 863 | * |
||
| 864 | * @param string|null $default The default value to return, if the store view code has not been set |
||
| 865 | * |
||
| 866 | * @return string The store view code |
||
| 867 | */ |
||
| 868 | public function getStoreViewCode($default = null) |
||
| 885 | |||
| 886 | /** |
||
| 887 | * Prepare's the store view code in the subject. If the store_view_code row doesn't contain |
||
| 888 | * any value, the default code of the default store view will be set. |
||
| 889 | * |
||
| 890 | * @return void |
||
| 891 | */ |
||
| 892 | public function prepareStoreViewCode() |
||
| 903 | |||
| 904 | /** |
||
| 905 | * Return's the store ID of the store with the passed store view code |
||
| 906 | * |
||
| 907 | * @param string $storeViewCode The store view code to return the store ID for |
||
| 908 | * |
||
| 909 | * @return integer The ID of the store with the passed ID |
||
| 910 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
| 911 | */ |
||
| 912 | public function getStoreId($storeViewCode) |
||
| 930 | |||
| 931 | /** |
||
| 932 | * Return's the store ID of the actual row, or of the default store |
||
| 933 | * if no store view code is set in the CSV file. |
||
| 934 | * |
||
| 935 | * @param string|null $default The default store view code to use, if no store view code is set in the CSV file |
||
| 936 | * |
||
| 937 | * @return integer The ID of the actual store |
||
| 938 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
| 939 | */ |
||
| 940 | public function getRowStoreId($default = null) |
||
| 951 | |||
| 952 | /** |
||
| 953 | * Return's the root category for the actual view store. |
||
| 954 | * |
||
| 955 | * @return array The store's root category |
||
| 956 | * @throws \Exception Is thrown if the root category for the passed store code is NOT available |
||
| 957 | */ |
||
| 958 | public function getRootCategory() |
||
| 972 | |||
| 973 | /** |
||
| 974 | * Return's the Magento configuration value. |
||
| 975 | * |
||
| 976 | * @param string $path The Magento path of the requested configuration value |
||
| 977 | * @param mixed $default The default value that has to be returned, if the requested configuration value is not set |
||
| 978 | * @param string $scope The scope the configuration value has been set |
||
| 979 | * @param integer $scopeId The scope ID the configuration value has been set |
||
| 980 | * |
||
| 981 | * @return mixed The configuration value |
||
| 982 | * @throws \Exception Is thrown, if nor a value can be found or a default value has been passed |
||
| 983 | */ |
||
| 984 | public function getCoreConfigData($path, $default = null, $scope = ScopeKeys::SCOPE_DEFAULT, $scopeId = 0) |
||
| 1060 | |||
| 1061 | /** |
||
| 1062 | * Resolve the original column name for the passed one. |
||
| 1063 | * |
||
| 1064 | * @param string $columnName The column name that has to be resolved |
||
| 1065 | * |
||
| 1066 | * @return string|null The original column name |
||
| 1067 | */ |
||
| 1068 | public function resolveOriginalColumnName($columnName) |
||
| 1090 | |||
| 1091 | /** |
||
| 1092 | * Return's the original data if available, or an empty array. |
||
| 1093 | * |
||
| 1094 | * @return array The original data |
||
| 1095 | */ |
||
| 1096 | public function getOriginalData() |
||
| 1111 | |||
| 1112 | /** |
||
| 1113 | * Query's whether or not the actual column contains original data like |
||
| 1114 | * filename, line number and column names. |
||
| 1115 | * |
||
| 1116 | * @return boolean TRUE if the actual column contains origin data, else FALSE |
||
| 1117 | */ |
||
| 1118 | public function hasOriginalData() |
||
| 1122 | |||
| 1123 | /** |
||
| 1124 | * Wraps the passed exeception into a new one by trying to resolve the original filname, |
||
| 1125 | * line number and column names and use it for a detailed exception message. |
||
| 1126 | * |
||
| 1127 | * @param array $columnNames The column names that should be resolved and wrapped |
||
| 1128 | * @param \Exception $parent The exception we want to wrap |
||
| 1129 | * @param string $className The class name of the exception type we want to wrap the parent one |
||
| 1130 | * |
||
| 1131 | * @return \Exception the wrapped exception |
||
| 1132 | */ |
||
| 1133 | public function wrapException( |
||
| 1177 | |||
| 1178 | /** |
||
| 1179 | * Strip's the exception suffix containing filename and line number from the |
||
| 1180 | * passed message. |
||
| 1181 | * |
||
| 1182 | * @param string $message The message to strip the exception suffix from |
||
| 1183 | * |
||
| 1184 | * @return mixed The message without the exception suffix |
||
| 1185 | */ |
||
| 1186 | public function stripExceptionSuffix($message) |
||
| 1190 | |||
| 1191 | /** |
||
| 1192 | * Append's the exception suffix containing filename and line number to the |
||
| 1193 | * passed message. If no message has been passed, only the suffix will be |
||
| 1194 | * returned |
||
| 1195 | * |
||
| 1196 | * @param string|null $message The message to append the exception suffix to |
||
| 1197 | * @param string|null $filename The filename used to create the suffix |
||
| 1198 | * @param string|null $lineNumber The line number used to create the suffx |
||
| 1199 | * |
||
| 1200 | * @return string The message with the appended exception suffix |
||
| 1201 | */ |
||
| 1202 | public function appendExceptionSuffix($message = null, $filename = null, $lineNumber = null) |
||
| 1223 | |||
| 1224 | /** |
||
| 1225 | * Raises the value for the counter with the passed key by one. |
||
| 1226 | * |
||
| 1227 | * @param mixed $counterName The name of the counter to raise |
||
| 1228 | * |
||
| 1229 | * @return integer The counter's new value |
||
| 1230 | */ |
||
| 1231 | public function raiseCounter($counterName) |
||
| 1240 | |||
| 1241 | /** |
||
| 1242 | * Merge the passed array into the status of the actual import. |
||
| 1243 | * |
||
| 1244 | * @param array $status The status information to be merged |
||
| 1245 | * |
||
| 1246 | * @return void |
||
| 1247 | */ |
||
| 1248 | public function mergeAttributesRecursive(array $status) |
||
| 1257 | } |
||
| 1258 |
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..