<commit_before>#!/usr/bin/env php
<?php

use Symfony\Component\Console;
use TwentyFifth\Migrations\Command;

function includeIfExists($file)
{
	if (file_exists($file)) {
		return include $file;
	}
}

if ((!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
	die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
		'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
		'php composer.phar install'.PHP_EOL);
}

if (getenv('APPLICATION_ENV')) {
	define('APPLICATION_ENV', getenv('APPLICATION_ENV'));
} else {
	die('Please set the APPLICATION_ENV'.PHP_EOL);
}

$sqlDirectory = '';

// ZF1
if (is_dir(__DIR__ . '/../application/')) {
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF1Manager(__DIR__ . '/../application/');
	$sqlDirectory = __DIR__ . '/../docs/sql/';
} else if (is_dir(__DIR__ . '/../../../../application/')) {
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF1Manager(__DIR__ . '/../../../../application/');
	$sqlDirectory = __DIR__ . '/../../../../docs/sql/';

// ZF2
} else if (is_readable(__DIR__ . '/../config/application.config.php')) {
	chdir(dirname(__DIR__));
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF2Manager(require __DIR__ . '/../config/application.config.php');

	$sqlDirectory = __DIR__ . '/../docs/sql/';
} else if (is_readable(__DIR__ . '/../../../../config/application.config.php')) {
	chdir(dirname(__DIR__) . '/../../../');
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF2Manager(require __DIR__ . '/../../../../config/application.config.php');

	$sqlDirectory = __DIR__ . '/../../../../docs/sql/';<commit_msg>check zf2 first in case of migration<commit_after>#!/usr/bin/env php
<?php

use Symfony\Component\Console;
use TwentyFifth\Migrations\Command;

function includeIfExists($file)
{
	if (file_exists($file)) {
		return include $file;
	}
}

if ((!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
	die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
		'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
		'php composer.phar install'.PHP_EOL);
}

if (getenv('APPLICATION_ENV')) {
	define('APPLICATION_ENV', getenv('APPLICATION_ENV'));
} else {
	die('Please set the APPLICATION_ENV'.PHP_EOL);
}

$sqlDirectory = '';

// ZF2
if (is_readable(__DIR__ . '/../config/application.config.php')) {
	chdir(dirname(__DIR__));
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF2Manager(require __DIR__ . '/../config/application.config.php');

	$sqlDirectory = __DIR__ . '/../docs/sql/';
} else if (is_readable(__DIR__ . '/../../../../config/application.config.php')) {
	chdir(dirname(__DIR__) . '/../../../');
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF2Manager(require __DIR__ . '/../../../../config/application.config.php');

	$sqlDirectory = __DIR__ . '/../../../../docs/sql/';

// ZF1
} else if (is_dir(__DIR__ . '/../application/')) {
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF1Manager(__DIR__ . '/../application/');
	$sqlDirectory = __DIR__ . '/../docs/sql/';
} else if (is_dir(__DIR__ . '/../../../../application/')) {
	$configManager = new \TwentyFifth\Migrations\Manager\ConfigManager\ZF1Manager(__DIR__ . '/../../../../application/');
	$sqlDirectory = __DIR__ . '/../../../../docs/sql/';
{'fraction_non_alphanumeric': 0.22058389855499852, 'fraction_numerical': 0.0038336773813034504, 'mean_word_length': 3.5166444740346203, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3347767', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1138, 'n_words': 193}