Making WordPress.org


Ignore:
Timestamp:
05/28/2024 11:52:23 AM (2 years ago)
Author:
amieiro
Message:

Translate: Sync "Translation Events" from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php

    r13739 r13753  
    5858        ) {
    5959                $this->author_id = $author_id;
    60                 $this->set_times( $start, $end );
     60                $this->validate_times( $start, $end );
     61                $this->set_start( $start );
     62                $this->set_end( $end );
    6163                $this->set_timezone( $timezone );
    6264                $this->set_status( $status );
    … …  
    130132        }
    131133
    132         /**
    133          * @throws InvalidStart|InvalidEnd
    134          */
    135         public function set_times( Event_Start_Date $start, Event_End_Date $end ): void {
    136                 $this->validate_times( $start, $end );
     134        public function set_start( Event_Start_Date $start ): void {
    137135                $this->start = $start;
    138                 $this->end   = $end;
     136        }
     137
     138        public function set_end( Event_End_Date $end ): void {
     139                $this->end = $end;
    139140        }
    140141
    … …  
    165166         * @throws InvalidEnd
    166167         */
    167         private function validate_times( Event_Start_Date $start, Event_End_Date $end ) {
     168        public function validate_times( Event_Start_Date $start, Event_End_Date $end ) {
    168169                if ( $end <= $start ) {
    169170                        throw new InvalidEnd();
Note: See TracChangeset for help on using the changeset viewer.