src/Loaders/MysqlVariablesLoader.php
/**
     * Initialize the arary with the table row.
     *
     * @param array $value The status variable loaded from the DB
     *
     * @return string[] The array with the row ready to be rendered
     */
Initialize the arary with the table row.
@param array $value The status variable loaded from the DB

@return string[] The array with the row ready to be rendered
Initialize the arary with the table row . @param array $value The status variable loaded from the DB @return string [] The array with the row ready to be rendered
protected function prepareRow(array $value)
    {
        if (isset($this->recommendations[$variableName = $value[self::VARIABLE_NAME]])) {
            $recommendation = $this->recommendations[$variableName];
            $severity = $recommendation['severity'][$val = $value[self::VALUE]];
            if ($severity >= 1) {
                $mappedValue = sprintf('<bg=%s>%s</>', $this->severityMappings[$severity], $val);
                return array(
                    'Variable'    => $variableName,
                    'Value'       => $mappedValue,
                    'Description' => $recommendation['description']
                );
            }
        }
    }
protected function prepareRow ( array $ value ) { if ( isset ( $ this -> recommendations [ $ variableName = $ value [ self :: VARIABLE_NAME ] ] ) ) { $ recommendation = $ this -> recommendations [ $ variableName ] ; $ severity = $ recommendation [ 'severity' ] [ $ val = $ value [ self :: VALUE ] ] ; if ( $ severity >= 1 ) { $ mappedValue = sprintf ( '<bg=%s>%s</>' , $ this -> severityMappings [ $ severity ] , $ val ) ; return array ( 'Variable' => $ variableName , 'Value' => $ mappedValue , 'Description' => $ recommendation [ 'description' ] ) ; } } }
Initialize the arary with the table row.
Initialize the arary with the table row .
// query whether or not a recommendation for the variable is available // if yes, load the recommendation // load the severity of the recommendation // if severity is at least on a warning level // format the value // return the row with the formatted value