Code Duplication    Length = 12-12 lines in 2 locations

src/CTe/Dacte.php 1 location

@@ 3448-3459 (lines=12) @@
3445
     * @param  number $n Numero de traços na seção da linha com o comprimento $w
3446
     * @return none
3447
     */
3448
    protected function zhDashedLine($x, $y, $w, $h, $n)
3449
    {
3450
        $this->pdf->SetLineWidth($h);
3451
        $wDash = ($w / $n) / 2; // comprimento dos traços
3452
        for ($i = $x; $i <= $x + $w; $i += $wDash + $wDash) {
3453
            for ($j = $i; $j <= ($i + $wDash); $j++) {
3454
                if ($j <= ($x + $w - 1)) {
3455
                    $this->pdf->Line($j, $y, $j + 1, $y);
3456
                }
3457
            }
3458
        }
3459
    } //fim função hDashedLine
3460
3461
    /**
3462
     * zhDashedVerticalLine

src/CTe/DacteV3.php 1 location

@@ 3237-3248 (lines=12) @@
3234
     * @param  number $n Numero de traços na seção da linha com o comprimento $w
3235
     * @return none
3236
     */
3237
    protected function zhDashedLine($x, $y, $w, $h, $n)
3238
    {
3239
        $this->pdf->SetLineWidth($h);
3240
        $wDash = ($w / $n) / 2; // comprimento dos traços
3241
        for ($i = $x; $i <= $x + $w; $i += $wDash + $wDash) {
3242
            for ($j = $i; $j <= ($i + $wDash); $j++) {
3243
                if ($j <= ($x + $w - 1)) {
3244
                    $this->pdf->Line($j, $y, $j + 1, $y);
3245
                }
3246
            }
3247
        }
3248
    } //fim função hDashedLine
3249
3250
    /**
3251
     * zhDashedVerticalLine