protected function getHeaderField(array $fields)
    {
        foreach ($fields as $field) {
            if ($this->isField($field) && $field->isHeader) {
                return $field;
            }
        }

        return null;
    }
protected function getHeaderField(array $fields)
    {
        foreach ($fields as $field) {
            if ($this->isField($field) && $field->isHeader) {
                return $field;
            }
        }

        return null;
    }
protected function getHeaderField ( array $ fields ) { foreach ( $ fields as $ field ) { if ( $ this -> isField ( $ field ) && $ field -> isHeader ) { return $ field ; } } return null ; }
Determine the field to be used for header from the givin fields.

@param array $fields
@return CrestApps\CodeGenerator\Models\Field || null
Determine the field to be used for header from the givin fields .