public function process() {
		$this->types = array(
			'errors'     => array(
				'warning'    => _x( 'Warning', 'PHP error level', 'query-monitor' ),
				'notice'     => _x( 'Notice', 'PHP error level', 'query-monitor' ),
				'strict'     => _x( 'Strict', 'PHP error level', 'query-monitor' ),
				'deprecated' => _x( 'Deprecated', 'PHP error level', 'query-monitor' ),
			),
			'suppressed' => array(
				'warning'    => _x( 'Warning (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
				'notice'     => _x( 'Notice (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
				'strict'     => _x( 'Strict (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
				'deprecated' => _x( 'Deprecated (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
			),
			'silenced'   => array(
				'warning'    => _x( 'Warning (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
				'notice'     => _x( 'Notice (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
				'strict'     => _x( 'Strict (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
				'deprecated' => _x( 'Deprecated (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
			),
		);
		$components  = array();

		if ( ! empty( $this->data ) && ! empty( $this->data['errors'] ) ) {
			/**
			 * Filters the levels used for reported PHP errors on a per-component basis.
			 *
			 * Error levels can be specified in order to silence certain error levels from
			 * plugins or the current theme. Most commonly, you may wish to use this filter
			 * in order to silence annoying notices from third party plugins that you do not
			 * have control over.
			 *
			 * Silenced errors will still appear in Query Monitor's output, but will not
			 * cause highlighting to appear in the top level admin toolbar.
			 *
			 * For example, to show all errors in the 'foo' plugin except PHP notices use:
			 *
			 *     add_filter( 'qm/collect/php_error_levels', function( array $levels ) {
			 *         $levels['plugin']['foo'] = ( E_ALL & ~E_NOTICE );
			 *         return $levels;
			 *     } );
			 *
			 * Errors from themes, WordPress core, and other components can also be filtered:
			 *
			 *     add_filter( 'qm/collect/php_error_levels', function( array $levels ) {
			 *         $levels['theme']['stylesheet'] = ( E_WARNING & E_USER_WARNING );
			 *         $levels['theme']['template']   = ( E_WARNING & E_USER_WARNING );
			 *         $levels['core']['core']        = ( 0 );
			 *         return $levels;
			 *     } );
			 *
			 * Any component which doesn't have an error level specified via this filter is
			 * assumed to have the default level of `E_ALL`, which shows all errors.
			 *
			 * Valid PHP error level bitmasks are supported for each component, including `0`
			 * to silence all errors from a component. See the PHP documentation on error
			 * reporting for more info: http://php.net/manual/en/function.error-reporting.php
			 *
			 * @since 2.7.0
			 *
			 * @param int[] $levels The error levels used for each component.
			 */
			$levels = apply_filters( 'qm/collect/php_error_levels', array() );

			/**
			 * Controls whether silenced PHP errors are hidden entirely by Query Monitor.
			 *
			 * To hide silenced errors, use:
			 *
			 *     add_filter( 'qm/collect/hide_silenced_php_errors', '__return_true' );
			 *
			 * @since 2.7.0
			 *
			 * @param bool $hide Whether to hide silenced PHP errors. Default false.
			 */
			$this->hide_silenced_php_errors = apply_filters( 'qm/collect/hide_silenced_php_errors', false );

			array_map( array( $this, 'filter_reportable_errors' ), $levels, array_keys( $levels ) );

			foreach ( $this->types as $error_group => $error_types ) {
				foreach ( $error_types as $type => $title ) {
					if ( isset( $this->data[ $error_group ][ $type ] ) ) {
						foreach ( $this->data[ $error_group ][ $type ] as $error ) {
							$component                      = $error['trace']->get_component();
							$components[ $component->name ] = $component->name;
						}
					}
				}
			}
		}

		$this->data['components'] = $components;
	}
public function process() {
		$this->types = array(
			'errors'     => array(
				'warning'    => _x( 'Warning', 'PHP error level', 'query-monitor' ),
				'notice'     => _x( 'Notice', 'PHP error level', 'query-monitor' ),
				'strict'     => _x( 'Strict', 'PHP error level', 'query-monitor' ),
				'deprecated' => _x( 'Deprecated', 'PHP error level', 'query-monitor' ),
			),
			'suppressed' => array(
				'warning'    => _x( 'Warning (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
				'notice'     => _x( 'Notice (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
				'strict'     => _x( 'Strict (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
				'deprecated' => _x( 'Deprecated (Suppressed)', 'Suppressed PHP error level', 'query-monitor' ),
			),
			'silenced'   => array(
				'warning'    => _x( 'Warning (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
				'notice'     => _x( 'Notice (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
				'strict'     => _x( 'Strict (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
				'deprecated' => _x( 'Deprecated (Silenced)', 'Silenced PHP error level', 'query-monitor' ),
			),
		);
		$components  = array();

		if ( ! empty( $this->data ) && ! empty( $this->data['errors'] ) ) {
			/**
			 * Filters the levels used for reported PHP errors on a per-component basis.
			 *
			 * Error levels can be specified in order to silence certain error levels from
			 * plugins or the current theme. Most commonly, you may wish to use this filter
			 * in order to silence annoying notices from third party plugins that you do not
			 * have control over.
			 *
			 * Silenced errors will still appear in Query Monitor's output, but will not
			 * cause highlighting to appear in the top level admin toolbar.
			 *
			 * For example, to show all errors in the 'foo' plugin except PHP notices use:
			 *
			 *     add_filter( 'qm/collect/php_error_levels', function( array $levels ) {
			 *         $levels['plugin']['foo'] = ( E_ALL & ~E_NOTICE );
			 *         return $levels;
			 *     } );
			 *
			 * Errors from themes, WordPress core, and other components can also be filtered:
			 *
			 *     add_filter( 'qm/collect/php_error_levels', function( array $levels ) {
			 *         $levels['theme']['stylesheet'] = ( E_WARNING & E_USER_WARNING );
			 *         $levels['theme']['template']   = ( E_WARNING & E_USER_WARNING );
			 *         $levels['core']['core']        = ( 0 );
			 *         return $levels;
			 *     } );
			 *
			 * Any component which doesn't have an error level specified via this filter is
			 * assumed to have the default level of `E_ALL`, which shows all errors.
			 *
			 * Valid PHP error level bitmasks are supported for each component, including `0`
			 * to silence all errors from a component. See the PHP documentation on error
			 * reporting for more info: http://php.net/manual/en/function.error-reporting.php
			 *
			 * @since 2.7.0
			 *
			 * @param int[] $levels The error levels used for each component.
			 */
			$levels = apply_filters( 'qm/collect/php_error_levels', array() );

			/**
			 * Controls whether silenced PHP errors are hidden entirely by Query Monitor.
			 *
			 * To hide silenced errors, use:
			 *
			 *     add_filter( 'qm/collect/hide_silenced_php_errors', '__return_true' );
			 *
			 * @since 2.7.0
			 *
			 * @param bool $hide Whether to hide silenced PHP errors. Default false.
			 */
			$this->hide_silenced_php_errors = apply_filters( 'qm/collect/hide_silenced_php_errors', false );

			array_map( array( $this, 'filter_reportable_errors' ), $levels, array_keys( $levels ) );

			foreach ( $this->types as $error_group => $error_types ) {
				foreach ( $error_types as $type => $title ) {
					if ( isset( $this->data[ $error_group ][ $type ] ) ) {
						foreach ( $this->data[ $error_group ][ $type ] as $error ) {
							$component                      = $error['trace']->get_component();
							$components[ $component->name ] = $component->name;
						}
					}
				}
			}
		}

		$this->data['components'] = $components;
	}
public function process ( ) { $ this -> types = array ( 'errors' => array ( 'warning' => _x ( 'Warning' , 'PHP error level' , 'query-monitor' ) , 'notice' => _x ( 'Notice' , 'PHP error level' , 'query-monitor' ) , 'strict' => _x ( 'Strict' , 'PHP error level' , 'query-monitor' ) , 'deprecated' => _x ( 'Deprecated' , 'PHP error level' , 'query-monitor' ) , ) , 'suppressed' => array ( 'warning' => _x ( 'Warning (Suppressed)' , 'Suppressed PHP error level' , 'query-monitor' ) , 'notice' => _x ( 'Notice (Suppressed)' , 'Suppressed PHP error level' , 'query-monitor' ) , 'strict' => _x ( 'Strict (Suppressed)' , 'Suppressed PHP error level' , 'query-monitor' ) , 'deprecated' => _x ( 'Deprecated (Suppressed)' , 'Suppressed PHP error level' , 'query-monitor' ) , ) , 'silenced' => array ( 'warning' => _x ( 'Warning (Silenced)' , 'Silenced PHP error level' , 'query-monitor' ) , 'notice' => _x ( 'Notice (Silenced)' , 'Silenced PHP error level' , 'query-monitor' ) , 'strict' => _x ( 'Strict (Silenced)' , 'Silenced PHP error level' , 'query-monitor' ) , 'deprecated' => _x ( 'Deprecated (Silenced)' , 'Silenced PHP error level' , 'query-monitor' ) , ) , ) ; $ components = array ( ) ; if ( ! empty ( $ this -> data ) && ! empty ( $ this -> data [ 'errors' ] ) ) { /**
			 * Filters the levels used for reported PHP errors on a per-component basis.
			 *
			 * Error levels can be specified in order to silence certain error levels from
			 * plugins or the current theme. Most commonly, you may wish to use this filter
			 * in order to silence annoying notices from third party plugins that you do not
			 * have control over.
			 *
			 * Silenced errors will still appear in Query Monitor's output, but will not
			 * cause highlighting to appear in the top level admin toolbar.
			 *
			 * For example, to show all errors in the 'foo' plugin except PHP notices use:
			 *
			 *     add_filter( 'qm/collect/php_error_levels', function( array $levels ) {
			 *         $levels['plugin']['foo'] = ( E_ALL & ~E_NOTICE );
			 *         return $levels;
			 *     } );
			 *
			 * Errors from themes, WordPress core, and other components can also be filtered:
			 *
			 *     add_filter( 'qm/collect/php_error_levels', function( array $levels ) {
			 *         $levels['theme']['stylesheet'] = ( E_WARNING & E_USER_WARNING );
			 *         $levels['theme']['template']   = ( E_WARNING & E_USER_WARNING );
			 *         $levels['core']['core']        = ( 0 );
			 *         return $levels;
			 *     } );
			 *
			 * Any component which doesn't have an error level specified via this filter is
			 * assumed to have the default level of `E_ALL`, which shows all errors.
			 *
			 * Valid PHP error level bitmasks are supported for each component, including `0`
			 * to silence all errors from a component. See the PHP documentation on error
			 * reporting for more info: http://php.net/manual/en/function.error-reporting.php
			 *
			 * @since 2.7.0
			 *
			 * @param int[] $levels The error levels used for each component.
			 */ $ levels = apply_filters ( 'qm/collect/php_error_levels' , array ( ) ) ; /**
			 * Controls whether silenced PHP errors are hidden entirely by Query Monitor.
			 *
			 * To hide silenced errors, use:
			 *
			 *     add_filter( 'qm/collect/hide_silenced_php_errors', '__return_true' );
			 *
			 * @since 2.7.0
			 *
			 * @param bool $hide Whether to hide silenced PHP errors. Default false.
			 */ $ this -> hide_silenced_php_errors = apply_filters ( 'qm/collect/hide_silenced_php_errors' , false ) ; array_map ( array ( $ this , 'filter_reportable_errors' ) , $ levels , array_keys ( $ levels ) ) ; foreach ( $ this -> types as $ error_group => $ error_types ) { foreach ( $ error_types as $ type => $ title ) { if ( isset ( $ this -> data [ $ error_group ] [ $ type ] ) ) { foreach ( $ this -> data [ $ error_group ] [ $ type ] as $ error ) { $ component = $ error [ 'trace' ] -> get_component ( ) ; $ components [ $ component -> name ] = $ component -> name ; } } } } } $ this -> data [ 'components' ] = $ components ; }
Runs post-processing on the collected errors and updates the
errors collected in the data->errors property.

Any unreportable errors are placed in the data->filtered_errors
property.
Runs post - processing on the collected errors and updates the errors collected in the data - > errors property .