Code Duplication    Length = 9-9 lines in 2 locations

Salariu/InputValidation.php 1 location

@@ 100-108 (lines=9) @@
97
        $lngDate    = $tCSG->get('ym');
98
        $intValue   = 0;
99
        $maxCounter = count($inMny['EMW']);
100
        for ($counter = 0; $counter < $maxCounter; $counter++) {
101
            $crtVal         = $inMny['EMW'][$counter];
102
            $crtDV          = \DateTime::createFromFormat('Y-n-j', $crtVal['Year'] . '-' . $crtVal['Month'] . '-1');
103
            $crtDateOfValue = (int) $crtDV->format('Ymd');
104
            if (($lngDate <= $inMny['YM range']['maximumInt']) && ($lngDate >= $crtDateOfValue)) {
105
                $intValue = $crtVal['Value'];
106
                $counter  = $maxCounter;
107
            }
108
        }
109
        return $intValue;
110
    }
111

Salariu/Taxation.php 1 location

@@ 47-55 (lines=9) @@
44
    {
45
        $intValue   = 0;
46
        $maxCounter = count($inMny);
47
        for ($counter = 0; $counter < $maxCounter; $counter++) {
48
            $crtVal         = $inMny[$counter];
49
            $crtDV          = \DateTime::createFromFormat('Y-n-j', $crtVal['Year'] . '-' . $crtVal['Month'] . '-01');
50
            $crtDateOfValue = (int) $crtDV->format('Ymd');
51
            if (($yearMonth <= $dtR['maximumInt']) && ($yearMonth >= $crtDateOfValue)) {
52
                $intValue = $crtVal['Percentage'];
53
                $counter  = $maxCounter;
54
            }
55
        }
56
        return $intValue;
57
    }
58