private function fixProperties(&$properties)
    {
        foreach ($properties as $name => &$property) {
            unset($property['property_path']);

            if (!isset($property['type'])) {
                $property['type'] = 'text';
            }
            if (isset($property['fields'])) {
                $this->fixProperties($property['fields']);
            }
            if (isset($property['properties'])) {
                $this->fixProperties($property['properties']);
            }
        }
    }
private function fixProperties(&$properties)
    {
        foreach ($properties as $name => &$property) {
            unset($property['property_path']);

            if (!isset($property['type'])) {
                $property['type'] = 'text';
            }
            if (isset($property['fields'])) {
                $this->fixProperties($property['fields']);
            }
            if (isset($property['properties'])) {
                $this->fixProperties($property['properties']);
            }
        }
    }
private function fixProperties ( & $ properties ) { foreach ( $ properties as $ name => & $ property ) { unset ( $ property [ 'property_path' ] ) ; if ( ! isset ( $ property [ 'type' ] ) ) { $ property [ 'type' ] = 'text' ; } if ( isset ( $ property [ 'fields' ] ) ) { $ this -> fixProperties ( $ property [ 'fields' ] ) ; } if ( isset ( $ property [ 'properties' ] ) ) { $ this -> fixProperties ( $ property [ 'properties' ] ) ; } } }
Fixes any properties and applies basic defaults for any field that does not have
required options.

@param $properties
Fixes any properties and applies basic defaults for any field that does not have required options .