Code Duplication    Length = 19-19 lines in 2 locations

src/Files/File.php 2 locations

@@ 531-549 (lines=19) @@
528
     *
529
     * @return boolean
530
     */
531
    public function addError(
532
        $error,
533
        $stackPtr,
534
        $code,
535
        $data=array(),
536
        $severity=0,
537
        $fixable=false
538
    ) {
539
        if ($stackPtr === null) {
540
            $line   = 1;
541
            $column = 1;
542
        } else {
543
            $line   = $this->tokens[$stackPtr]['line'];
544
            $column = $this->tokens[$stackPtr]['column'];
545
        }
546
547
        return $this->addMessage(true, $error, $line, $column, $code, $data, $severity, $fixable);
548
549
    }//end addError()
550
551
552
    /**
@@ 565-583 (lines=19) @@
562
     *
563
     * @return boolean
564
     */
565
    public function addWarning(
566
        $warning,
567
        $stackPtr,
568
        $code,
569
        $data=array(),
570
        $severity=0,
571
        $fixable=false
572
    ) {
573
        if ($stackPtr === null) {
574
            $line   = 1;
575
            $column = 1;
576
        } else {
577
            $line   = $this->tokens[$stackPtr]['line'];
578
            $column = $this->tokens[$stackPtr]['column'];
579
        }
580
581
        return $this->addMessage(false, $warning, $line, $column, $code, $data, $severity, $fixable);
582
583
    }//end addWarning()
584
585
586
    /**