src/YearMonth.php
public function plusYears(int $years) : YearMonth
    {
        if ($years === 0) {
            return $this;
        }

        return $this->withYear($this->year + $years);
    }
public function plusYears(int $years) : YearMonth
    {
        if ($years === 0) {
            return $this;
        }

        return $this->withYear($this->year + $years);
    }
public function plusYears ( int $ years ) : YearMonth { if ( $ years === 0 ) { return $ this ; } return $ this -> withYear ( $ this -> year + $ years ) ; }
Returns a copy of this YearMonth with the specified period in years added.

@param int $years

@return YearMonth
Returns a copy of this YearMonth with the specified period in years added .