Code Duplication    Length = 9-9 lines in 2 locations

src/OroCRM/Bundle/MagentoBundle/Entity/Repository/CartRepository.php 1 location

@@ 57-65 (lines=9) @@
54
        // regular and final steps should be calculated separately
55
        $regularSteps = [];
56
        $finalSteps   = [];
57
        foreach ($steps as $step) {
58
            if (!in_array($step->getName(), $this->excludedSteps)) {
59
                if ($step->isFinal()) {
60
                    $finalSteps[] = $step->getName();
61
                } else {
62
                    $regularSteps[] = $step->getName();
63
                }
64
            }
65
        }
66
67
        // regular steps should be calculated for whole period, final steps - for specified period
68
        $regularStepsData = $this->getStepData($regularSteps, null, null, $aclHelper);

src/OroCRM/Bundle/SalesBundle/Entity/Repository/SalesFunnelRepository.php 1 location

@@ 50-58 (lines=9) @@
47
        // regular and final steps should be calculated separately
48
        $regularSteps = [];
49
        $finalSteps   = [];
50
        foreach ($steps as $step) {
51
            if (!in_array($step->getName(), $this->excludedSteps)) {
52
                if ($step->isFinal()) {
53
                    $finalSteps[] = $step->getName();
54
                } else {
55
                    $regularSteps[] = $step->getName();
56
                }
57
            }
58
        }
59
60
        // regular steps should be calculated for whole period, final steps - for specified period
61
        $regularStepsData = $this->getStepData($regularSteps, null, null, $customStepCalculations, $aclHelper);