src/LocalTime.php
public function withSecond(int $second) : LocalTime
    {
        if ($second === $this->second) {
            return $this;
        }

        Field\SecondOfMinute::check($second);

        return new LocalTime($this->hour, $this->minute, $second, $this->nano);
    }
public function withSecond(int $second) : LocalTime
    {
        if ($second === $this->second) {
            return $this;
        }

        Field\SecondOfMinute::check($second);

        return new LocalTime($this->hour, $this->minute, $second, $this->nano);
    }
public function withSecond ( int $ second ) : LocalTime { if ( $ second === $ this -> second ) { return $ this ; } Field \ SecondOfMinute :: check ( $ second ) ; return new LocalTime ( $ this -> hour , $ this -> minute , $ second , $ this -> nano ) ; }
Returns a copy of this LocalTime with the second-of-minute value altered.

@param int $second The new second-of-minute.

@return LocalTime

@throws DateTimeException If the second-of-minute if not valid.
Returns a copy of this LocalTime with the second - of - minute value altered .