private function validate($field)
    {
        //====================================================================//
        // Verify - Field Type is Not Empty
        if (empty($field->type) || !is_string($field->type)) {
            return Splash::log()->err("ErrFieldsNoType");
        }
        //====================================================================//
        // Verify - Field Id is Not Empty
        if (empty($field->id) || !is_string($field->id)) {
            return Splash::log()->err("ErrFieldsNoId");
        }
        //====================================================================//
        // Verify - Field Id No Spacial Chars
        if ($field->id !== preg_replace('/[^a-zA-Z0-9-_@]/u', '', $field->id)) {
            Splash::log()->war("ErrFieldsInvalidId", $field->id);

            return false;
        }
        //====================================================================//
        // Verify - Field Name is Not Empty
        if (empty($field->name) || !is_string($field->name)) {
            return Splash::log()->err("ErrFieldsNoName");
        }
        //====================================================================//
        // Verify - Field Desc is Not Empty
        if (empty($field->desc) || !is_string($field->desc)) {
            return Splash::log()->err("ErrFieldsNoDesc");
        }

        return true;
    }
private function validate($field)
    {
        //====================================================================//
        // Verify - Field Type is Not Empty
        if (empty($field->type) || !is_string($field->type)) {
            return Splash::log()->err("ErrFieldsNoType");
        }
        //====================================================================//
        // Verify - Field Id is Not Empty
        if (empty($field->id) || !is_string($field->id)) {
            return Splash::log()->err("ErrFieldsNoId");
        }
        //====================================================================//
        // Verify - Field Id No Spacial Chars
        if ($field->id !== preg_replace('/[^a-zA-Z0-9-_@]/u', '', $field->id)) {
            Splash::log()->war("ErrFieldsInvalidId", $field->id);

            return false;
        }
        //====================================================================//
        // Verify - Field Name is Not Empty
        if (empty($field->name) || !is_string($field->name)) {
            return Splash::log()->err("ErrFieldsNoName");
        }
        //====================================================================//
        // Verify - Field Desc is Not Empty
        if (empty($field->desc) || !is_string($field->desc)) {
            return Splash::log()->err("ErrFieldsNoDesc");
        }

        return true;
    }
private function validate ( $ field ) { //====================================================================// // Verify - Field Type is Not Empty if ( empty ( $ field -> type ) || ! is_string ( $ field -> type ) ) { return Splash :: log ( ) -> err ( "ErrFieldsNoType" ) ; } //====================================================================// // Verify - Field Id is Not Empty if ( empty ( $ field -> id ) || ! is_string ( $ field -> id ) ) { return Splash :: log ( ) -> err ( "ErrFieldsNoId" ) ; } //====================================================================// // Verify - Field Id No Spacial Chars if ( $ field -> id !== preg_replace ( '/[^a-zA-Z0-9-_@]/u' , '' , $ field -> id ) ) { Splash :: log ( ) -> war ( "ErrFieldsInvalidId" , $ field -> id ) ; return false ; } //====================================================================// // Verify - Field Name is Not Empty if ( empty ( $ field -> name ) || ! is_string ( $ field -> name ) ) { return Splash :: log ( ) -> err ( "ErrFieldsNoName" ) ; } //====================================================================// // Verify - Field Desc is Not Empty if ( empty ( $ field -> desc ) || ! is_string ( $ field -> desc ) ) { return Splash :: log ( ) -> err ( "ErrFieldsNoDesc" ) ; } return true ; }
Validate Field Definition

@param ArrayObject $field

@return boolean

@SuppressWarnings(PHPMD.CyclomaticComplexity)
Validate Field Definition