Code Duplication    Length = 9-9 lines in 2 locations

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

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

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

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