protected function check($section, $data)
    {

        // Normalized return array
        $normalized = [];

        if (isset($this->normalize[$section]) && !empty($this->normalize[$section])) {
            foreach ($this->normalize[$section] as $property => $raw) {
                // Default the value for the new key as null
                $value = null;

                if (is_array($raw)) {
                    // Iterate over the raw property we want to use
                    foreach ($raw as $check) {
                        if (array_key_exists($check, $data)) {
                            $value = $data[$check];
                            break;
                        }
                    }
                } else {
                    // String
                    if (array_key_exists($raw, $data)) {
                        $value = $data[$raw];
                    }
                }

                $normalized['gq_' . $property] = $value;
            }
        }

        return $normalized;
    }
protected function check($section, $data)
    {

        // Normalized return array
        $normalized = [];

        if (isset($this->normalize[$section]) && !empty($this->normalize[$section])) {
            foreach ($this->normalize[$section] as $property => $raw) {
                // Default the value for the new key as null
                $value = null;

                if (is_array($raw)) {
                    // Iterate over the raw property we want to use
                    foreach ($raw as $check) {
                        if (array_key_exists($check, $data)) {
                            $value = $data[$check];
                            break;
                        }
                    }
                } else {
                    // String
                    if (array_key_exists($raw, $data)) {
                        $value = $data[$raw];
                    }
                }

                $normalized['gq_' . $property] = $value;
            }
        }

        return $normalized;
    }
protected function check ( $ section , $ data ) { // Normalized return array $ normalized = [ ] ; if ( isset ( $ this -> normalize [ $ section ] ) && ! empty ( $ this -> normalize [ $ section ] ) ) { foreach ( $ this -> normalize [ $ section ] as $ property => $ raw ) { // Default the value for the new key as null $ value = null ; if ( is_array ( $ raw ) ) { // Iterate over the raw property we want to use foreach ( $ raw as $ check ) { if ( array_key_exists ( $ check , $ data ) ) { $ value = $ data [ $ check ] ; break ; } } } else { // String if ( array_key_exists ( $ raw , $ data ) ) { $ value = $ data [ $ raw ] ; } } $ normalized [ 'gq_' . $ property ] = $ value ; } } return $ normalized ; }
Check a section for normalization

@param $section
@param $data

@return array
Check a section for normalization