<?php
/** Development */
define('SAVEQUERIES', true);
define('WP_DEBUG', true);
define('SCRIPT_DEBUG', true);

/**
 * Use Dotenv to set required environment variables and load .local.env file
 */

if (class_exists(\Dotenv\Dotenv::class)) {
	$dotenv_dir = dirname(dirname(dirname(__DIR__)));

	$env_file_name = null;

	if (file_exists($dotenv_dir . '/development.env')) {
		$env_file_name = 'development.env';
	} else if(file_exists($dotenv_dir . '/.env')) {
		$env_file_name = '.env';
	}

	if (isset($env_file_name)) {
		$dotenv = new Dotenv\Dotenv($dotenv_dir, $env_file_name);
		$dotenv->load();
		$dotenv->required(['MYSQL_DATABASE', 'MYSQL_USER', 'MYSQL_PASSWORD']);
	}
}