Code Duplication    Length = 7-7 lines in 4 locations

src/Tokenizers/JS.php 1 location

@@ 797-803 (lines=7) @@
794
795
                for ($i = 0; $i < $numLines; $i++) {
796
                    $newToken['content'] = $tokenLines[$i];
797
                    if ($i === ($numLines - 1)) {
798
                        if ($tokenLines[$i] === '') {
799
                            break;
800
                        }
801
                    } else {
802
                        $newToken['content'] .= $this->eolChar;
803
                    }
804
805
                    $newToken['type']          = $token['type'];
806
                    $newToken['code']          = $token['code'];

src/Tokenizers/PHP.php 3 locations

@@ 604-610 (lines=7) @@
601
602
                for ($j = 0; $j < $numLines; $j++) {
603
                    $newToken['content'] = $tokenLines[$j];
604
                    if ($j === ($numLines - 1)) {
605
                        if ($tokenLines[$j] === '') {
606
                            break;
607
                        }
608
                    } else {
609
                        $newToken['content'] .= $this->eolChar;
610
                    }
611
612
                    $newToken['code']          = T_DOUBLE_QUOTED_STRING;
613
                    $newToken['type']          = 'T_DOUBLE_QUOTED_STRING';
@@ 687-693 (lines=7) @@
684
685
                for ($j = 0; $j < $numLines; $j++) {
686
                    $newToken['content'] = $tokenLines[$j];
687
                    if ($j === ($numLines - 1)) {
688
                        if ($tokenLines[$j] === '') {
689
                            break;
690
                        }
691
                    } else {
692
                        $newToken['content'] .= $this->eolChar;
693
                    }
694
695
                    if ($nowdoc === true) {
696
                        $newToken['code'] = T_NOWDOC;
@@ 981-987 (lines=7) @@
978
979
                for ($i = 0; $i < $numLines; $i++) {
980
                    $newToken['content'] = $tokenLines[$i];
981
                    if ($i === ($numLines - 1)) {
982
                        if ($tokenLines[$i] === '') {
983
                            break;
984
                        }
985
                    } else {
986
                        $newToken['content'] .= $this->eolChar;
987
                    }
988
989
                    $finalTokens[$newStackPtr] = $newToken;
990
                    $newStackPtr++;