Changeset 13739 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event.php
- Timestamp:
- 05/21/2024 11:43:05 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
r13683 r13739 26 26 } 27 27 28 class InvalidTitle extends Exception {29 public function __construct( Throwable $previous = null ) {30 parent::__construct( 'Event title is invalid', 0, $previous );31 }32 }33 34 28 class InvalidStatus extends Exception { 35 29 public function __construct( Throwable $previous = null ) { … … 53 47 * @throws InvalidEnd 54 48 * @throws InvalidStatus 55 * @throws InvalidTitle56 49 */ 57 50 public function __construct( … … 86 79 public function end(): Event_End_Date { 87 80 return $this->end; 81 } 82 83 public function is_published(): bool { 84 return 'publish' === $this->status; 85 } 86 87 public function is_draft(): bool { 88 return 'draft' === $this->status; 88 89 } 89 90 … … 152 153 } 153 154 154 /**155 * @throws InvalidTitle156 */157 155 public function set_title( string $title ): void { 158 if ( ! $title ) {159 throw new InvalidTitle();160 }161 156 $this->title = $title; 162 157 }
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)