Code Duplication    Length = 15-15 lines in 3 locations

src/CTe/Dacte.php 1 location

@@ 3472-3486 (lines=15) @@
3469
     * @param  number $n Numero de traços na seção da linha com o comprimento $w
3470
     * @return none
3471
     */
3472
    protected function zhDashedVerticalLine($x, $y, $w, $yfinal, $n)
3473
    {
3474
        $this->pdf->SetLineWidth($w);
3475
        /* Organizando valores */
3476
        if ($y > $yfinal) {
3477
            $aux = $yfinal;
3478
            $yfinal = $y;
3479
            $y = $aux;
3480
        }
3481
        while ($y < $yfinal && $n > 0) {
3482
            $this->pdf->Line($x, $y, $x, $y + 1);
3483
            $y += 3;
3484
            $n--;
3485
        }
3486
    } //fim função hDashedVerticalLine
3487
3488
    /**
3489
     * zFormatCNPJCPF

src/Legacy/Pdf.php 1 location

@@ 824-838 (lines=15) @@
821
    * @param   number $n      Numero de traços na seção da linha com o comprimento $w
822
    * @return  none
823
    */
824
    public function dashedVLine($x, $y, $w, $yfinal, $n)
825
    {
826
        $this->setLineWidth($w);
827
        //Organizando valores
828
        if ($y > $yfinal) {
829
            $aux = $yfinal;
830
            $yfinal = $y;
831
            $y = $aux;
832
        }
833
        while ($y < $yfinal && $n > 0) {
834
            $this->line($x, $y, $x, $y+1);
835
            $y += 3;
836
            $n--;
837
        }
838
    }
839
}
840

src/CTe/DacteV3.php 1 location

@@ 3261-3275 (lines=15) @@
3258
     * @param  number $n Numero de traços na seção da linha com o comprimento $w
3259
     * @return none
3260
     */
3261
    protected function zhDashedVerticalLine($x, $y, $w, $yfinal, $n)
3262
    {
3263
        $this->pdf->SetLineWidth($w);
3264
        /* Organizando valores */
3265
        if ($y > $yfinal) {
3266
            $aux = $yfinal;
3267
            $yfinal = $y;
3268
            $y = $aux;
3269
        }
3270
        while ($y < $yfinal && $n > 0) {
3271
            $this->pdf->Line($x, $y, $x, $y + 1);
3272
            $y += 3;
3273
            $n--;
3274
        }
3275
    } //fim função hDashedVerticalLine
3276
3277
    /**
3278
     * zFormatCNPJCPF