<commit_before><?php

/**
 * Plugin Name: Papi
 * Description: Papi is a page type builder for WordPress
 * Author: <NAME>
 * Author URI: http://forsmo.me/
 * Version: 1.0.0
 * Plugin URI: https://github.com/wp-papi/papi
 * Textdomain: papi
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Papi loader class.
 */
final class Papi_Loader {

	/**
	 * The instance of Papi loader class.
	 *
	 * @var object
	 * @since 1.0.0
	 */

	private static $instance;

	/**
	 * The plugin name.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	public $name;

	/**
	 * The plugin version.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	public $version;

	/**
	 * The plugin directory path.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	private $plugin_dir;

	/**
	 * The plugin url path.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	private $plugin_url;

	/**
	 * The plugin language directory path.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	private $lang_dir;

	/**
	 * Papi loader instance.
	 *
	 * @since 1.0.0
	 *
	 * @return object
	 */

	public static function instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new Papi_Loader;
			self::$instance->constants();
			self::$instance->setup_globals();
			self::$instance->require_files();
			self::$instance->setup_requried();
			// Not used yet.
			//self::$instance->setup_actions();
		}

		return self::$instance;
	}

	/**
	 * Construct. Register autoloader.
	 *
	 * @since 1.0.0
	 * @access private
	 */

	private function __construct() {
		if ( function_exists( '__autoload' ) ) {
			spl_autoload_register( '__autoload' );
		}

		spl_autoload_register( array( $this, 'autoload' ) );
	}

	/**
	 * Cloning is forbidden.
	 *
	 * @since 2.1
	 */

	public function __clone() {
		_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'papi' ), '1.0.0' );
	}

	/**
	 * Unserializing instances of this class is forbidden.
	 *
	 * @since 2.1
	 */

	public function __wakeup() {
		_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'papi' ), '1.0.0' );
	}

	/**
	 * Bootstrap constants
	 *
	 * @since 1.0.0
	 * @access private
	 */

	private function constants() {
		// Path to Papi plugin directory
		if ( ! defined( 'PAPI_PLUGIN_DIR' ) ) {
			define( 'PAPI_PLUGIN_DIR', trailingslashit( WPMU_PLUGIN_DIR . '/' . basename( __DIR__ ) ) );
		}

		// URL to Papi plugin directory
		if ( ! defined( 'PAPI_PLUGIN_URL' ) ) {
			$plugin_url = plugin_dir_url( __FILE__ );

			if ( is_ssl() ) {
				$plugin_url = str_replace( 'http://', 'https://', $plugin_url );
			}

			define( 'PAPI_PLUGIN_URL', $plugin_url );
		}
	}

	/**
	 * Require files.
	 *
	 * @since 1.0.0
	 * @access private
	 */<commit_msg>Fixed so tests can run again<commit_after><?php

/**
 * Plugin Name: Papi
 * Description: Papi is a page type builder for WordPress
 * Author: <NAME>
 * Author URI: http://forsmo.me/
 * Version: 1.0.0
 * Plugin URI: https://github.com/wp-papi/papi
 * Textdomain: papi
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Papi loader class.
 */
final class Papi_Loader {

	/**
	 * The instance of Papi loader class.
	 *
	 * @var object
	 * @since 1.0.0
	 */

	private static $instance;

	/**
	 * The plugin name.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	public $name;

	/**
	 * The plugin version.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	public $version;

	/**
	 * The plugin directory path.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	private $plugin_dir;

	/**
	 * The plugin url path.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	private $plugin_url;

	/**
	 * The plugin language directory path.
	 *
	 * @var string
	 * @since 1.0.0
	 */

	private $lang_dir;

	/**
	 * Papi loader instance.
	 *
	 * @since 1.0.0
	 *
	 * @return object
	 */

	public static function instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new Papi_Loader;
			self::$instance->constants();
			self::$instance->setup_globals();
			self::$instance->require_files();
			self::$instance->setup_requried();
			// Not used yet.
			//self::$instance->setup_actions();
		}

		return self::$instance;
	}

	/**
	 * Construct. Register autoloader.
	 *
	 * @since 1.0.0
	 * @access private
	 */

	private function __construct() {
		if ( function_exists( '__autoload' ) ) {
			spl_autoload_register( '__autoload' );
		}

		spl_autoload_register( array( $this, 'autoload' ) );
	}

	/**
	 * Cloning is forbidden.
	 *
	 * @since 2.1
	 */

	public function __clone() {
		_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'papi' ), '1.0.0' );
	}

	/**
	 * Unserializing instances of this class is forbidden.
	 *
	 * @since 2.1
	 */

	public function __wakeup() {
		_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'papi' ), '1.0.0' );
	}

	/**
	 * Bootstrap constants
	 *
	 * @since 1.0.0
	 * @access private
	 */

	private function constants() {
		// Path to Papi plugin directory
		if ( ! defined( 'PAPI_PLUGIN_DIR' ) ) {
			define( 'PAPI_PLUGIN_DIR', trailingslashit( WP_PLUGIN_DIR . '/' . basename( __DIR__ ) ) );
		}

		// URL to Papi plugin directory
		if ( ! defined( 'PAPI_PLUGIN_URL' ) ) {
			$plugin_url = plugin_dir_url( __FILE__ );

			if ( is_ssl() ) {
				$plugin_url = str_replace( 'http://', 'https://', $plugin_url );
			}

			define( 'PAPI_PLUGIN_URL', $plugin_url );
		}
	}

	/**
	 * Require files.
	 *
	 * @since 1.0.0
	 * @access private
	 */
{'fraction_non_alphanumeric': 0.16898792943361188, 'fraction_numerical': 0.01894150417827298, 'mean_word_length': 2.614765100671141, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '5474445', 'n_tokens_mistral': 2258, 'n_tokens_neox': 1961, 'n_words': 463}