Changeset 13753 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php
- Timestamp:
- 05/28/2024 11:52:23 AM (2 years ago)
- 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 58 58 ) { 59 59 $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 ); 61 63 $this->set_timezone( $timezone ); 62 64 $this->set_status( $status ); … … 130 132 } 131 133 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 { 137 135 $this->start = $start; 138 $this->end = $end; 136 } 137 138 public function set_end( Event_End_Date $end ): void { 139 $this->end = $end; 139 140 } 140 141 … … 165 166 * @throws InvalidEnd 166 167 */ 167 p rivatefunction validate_times( Event_Start_Date $start, Event_End_Date $end ) {168 public function validate_times( Event_Start_Date $start, Event_End_Date $end ) { 168 169 if ( $end <= $start ) { 169 170 throw new InvalidEnd();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)