runner = $runner; $this->reports = $reports; $this->should_index_links_conditional = $should_index_links_conditional; $this->reports->set_test_identifier( $this->get_test_identifier() ); $this->set_runner( $this->runner ); } /** * Returns the WordPress-friendly health check result. * * @return string[] The WordPress-friendly health check result. */ protected function get_result() { if ( $this->runner->is_successful() ) { return $this->reports->get_success_result(); } return $this->reports->get_links_table_not_accessible_result(); } /** * Returns whether the health check should be excluded from the results. * * @return bool false, because it's not excluded. */ public function is_excluded() { return ! $this->should_index_links_conditional->is_met(); } }