Code Duplication    Length = 19-19 lines in 2 locations

src/Files/File.php 2 locations

@@ 571-589 (lines=19) @@
568
     *
569
     * @return boolean
570
     */
571
    public function addError(
572
        $error,
573
        $stackPtr,
574
        $code,
575
        $data=array(),
576
        $severity=0,
577
        $fixable=false
578
    ) {
579
        if ($stackPtr === null) {
580
            $line   = 1;
581
            $column = 1;
582
        } else {
583
            $line   = $this->tokens[$stackPtr]['line'];
584
            $column = $this->tokens[$stackPtr]['column'];
585
        }
586
587
        return $this->addMessage(true, $error, $line, $column, $code, $data, $severity, $fixable);
588
589
    }//end addError()
590
591
592
    /**
@@ 605-623 (lines=19) @@
602
     *
603
     * @return boolean
604
     */
605
    public function addWarning(
606
        $warning,
607
        $stackPtr,
608
        $code,
609
        $data=array(),
610
        $severity=0,
611
        $fixable=false
612
    ) {
613
        if ($stackPtr === null) {
614
            $line   = 1;
615
            $column = 1;
616
        } else {
617
            $line   = $this->tokens[$stackPtr]['line'];
618
            $column = $this->tokens[$stackPtr]['column'];
619
        }
620
621
        return $this->addMessage(false, $warning, $line, $column, $code, $data, $severity, $fixable);
622
623
    }//end addWarning()
624
625
626
    /**