protected function determineLighthouseState(array $values, array $opts)
    {
        $state = 'success';

        foreach ($values as $key => $info) {
            $required_score = isset($opts["$key-score"])
                ? ($opts["$key-score"] <= 100 ? $opts["$key-score"] : 100)
                : 50;

            if ($info['score'] < $required_score
                && $info['score'] !== $required_score) {
                return 'failure';
            }
        }

        return $state;
    }
protected function determineLighthouseState(array $values, array $opts)
    {
        $state = 'success';

        foreach ($values as $key => $info) {
            $required_score = isset($opts["$key-score"])
                ? ($opts["$key-score"] <= 100 ? $opts["$key-score"] : 100)
                : 50;

            if ($info['score'] < $required_score
                && $info['score'] !== $required_score) {
                return 'failure';
            }
        }

        return $state;
    }
protected function determineLighthouseState ( array $ values , array $ opts ) { $ state = 'success' ; foreach ( $ values as $ key => $ info ) { $ required_score = isset ( $ opts [ "$key-score" ] ) ? ( $ opts [ "$key-score" ] <= 100 ? $ opts [ "$key-score" ] : 100 ) : 50 ; if ( $ info [ 'score' ] < $ required_score && $ info [ 'score' ] !== $ required_score ) { return 'failure' ; } } return $ state ; }
Determine Google lighthouse state.

@param array $values
An array of formatted values.
@param array $opts
An array of command options.

@return string
The google lighthouse state based on the evaluation.
Determine Google lighthouse state .