<commit_before><?php
/**
 * Plugin Name: Caldera Forms CiviCRM
 * Description: CiviCRM integration for Caldera Forms.
 * Version: 0.4
 * Author: <NAME>
 * Author URI: https://github.com/mecachisenros
 * Plugin URI: https://github.com/mecachisenros/caldera-forms-civicrm
 * Text Domain: caldera-forms-civicrm
 * Domain Path: /languages
 */

/**
 * Define constants.
 *
 * @since 0.1
 */
define( 'CF_CIVICRM_INTEGRATION_VER', '0.4' );
define( 'CF_CIVICRM_INTEGRATION_URL', plugin_dir_url( __FILE__ ) );
define( 'CF_CIVICRM_INTEGRATION_PATH', plugin_dir_path( __FILE__ ) );

/**
 * CiviCRM Caldera Forms Class.
 *
 * A class that encapsulates this plugin's functionality.
 *
 * @since 0.1.1
 */
class CiviCRM_Caldera_Forms {

	/**
	 * The class instance.
	 *
	 * @since 0.1.1
	 * @access private
	 * @var object $instance The class instance
	 */
	private static $instance;

	/**
	 * The processor management object.
	 *
	 * @since 0.2
	 * @access public
	 * @var object $processors The processor management object
	 */
	public static $processors;

	/**
	 * The fields management object.
	 *
	 * @since 0.2
	 * @access public
	 * @var object $fields The fields management object
	 */
	public static $fields;

	/**
	 * The templates management object.
	 *
	 * @since 0.3
	 * @access public
	 * @var object $templates The templates management object
	 */
	public static $templates;

	/**
	 * The form management object.
	 *
	 * @since 0.4
	 * @access public
	 * @var object $templates The form management object
	 */
	public static $forms;

	/**
	 * Returns a single instance of this object when called.
	 *
	 * @since 0.1.1
	 *
	 * @return object $instance CiviCRM_Caldera_Forms instance
	 */
	public static function instance() {

		// do we have it?
		if ( ! isset( self::$instance ) ) {

			// instantiate
			self::$instance = new CiviCRM_Caldera_Forms;

			// initialise if the environment allows
			if ( self::$instance->check_dependencies() ) {
				self::$instance->include_files();
				self::$instance->setup_objects();
				self::$instance->register_hooks();
			}

			/**
			 * Broadcast to other plugins that this plugin is loaded.
			 *
			 * @since 0.1.1
			 */
			do_action( 'caldera_forms_civicrm_loaded' );

		}

		// always return instance
		return self::$instance;

	}

	/**
	 * Check our plugin dependencies.
	 *
	 * @since 0.2
	 *
	 * @return bool True if dependencies exist, false otherwise
	 */
	private function check_dependencies() {

		// Bail if Caldera Forms is not available
		if ( ! defined( 'CFCORE_VER' ) ) return false;
<commit_msg>check for Caldera Forms v1.5<commit_after><?php
/**
 * Plugin Name: Caldera Forms CiviCRM
 * Description: CiviCRM integration for Caldera Forms.
 * Version: 0.4
 * Author: <NAME>
 * Author URI: https://github.com/mecachisenros
 * Plugin URI: https://github.com/mecachisenros/caldera-forms-civicrm
 * Text Domain: caldera-forms-civicrm
 * Domain Path: /languages
 */

/**
 * Define constants.
 *
 * @since 0.1
 */
define( 'CF_CIVICRM_INTEGRATION_VER', '0.4' );
define( 'CF_CIVICRM_INTEGRATION_URL', plugin_dir_url( __FILE__ ) );
define( 'CF_CIVICRM_INTEGRATION_PATH', plugin_dir_path( __FILE__ ) );

/**
 * CiviCRM Caldera Forms Class.
 *
 * A class that encapsulates this plugin's functionality.
 *
 * @since 0.1.1
 */
class CiviCRM_Caldera_Forms {

	/**
	 * The class instance.
	 *
	 * @since 0.1.1
	 * @access private
	 * @var object $instance The class instance
	 */
	private static $instance;

	/**
	 * The processor management object.
	 *
	 * @since 0.2
	 * @access public
	 * @var object $processors The processor management object
	 */
	public static $processors;

	/**
	 * The fields management object.
	 *
	 * @since 0.2
	 * @access public
	 * @var object $fields The fields management object
	 */
	public static $fields;

	/**
	 * The templates management object.
	 *
	 * @since 0.3
	 * @access public
	 * @var object $templates The templates management object
	 */
	public static $templates;

	/**
	 * The form management object.
	 *
	 * @since 0.4
	 * @access public
	 * @var object $templates The form management object
	 */
	public static $forms;

	/**
	 * Returns a single instance of this object when called.
	 *
	 * @since 0.1.1
	 *
	 * @return object $instance CiviCRM_Caldera_Forms instance
	 */
	public static function instance() {

		// do we have it?
		if ( ! isset( self::$instance ) ) {

			// instantiate
			self::$instance = new CiviCRM_Caldera_Forms;

			// initialise if the environment allows
			if ( self::$instance->check_dependencies() ) {
				self::$instance->include_files();
				self::$instance->setup_objects();
				self::$instance->register_hooks();
			}

			/**
			 * Broadcast to other plugins that this plugin is loaded.
			 *
			 * @since 0.1.1
			 */
			do_action( 'caldera_forms_civicrm_loaded' );

		}

		// always return instance
		return self::$instance;

	}

	/**
	 * Check our plugin dependencies.
	 *
	 * @since 0.2
	 *
	 * @return bool True if dependencies exist, false otherwise
	 */
	private function check_dependencies() {

		// Bail if Caldera Forms is not available
		if ( ! defined( 'CFCORE_VER' ) && version_compare( CFCORE_VER, '1.5', '>=' ) ) return false;

{'fraction_non_alphanumeric': 0.12570102494681878, 'fraction_numerical': 0.011603171533552505, 'mean_word_length': 3.1542168674698794, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6405164', 'n_tokens_mistral': 1870, 'n_tokens_neox': 1648, 'n_words': 475}