base_construct( $parent_task, $content_item_score_data ); $this->content_item_score_data = $content_item_score_data; } /** * Returns whether this task is completed. * * @return bool Whether this task is completed. */ public function get_is_completed(): bool { $this->is_completed ??= $this->content_item_score_data->get_score() === 'good'; return $this->is_completed; } /** * Returns the task's priority. * * @return string */ public function get_priority(): string { // Bad scores get high priority, other scores get medium priority. if ( $this->content_item_score_data->get_score() === 'bad' ) { return 'high'; } return 'medium'; } }