Code Duplication    Length = 3-4 lines in 4 locations

src/Tools.php 4 locations

@@ 724-726 (lines=3) @@
721
        if ($nIni == '' || $nFin == '' || $xJust == '') {
722
            $msg = "Não foi passado algum dos parametos necessários"
723
                    . "inicio=$nIni fim=$nFin justificativa=$xJust.";
724
        } elseif (strlen($nSerie) == 0 || strlen($nSerie) > 3) {
725
            $msg = "O campo serie está errado: $nSerie. Corrija e refaça o processo!!";
726
        } elseif (strlen($nIni) < 1 || strlen($nIni) > 9) {
727
            $msg = "O campo numero inicial está errado: $nIni. Corrija e refaça o processo!!";
728
        } elseif (strlen($nFin) < 1 || strlen($nFin) > 9) {
729
            $msg = "O campo numero final está errado: $nFin. Corrija e refaça o processo!!";
@@ 811-814 (lines=4) @@
808
            $msg = "Informe o ano com 2 digitos";
809
            throw new Exception\InvalidArgumentException($msg);
810
        }
811
        if (strlen($nSerie) == 0 || strlen($nSerie) > 3) {
812
            $msg = "O campo serie está errado: $nSerie. usar 3 digitos";
813
            throw new Exception\InvalidArgumentException($msg);
814
        }
815
        if (strlen($nIni) < 1 || strlen($nIni) > 9) {
816
            $msg = "O campo numero inicial está errado: $nIni. Corrija e refaça o processo!!";
817
            throw new Exception\InvalidArgumentException($msg);
@@ 815-818 (lines=4) @@
812
            $msg = "O campo serie está errado: $nSerie. usar 3 digitos";
813
            throw new Exception\InvalidArgumentException($msg);
814
        }
815
        if (strlen($nIni) < 1 || strlen($nIni) > 9) {
816
            $msg = "O campo numero inicial está errado: $nIni. Corrija e refaça o processo!!";
817
            throw new Exception\InvalidArgumentException($msg);
818
        }
819
        if (strlen($nFin) < 1 || strlen($nFin) > 9) {
820
            $msg = "O campo numero final está errado: $nFin. Corrija e refaça o processo!!";
821
            throw new Exception\InvalidArgumentException($msg);
@@ 819-822 (lines=4) @@
816
            $msg = "O campo numero inicial está errado: $nIni. Corrija e refaça o processo!!";
817
            throw new Exception\InvalidArgumentException($msg);
818
        }
819
        if (strlen($nFin) < 1 || strlen($nFin) > 9) {
820
            $msg = "O campo numero final está errado: $nFin. Corrija e refaça o processo!!";
821
            throw new Exception\InvalidArgumentException($msg);
822
        }
823
        if (strlen($xJust) < 15 || strlen($xJust) > 255) {
824
            $msg = "O campo justificativa deve ter no minimo 15 chars e no maximo 255, verifique!";
825
            throw new Exception\InvalidArgumentException($msg);