name = $name; $this->origin = $origin; $this->duration = $duration; $this->description = $description; $this->category = $category; } /** * @return string */ public function get_name(): string { return $this->name; } /** * @return string */ public function get_description(): string { if ( empty( $this->description ) ) { $duration = round( $this->get_duration() * 1000 ); $name = __( $this->name, 'laps' ); return "{$name} – {$duration} ms"; } return $this->description; } /** * @return float */ public function get_origin(): float { return $this->origin; } /** * @return float */ public function get_duration(): float { return $this->duration; } /** * @return string */ public function get_category(): string { return $this->category; } }