<commit_before><?php
/**
 * Boostraps the containing Magento installation
 *
 * @author <NAME>
 * @date 2015-04-17
 * @company Linus Shops
 */

namespace LinusShops\Prophet;

class Magento
{
    protected static $loaded = false;

    public static function bootstrap()
    {
        if (!self::isLoaded()) {

            //Check if we can find the necessary Magento files
            $files = array(
                'functions' => 'app/code/core/Mage/Core/functions.php',
                'autoload' => 'lib/Varien/Autoload.php'
            );

            foreach ($files as $file) {
                require_once($file);
            }

            \Varien_Autoload::register();

            require_once 'app/Mage.php';

            \Mage::init();

            self::$loaded = true;
        }
    }

    /**
     * Are the Magento libraries loaded?
     * @return boolean<commit_msg>Moved magento require file list out of function.<commit_after><?php
/**
 * Boostraps the containing Magento installation
 *
 * @author <NAME>
 * @date 2015-04-17
 * @company Linus Shops
 */

namespace LinusShops\Prophet;

class Magento
{
    protected static $loaded = false;

    protected static $magento = array(
        'functions' => 'app/code/core/Mage/Core/functions.php',
        'autoload' => 'lib/Varien/Autoload.php'
    );

    public static function bootstrap()
    {
        if (!self::isLoaded()) {

            foreach (self::$magento as $file) {
                require_once($file);
            }

            \Varien_Autoload::register();

            require_once 'app/Mage.php';

            \Mage::init();

            self::$loaded = true;
        }
    }

    /**
     * Are the Magento libraries loaded?
     * @return boolean
{'fraction_non_alphanumeric': 0.12637045585689555, 'fraction_numerical': 0.009232544720138488, 'mean_word_length': 1.899665551839465, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1061434', 'n_tokens_mistral': 535, 'n_tokens_neox': 505, 'n_words': 119}