| Total Complexity | 4 |
| Total Lines | 89 |
| Duplicated Lines | 40.45 % |
| Changes | 0 | ||
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:
| 1 | <?php |
||
| 19 | class EcondaFacade extends AbstractFacade implements EcondaFacadeInterface |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @api |
||
| 24 | * |
||
| 25 | * @param string $type |
||
| 26 | * @param string $locale |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public function getFileContent($type, $locale) |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Specification: |
||
| 37 | * - Initiates export into a file |
||
| 38 | * |
||
| 39 | * @api |
||
| 40 | * |
||
| 41 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
| 42 | * |
||
| 43 | * @return \SprykerEco\Zed\Econda\Business\Model\BatchResultInterface[] |
||
| 44 | */ |
||
| 45 | public function exportFile(OutputInterface $output) |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @api |
||
| 53 | * |
||
| 54 | * @param \Generated\Shared\Transfer\LocaleTransfer $localeTransfer |
||
| 55 | * @param \SprykerEco\Zed\Econda\Business\Model\BatchResultInterface $result |
||
| 56 | * @param \SprykerEco\Zed\Econda\Business\Exporter\Writer\WriterInterface $dataWriter |
||
| 57 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
| 58 | * |
||
| 59 | * @return void |
||
| 60 | */ |
||
| 61 | View Code Duplication | public function exportCategories( |
|
|
1 ignored issue
–
show
|
|||
| 62 | LocaleTransfer $localeTransfer, |
||
| 63 | BatchResultInterface $result, |
||
| 64 | WriterInterface $dataWriter, |
||
| 65 | OutputInterface $output |
||
| 66 | ) { |
||
| 67 | $collector = $this->getFactory() |
||
| 68 | ->createFileCategoryCollector(); |
||
| 69 | |||
| 70 | $this->getFactory() |
||
| 71 | ->createCollectorManager() |
||
| 72 | ->runCollector( |
||
| 73 | $collector, |
||
| 74 | $localeTransfer, |
||
| 75 | $result, |
||
| 76 | $dataWriter, |
||
| 77 | $output |
||
| 78 | ); |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @api |
||
| 83 | * |
||
| 84 | * @param \Generated\Shared\Transfer\LocaleTransfer $localeTransfer |
||
| 85 | * @param \SprykerEco\Zed\Econda\Business\Model\BatchResultInterface $result |
||
| 86 | * @param \SprykerEco\Zed\Econda\Business\Exporter\Writer\WriterInterface $dataWriter |
||
| 87 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
| 88 | * |
||
| 89 | * @return void |
||
| 90 | */ |
||
| 91 | View Code Duplication | public function exportProducts( |
|
| 108 | ); |
||
| 109 | } |
||
| 112 |
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