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 Simple 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 Simple, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
52 | class Simple |
||
53 | { |
||
54 | |||
55 | /** |
||
56 | * The default style to write messages to the symfony console. |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | const DEFAULT_STYLE = 'info'; |
||
61 | |||
62 | /** |
||
63 | * The TechDivision company name as ANSI art. |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | protected $ansiArt = ' _______ _ _____ _ _ _ |
||
68 | |__ __| | | | __ \(_) (_) (_) |
||
69 | | | ___ ___| |__ | | | |___ ___ ___ _ ___ _ __ |
||
70 | | |/ _ \/ __| \'_ \| | | | \ \ / / / __| |/ _ \| \'_ \ |
||
71 | | | __/ (__| | | | |__| | |\ V /| \__ \ | (_) | | | | |
||
72 | |_|\___|\___|_| |_|_____/|_| \_/ |_|___/_|\___/|_| |_| |
||
73 | '; |
||
74 | |||
75 | /** |
||
76 | * The log level => console style mapping. |
||
77 | * |
||
78 | * @var array |
||
79 | */ |
||
80 | protected $logLevelStyleMapping = array( |
||
81 | LogLevel::INFO => 'info', |
||
82 | LogLevel::DEBUG => 'comment', |
||
83 | LogLevel::ERROR => 'error', |
||
84 | LogLevel::ALERT => 'error', |
||
85 | LogLevel::CRITICAL => 'error', |
||
86 | LogLevel::EMERGENCY => 'error', |
||
87 | LogLevel::WARNING => 'error', |
||
88 | LogLevel::NOTICE => 'info' |
||
89 | ); |
||
90 | |||
91 | /** |
||
92 | * The actions unique serial. |
||
93 | * |
||
94 | * @var string |
||
95 | */ |
||
96 | protected $serial; |
||
97 | |||
98 | /** |
||
99 | * The system logger implementation. |
||
100 | * |
||
101 | * @var \Psr\Log\LoggerInterface |
||
102 | */ |
||
103 | protected $systemLogger; |
||
104 | |||
105 | /** |
||
106 | * The RegistryProcessor instance to handle running threads. |
||
107 | * |
||
108 | * @var \TechDivision\Import\Services\RegistryProcessorInterface |
||
109 | */ |
||
110 | protected $registryProcessor; |
||
111 | |||
112 | /** |
||
113 | * The processor to read/write the necessary import data. |
||
114 | * |
||
115 | * @var \TechDivision\Import\Services\ImportProcessorInterface |
||
116 | */ |
||
117 | protected $importProcessor; |
||
118 | |||
119 | /** |
||
120 | * The system configuration. |
||
121 | * |
||
122 | * @var \TechDivision\Import\ConfigurationInterface |
||
123 | */ |
||
124 | protected $configuration; |
||
125 | |||
126 | /** |
||
127 | * The input stream to read console information from. |
||
128 | * |
||
129 | * @var \Symfony\Component\Console\Input\InputInterface |
||
130 | */ |
||
131 | protected $input; |
||
132 | |||
133 | /** |
||
134 | * The output stream to write console information to. |
||
135 | * |
||
136 | * @var \Symfony\Component\Console\Output\OutputInterface |
||
137 | */ |
||
138 | protected $output; |
||
139 | |||
140 | /** |
||
141 | * The matches for the last processed CSV filename. |
||
142 | * |
||
143 | * @var array |
||
144 | */ |
||
145 | protected $matches = array(); |
||
146 | |||
147 | /** |
||
148 | * Set's the unique serial for this import process. |
||
149 | * |
||
150 | * @param string $serial The unique serial |
||
151 | * |
||
152 | * @return void |
||
153 | */ |
||
154 | public function setSerial($serial) |
||
155 | { |
||
156 | $this->serial = $serial; |
||
157 | } |
||
158 | |||
159 | /** |
||
160 | * Return's the unique serial for this import process. |
||
161 | * |
||
162 | * @return string The unique serial |
||
163 | */ |
||
164 | public function getSerial() |
||
165 | { |
||
166 | return $this->serial; |
||
167 | } |
||
168 | |||
169 | /** |
||
170 | * Set's the system logger. |
||
171 | * |
||
172 | * @param \Psr\Log\LoggerInterface $systemLogger The system logger |
||
173 | * |
||
174 | * @return void |
||
175 | */ |
||
176 | public function setSystemLogger(LoggerInterface $systemLogger) |
||
177 | { |
||
178 | $this->systemLogger = $systemLogger; |
||
179 | } |
||
180 | |||
181 | /** |
||
182 | * Return's the system logger. |
||
183 | * |
||
184 | * @return \Psr\Log\LoggerInterface The system logger instance |
||
185 | */ |
||
186 | public function getSystemLogger() |
||
187 | { |
||
188 | return $this->systemLogger; |
||
189 | } |
||
190 | |||
191 | /** |
||
192 | * Sets's the RegistryProcessor instance to handle the running threads. |
||
193 | * |
||
194 | * @param \TechDivision\Import\Services\RegistryProcessorInterface $registryProcessor The registry processor instance |
||
195 | * |
||
196 | * @return void |
||
197 | */ |
||
198 | public function setRegistryProcessor(RegistryProcessorInterface $registryProcessor) |
||
199 | { |
||
200 | $this->registryProcessor = $registryProcessor; |
||
201 | } |
||
202 | |||
203 | /** |
||
204 | * Return's the RegistryProcessor instance to handle the running threads. |
||
205 | * |
||
206 | * @return \TechDivision\Import\Services\RegistryProcessor The registry processor instance |
||
207 | */ |
||
208 | public function getRegistryProcessor() |
||
209 | { |
||
210 | return $this->registryProcessor; |
||
211 | } |
||
212 | |||
213 | /** |
||
214 | * Set's the import processor instance. |
||
215 | * |
||
216 | * @param \TechDivision\Import\Services\ImportProcessorInterface $importProcessor The import processor instance |
||
217 | * |
||
218 | * @return void |
||
219 | */ |
||
220 | 1 | public function setImportProcessor(ImportProcessorInterface $importProcessor) |
|
224 | |||
225 | /** |
||
226 | * Return's the import processor instance. |
||
227 | * |
||
228 | * @return \TechDivision\Import\Services\ImportProcessorInterface The import processor instance |
||
229 | */ |
||
230 | 1 | public function getImportProcessor() |
|
234 | |||
235 | /** |
||
236 | * Set's the system configuration. |
||
237 | * |
||
238 | * @param \TechDivision\Import\ConfigurationInterface $configuration The system configuration |
||
239 | * |
||
240 | * @return void |
||
241 | */ |
||
242 | public function setConfiguration(ConfigurationInterface $configuration) |
||
243 | { |
||
244 | $this->configuration = $configuration; |
||
245 | } |
||
246 | |||
247 | /** |
||
248 | * Return's the system configuration. |
||
249 | * |
||
250 | * @return \TechDivision\Import\ConfigurationInterface The system configuration |
||
251 | */ |
||
252 | public function getConfiguration() |
||
253 | { |
||
254 | return $this->configuration; |
||
255 | } |
||
256 | |||
257 | /** |
||
258 | * Set's the input stream to read console information from. |
||
259 | * |
||
260 | * @param \Symfony\Component\Console\Input\InputInterface $input An IutputInterface instance |
||
261 | * |
||
262 | * @return void |
||
263 | */ |
||
264 | public function setInput(InputInterface $input) |
||
268 | |||
269 | /** |
||
270 | * Return's the input stream to read console information from. |
||
271 | * |
||
272 | * @return \Symfony\Component\Console\Input\InputInterface An IutputInterface instance |
||
273 | */ |
||
274 | protected function getInput() |
||
278 | |||
279 | /** |
||
280 | * Set's the output stream to write console information to. |
||
281 | * |
||
282 | * @param \Symfony\Component\Console\Output\OutputInterface $output An OutputInterface instance |
||
283 | * |
||
284 | * @return void |
||
285 | */ |
||
286 | public function setOutput(OutputInterface $output) |
||
290 | |||
291 | /** |
||
292 | * Return's the output stream to write console information to. |
||
293 | * |
||
294 | * @return \Symfony\Component\Console\Output\OutputInterface An OutputInterface instance |
||
295 | */ |
||
296 | protected function getOutput() |
||
300 | |||
301 | /** |
||
302 | * Return's the source directory that has to be watched for new files. |
||
303 | * |
||
304 | * @return string The source directory |
||
305 | */ |
||
306 | protected function getSourceDir() |
||
307 | { |
||
308 | return $this->getConfiguration()->getSourceDir(); |
||
309 | } |
||
310 | |||
311 | /** |
||
312 | * Parse the temporary upload directory for new files to be imported. |
||
313 | * |
||
314 | * @return void |
||
315 | * @throws \Exception Is thrown if the import can't be finished successfully |
||
316 | */ |
||
317 | public function import() |
||
318 | { |
||
319 | |||
320 | // track the start time |
||
321 | $startTime = microtime(true); |
||
322 | |||
323 | try { |
||
324 | // generate the serial for the new job |
||
325 | $this->setSerial(Uuid::uuid4()->__toString()); |
||
326 | |||
327 | // prepare the global data for the import process |
||
328 | $this->start(); |
||
329 | $this->setUp(); |
||
330 | $this->processSubjects(); |
||
331 | $this->archive(); |
||
332 | $this->tearDown(); |
||
333 | $this->finish(); |
||
334 | |||
335 | // track the time needed for the import in seconds |
||
336 | $endTime = microtime(true) - $startTime; |
||
337 | |||
338 | // log a message that import has been finished |
||
339 | $this->log(sprintf('Successfully finished import with serial %s in %f s', $this->getSerial(), $endTime), LogLevel::INFO); |
||
340 | |||
|
|||
341 | } catch (\Exception $e) { |
||
342 | // tear down |
||
343 | $this->tearDown(); |
||
344 | $this->finish(); |
||
345 | |||
346 | // track the time needed for the import in seconds |
||
347 | $endTime = microtime(true) - $startTime; |
||
348 | |||
349 | // log a message that the file import failed |
||
350 | $this->getSystemLogger()->error($e->__toString()); |
||
351 | |||
352 | // log a message that import has been finished |
||
353 | $this->log(sprintf('Can\'t finish import with serial %s in %f s', $this->getSerial(), $endTime), LogLevel::ERROR); |
||
354 | |||
355 | // re-throw the exception |
||
356 | throw $e; |
||
357 | } |
||
358 | } |
||
359 | |||
360 | /** |
||
361 | * This method start's the import process by initializing |
||
362 | * the status and appends it to the registry. |
||
363 | * |
||
364 | * @return void |
||
365 | */ |
||
366 | protected function start() |
||
367 | { |
||
368 | |||
369 | // write the TechDivision ANSI art icon to the console |
||
370 | $this->log($this->ansiArt); |
||
371 | |||
372 | // log the debug information, if debug mode is enabled |
||
373 | if ($this->getConfiguration()->isDebugMode()) { |
||
374 | // log the system's PHP configuration |
||
375 | $this->log(sprintf('PHP version: %s', phpversion()), LogLevel::DEBUG); |
||
376 | $this->log('-------------------- Loaded Extensions -----------------------', LogLevel::DEBUG); |
||
377 | $this->log(implode(', ', $loadedExtensions = get_loaded_extensions()), LogLevel::DEBUG); |
||
378 | $this->log('--------------------------------------------------------------', LogLevel::DEBUG); |
||
379 | |||
380 | // write a warning for low performance, if XDebug extension is activated |
||
381 | if (in_array('xdebug', $loadedExtensions)) { |
||
382 | $this->log('Low performance exptected, as result of enabled XDebug extension!', LogLevel::WARNING); |
||
383 | } |
||
384 | } |
||
385 | |||
386 | // log a message that import has been started |
||
387 | $this->log(sprintf('Now start import with serial %s', $this->getSerial()), LogLevel::INFO); |
||
388 | |||
389 | // initialize the status |
||
390 | $status = array( |
||
391 | RegistryKeys::STATUS => 1, |
||
392 | RegistryKeys::SOURCE_DIRECTORY => $this->getConfiguration()->getSourceDir() |
||
393 | ); |
||
394 | |||
395 | // initialize the status information for the subjects */ |
||
396 | /** @var \TechDivision\Import\Configuration\SubjectInterface $subject */ |
||
397 | foreach ($this->getConfiguration()->getSubjects() as $subject) { |
||
398 | $status[$subject->getPrefix()] = array(); |
||
399 | } |
||
400 | |||
401 | // append it to the registry |
||
402 | $this->getRegistryProcessor()->setAttribute($this->getSerial(), $status); |
||
403 | } |
||
404 | |||
405 | /** |
||
406 | * Prepares the global data for the import process. |
||
407 | * |
||
408 | * @return void |
||
409 | */ |
||
410 | protected function setUp() |
||
411 | { |
||
412 | |||
413 | // load the registry |
||
414 | $importProcessor = $this->getImportProcessor(); |
||
415 | $registryProcessor = $this->getRegistryProcessor(); |
||
416 | |||
417 | // initialize the array for the global data |
||
418 | $globalData = array(); |
||
419 | |||
420 | // initialize the global data |
||
421 | $globalData[RegistryKeys::STORES] = $importProcessor->getStores(); |
||
422 | $globalData[RegistryKeys::LINK_TYPES] = $importProcessor->getLinkTypes(); |
||
423 | $globalData[RegistryKeys::TAX_CLASSES] = $importProcessor->getTaxClasses(); |
||
424 | $globalData[RegistryKeys::DEFAULT_STORE] = $importProcessor->getDefaultStore(); |
||
425 | $globalData[RegistryKeys::STORE_WEBSITES] = $importProcessor->getStoreWebsites(); |
||
426 | $globalData[RegistryKeys::LINK_ATTRIBUTES] = $importProcessor->getLinkAttributes(); |
||
427 | $globalData[RegistryKeys::ROOT_CATEGORIES] = $importProcessor->getRootCategories(); |
||
428 | $globalData[RegistryKeys::CORE_CONFIG_DATA] = $importProcessor->getCoreConfigData(); |
||
429 | $globalData[RegistryKeys::ATTRIBUTE_SETS] = $eavAttributeSets = $importProcessor->getEavAttributeSetsByEntityTypeId(4); |
||
430 | |||
431 | // prepare the categories |
||
432 | $categories = array(); |
||
433 | foreach ($importProcessor->getCategories() as $category) { |
||
434 | // expload the entity IDs from the category path |
||
435 | $entityIds = explode('/', $category[MemberNames::PATH]); |
||
436 | |||
437 | // cut-off the root category |
||
438 | array_shift($entityIds); |
||
439 | |||
440 | // continue with the next category if no entity IDs are available |
||
441 | if (sizeof($entityIds) === 0) { |
||
442 | continue; |
||
443 | } |
||
444 | |||
445 | // initialize the array for the path elements |
||
446 | $path = array(); |
||
447 | foreach ($importProcessor->getCategoryVarcharsByEntityIds($entityIds) as $cat) { |
||
448 | $path[] = $cat[MemberNames::VALUE]; |
||
449 | } |
||
450 | |||
451 | // append the catogory with the string path as key |
||
452 | $categories[implode('/', $path)] = $category; |
||
453 | } |
||
454 | |||
455 | // initialize the array with the categories |
||
456 | $globalData[RegistryKeys::CATEGORIES] = $categories; |
||
457 | |||
458 | // prepare an array with the EAV attributes grouped by their attribute set name as keys |
||
459 | $eavAttributes = array(); |
||
460 | foreach (array_keys($eavAttributeSets) as $eavAttributeSetName) { |
||
461 | $eavAttributes[$eavAttributeSetName] = $importProcessor->getEavAttributesByEntityTypeIdAndAttributeSetName(4, $eavAttributeSetName); |
||
462 | } |
||
463 | |||
464 | // initialize the array with the EAV attributes |
||
465 | $globalData[RegistryKeys::EAV_ATTRIBUTES] = $eavAttributes; |
||
466 | |||
467 | // add the status with the global data |
||
468 | $registryProcessor->mergeAttributesRecursive( |
||
469 | $this->getSerial(), |
||
470 | array(RegistryKeys::GLOBAL_DATA => $globalData) |
||
471 | ); |
||
472 | |||
473 | // log a message that the global data has been prepared |
||
474 | $this->log(sprintf('Successfully prepared global data for import with serial %s', $this->getSerial()), LogLevel::INFO); |
||
475 | } |
||
476 | |||
477 | /** |
||
478 | * Process all the subjects defined in the system configuration. |
||
479 | * |
||
480 | * @return void |
||
481 | * @throws \Exception Is thrown, if one of the subjects can't be processed |
||
482 | */ |
||
483 | protected function processSubjects() |
||
484 | { |
||
485 | |||
486 | try { |
||
487 | // load system logger and registry |
||
488 | $importProcessor = $this->getImportProcessor(); |
||
489 | |||
490 | // load the subjects |
||
491 | $subjects = $this->getConfiguration()->getSubjects(); |
||
492 | |||
493 | // start the transaction |
||
494 | $importProcessor->getConnection()->beginTransaction(); |
||
495 | |||
496 | // process all the subjects found in the system configuration |
||
497 | foreach ($subjects as $subject) { |
||
498 | $this->processSubject($subject); |
||
499 | } |
||
500 | |||
501 | // commit the transaction |
||
502 | $importProcessor->getConnection()->commit(); |
||
503 | |||
504 | } catch (\Exception $e) { |
||
505 | // rollback the transaction |
||
506 | $importProcessor->getConnection()->rollBack(); |
||
507 | |||
508 | // re-throw the exception |
||
509 | throw $e; |
||
510 | } |
||
511 | } |
||
512 | |||
513 | /** |
||
514 | * Process the subject with the passed name/identifier. |
||
515 | * |
||
516 | * We create a new, fresh and separate subject for EVERY file here, because this would be |
||
517 | * the starting point to parallelize the import process in a multithreaded/multiprocessed |
||
518 | * environment. |
||
519 | * |
||
520 | * @param \TechDivision\Import\Configuration\SubjectInterface $subject The subject configuration |
||
521 | * |
||
522 | * @return void |
||
523 | * @throws \Exception Is thrown, if the subject can't be processed |
||
524 | */ |
||
525 | protected function processSubject(\TechDivision\Import\Configuration\SubjectInterface $subject) |
||
526 | { |
||
527 | |||
528 | // clear the filecache |
||
529 | clearstatcache(); |
||
530 | |||
531 | // load the actual status |
||
532 | $status = $this->getRegistryProcessor()->getAttribute($this->getSerial()); |
||
533 | |||
534 | // query whether or not the configured source directory is available |
||
535 | View Code Duplication | if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) { |
|
536 | throw new \Exception(sprintf('Configured source directory %s is not available!', $sourceDir)); |
||
537 | } |
||
538 | |||
539 | // initialize the file iterator on source directory |
||
540 | $fileIterator = new \FilesystemIterator($sourceDir); |
||
541 | |||
542 | // log a debug message |
||
543 | $this->log(sprintf('Now checking directory %s for files to be imported', $sourceDir), LogLevel::DEBUG); |
||
544 | |||
545 | // initialize the counter for the bunches that has been imported |
||
546 | $bunches = 0; |
||
547 | |||
548 | // iterate through all CSV files and process the subjects |
||
549 | foreach ($fileIterator as $filename) { |
||
550 | // initialize prefix + pathname |
||
551 | $prefix = $subject->getPrefix(); |
||
552 | $pathname = $filename->getPathname(); |
||
553 | |||
554 | // query whether or not we've a file that is part of a bunch here |
||
555 | if ($this->isPartOfBunch($prefix, $pathname)) { |
||
556 | // initialize the subject and import the bunch |
||
557 | $subjectInstance = $this->subjectFactory($subject); |
||
558 | $subjectInstance->import($this->getSerial(), $pathname); |
||
559 | |||
560 | // query whether or not, we've to export artefacts |
||
561 | if ($subjectInstance instanceof ExportableSubjectInterface) { |
||
562 | $subjectInstance->export($this->matches[BunchKeys::FILENAME], $this->matches[BunchKeys::COUNTER]); |
||
563 | } |
||
564 | |||
565 | // raise the number of the imported bunches |
||
566 | $bunches++; |
||
567 | } |
||
568 | } |
||
569 | |||
570 | // reset the matches, because the exported artefacts |
||
571 | $this->matches = array(); |
||
572 | |||
573 | // and and log a message that the subject has been processed |
||
574 | $this->log(sprintf('Successfully processed subject %s with %d bunch(es)!', $subject->getClassName(), $bunches), LogLevel::DEBUG); |
||
575 | } |
||
576 | |||
577 | /** |
||
578 | * Queries whether or not, the passed filename is part of a bunch or not. |
||
579 | * |
||
580 | * @param string $prefix The prefix to query for |
||
581 | * @param string $filename The filename to query for |
||
582 | * |
||
583 | * @return boolean TRUE if the filename is part, else FALSE |
||
584 | */ |
||
585 | 2 | public function isPartOfBunch($prefix, $filename) |
|
625 | |||
626 | /** |
||
627 | * Factory method to create new handler instances. |
||
628 | * |
||
629 | * @param \TechDivision\Import\Configuration\Subject $subject The subject configuration |
||
630 | * |
||
631 | * @return object The handler instance |
||
632 | */ |
||
633 | public function subjectFactory($subject) |
||
634 | { |
||
635 | |||
636 | // load the subject class name |
||
637 | $className = $subject->getClassName(); |
||
638 | |||
639 | // the database connection to use |
||
640 | $connection = $this->getImportProcessor()->getConnection(); |
||
641 | |||
642 | // initialize a new handler with the passed class name |
||
643 | $instance = new $className(); |
||
644 | |||
645 | // $instance the handler instance |
||
646 | $instance->setConfiguration($subject); |
||
647 | $instance->setSystemLogger($this->getSystemLogger()); |
||
648 | $instance->setRegistryProcessor($this->getRegistryProcessor()); |
||
649 | |||
650 | // instanciate and set the product processor, if specified |
||
651 | if ($processorFactory = $subject->getProcessorFactory()) { |
||
652 | $productProcessor = $processorFactory::factory($connection, $subject); |
||
653 | $instance->setProductProcessor($productProcessor); |
||
654 | } |
||
655 | |||
656 | // initialize the callbacks/visitors |
||
657 | CallbackVisitor::get()->visit($instance); |
||
658 | ObserverVisitor::get()->visit($instance); |
||
659 | |||
660 | // return the subject instance |
||
661 | return $instance; |
||
662 | } |
||
663 | |||
664 | /** |
||
665 | * Lifecycle callback that will be inovked after the |
||
666 | * import process has been finished. |
||
667 | * |
||
668 | * @return void |
||
669 | * @throws \Exception Is thrown, if the |
||
670 | */ |
||
671 | protected function archive() |
||
732 | |||
733 | /** |
||
734 | * Removes the passed directory recursively. |
||
735 | * |
||
736 | * @param string $src Name of the directory to remove |
||
737 | * |
||
738 | * @return void |
||
739 | * @throws \Exception Is thrown, if the directory can not be removed |
||
740 | */ |
||
741 | protected function removeDir($src) |
||
767 | |||
768 | /** |
||
769 | * Simple method that writes the passed method the the console and the |
||
770 | * system logger, if configured and a log level has been passed. |
||
771 | * |
||
772 | * @param string $msg The message to log |
||
773 | * @param string $logLevel The log level to use |
||
774 | * |
||
775 | * @return void |
||
776 | */ |
||
777 | protected function log($msg, $logLevel = null) |
||
794 | |||
795 | /** |
||
796 | * Map's the passed log level to a valid symfony console style. |
||
797 | * |
||
798 | * @param string $logLevel The log level to map |
||
799 | * |
||
800 | * @return string The apropriate symfony console style |
||
801 | */ |
||
802 | protected function mapLogLevelToStyle($logLevel) |
||
813 | |||
814 | /** |
||
815 | * Lifecycle callback that will be inovked after the |
||
816 | * import process has been finished. |
||
817 | * |
||
818 | * @return void |
||
819 | * @throws \Exception Is thrown, if the |
||
820 | */ |
||
821 | protected function tearDown() |
||
822 | { |
||
823 | } |
||
824 | |||
825 | /** |
||
826 | * This method finishes the import process and cleans the registry. |
||
827 | * |
||
828 | * @return void |
||
829 | */ |
||
830 | protected function finish() |
||
834 | } |
||
835 |