Code Duplication    Length = 5-5 lines in 2 locations

src/Tokenizers/PHP.php 1 location

@@ 1475-1479 (lines=5) @@
1472
            // not whatever it already is. The opener needs to be the opening curly
1473
            // brace so everything matches up.
1474
            $newCloser = $this->tokens[$x]['bracket_closer'];
1475
            foreach (array($i, $x, $newCloser) as $index) {
1476
                $this->tokens[$index]['scope_condition'] = $i;
1477
                $this->tokens[$index]['scope_opener']    = $x;
1478
                $this->tokens[$index]['scope_closer']    = $newCloser;
1479
            }
1480
1481
            unset($this->tokens[$scopeOpener]['scope_condition']);
1482
            unset($this->tokens[$scopeOpener]['scope_opener']);

src/Tokenizers/Tokenizer.php 1 location

@@ 1029-1033 (lines=5) @@
1026
                            echo "=> Found (unexpected) scope closer for $stackPtr:$type".PHP_EOL;
1027
                        }
1028
1029
                        foreach (array($stackPtr, $opener) as $token) {
1030
                            $this->tokens[$token]['scope_condition'] = $stackPtr;
1031
                            $this->tokens[$token]['scope_opener']    = $opener;
1032
                            $this->tokens[$token]['scope_closer']    = $i;
1033
                        }
1034
1035
                        return ($i - 1);
1036
                    }//end if