Function __global->run_health_check

Definitions

sources/health_check.php

  • Run a Health Check.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
&$has_fails boolean Yes No required parameter N/A N/A Whether there are fails (returned by reference)
$sections_to_run ?array No No Null N/A N/A Which check sections to run (null: all)
$show_passes boolean No No False N/A N/A Mention passed checks
$show_skips boolean No No False N/A N/A Mention skipped checks
$show_manual_checks boolean No No False N/A N/A Mention manual checks
$automatic_repair boolean No No False N/A N/A Do automatic repairs where possible
$use_test_data_for_pass ?boolean No No Null N/A N/A Should test data be for a pass [if test data supported] (null: no test data)
$urls_or_page_links ?array No No Null N/A N/A List of URLs and/or page-links to operate on, if applicable (null: those configured)
$comcode_segments ?array No No Null N/A N/A Map of field names to Comcode segments to operate on, if applicable (null: N/A)
$check_context ?integer No No Null N/A N/A The current state of the website (a CHECK_CONTEXT__* constant) (null: auto-decide)

Returns

  • List of result categories with results, template-ready
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Run a Health Check.
 *
 * @param  boolean $has_fails Whether there are fails (returned by reference)
 * @param  ?array $sections_to_run Which check sections to run (null: all)
 * @param  boolean $show_passes Mention passed checks
 * @param  boolean $show_skips Mention skipped checks
 * @param  boolean $show_manual_checks Mention manual checks
 * @param  boolean $automatic_repair Do automatic repairs where possible
 * @param  ?boolean $use_test_data_for_pass Should test data be for a pass [if test data supported] (null: no test data)
 * @param  ?array $urls_or_page_links List of URLs and/or page-links to operate on, if applicable (null: those configured)
 * @param  ?array $comcode_segments Map of field names to Comcode segments to operate on, if applicable (null: N/A)
 * @param  ?integer $check_context The current state of the website (a CHECK_CONTEXT__* constant) (null: auto-decide)
 * @return array List of result categories with results, template-ready
 */

function run_health_check(bool &$has_fails, ?array $sections_to_run = null, bool $show_passes = false, bool $show_skips = false, bool $show_manual_checks = false, bool $automatic_repair = false, ?bool $use_test_data_for_pass = null, ?array $urls_or_page_links = null, ?array $comcode_segments = null, ?int $check_context = null) : array