public function runChecks($tags = [])
    {
        $errors = [];

        $checks = $this->getChecks();

        if (!empty($tags)) {
            $taggedChecks = [];
            foreach ($checks as $check) {
                // a check can have many tags
                // true if any of the tags provided appears in the check tags
                if (array_intersect($check['tags'], $tags)) {
                    $taggedChecks[] = $check;
                }
            }
            $checks = $taggedChecks;
        }

        foreach ($checks as $check) {
            $functionName = '';
            if (is_array($check['check'])) {
                if (count($check['check']) > 1) {
                    $obj = reset($check['check']);
                    $method = end($check['check']);
                    $functionName = get_class($obj).'::'.$method;
                } else {
                    $functionName = reset($check['check']);
                }
            }

            $errors = array_merge($errors, call_user_func($check['check']));

            assert(
                is_array($errors),
                sprintf(
                    'The function %s did not return a list. All functions registered ".
            "with the checks registry must return a list.',
                    $functionName
                )
            );
        }

        return $errors;
    }
public function runChecks($tags = [])
    {
        $errors = [];

        $checks = $this->getChecks();

        if (!empty($tags)) {
            $taggedChecks = [];
            foreach ($checks as $check) {
                // a check can have many tags
                // true if any of the tags provided appears in the check tags
                if (array_intersect($check['tags'], $tags)) {
                    $taggedChecks[] = $check;
                }
            }
            $checks = $taggedChecks;
        }

        foreach ($checks as $check) {
            $functionName = '';
            if (is_array($check['check'])) {
                if (count($check['check']) > 1) {
                    $obj = reset($check['check']);
                    $method = end($check['check']);
                    $functionName = get_class($obj).'::'.$method;
                } else {
                    $functionName = reset($check['check']);
                }
            }

            $errors = array_merge($errors, call_user_func($check['check']));

            assert(
                is_array($errors),
                sprintf(
                    'The function %s did not return a list. All functions registered ".
            "with the checks registry must return a list.',
                    $functionName
                )
            );
        }

        return $errors;
    }
public function runChecks ( $ tags = [ ] ) { $ errors = [ ] ; $ checks = $ this -> getChecks ( ) ; if ( ! empty ( $ tags ) ) { $ taggedChecks = [ ] ; foreach ( $ checks as $ check ) { // a check can have many tags // true if any of the tags provided appears in the check tags if ( array_intersect ( $ check [ 'tags' ] , $ tags ) ) { $ taggedChecks [ ] = $ check ; } } $ checks = $ taggedChecks ; } foreach ( $ checks as $ check ) { $ functionName = '' ; if ( is_array ( $ check [ 'check' ] ) ) { if ( count ( $ check [ 'check' ] ) > 1 ) { $ obj = reset ( $ check [ 'check' ] ) ; $ method = end ( $ check [ 'check' ] ) ; $ functionName = get_class ( $ obj ) . '::' . $ method ; } else { $ functionName = reset ( $ check [ 'check' ] ) ; } } $ errors = array_merge ( $ errors , call_user_func ( $ check [ 'check' ] ) ) ; assert ( is_array ( $ errors ) , sprintf ( 'The function %s did not return a list. All functions registered ".
            "with the checks registry must return a list.' , $ functionName ) ) ; } return $ errors ; }
Run all registered checks and return list of Errors and Warnings.

@return array

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Run all registered checks and return list of Errors and Warnings .