<commit_before><?php
/**
 * This file is part of the BEAR.Package package
 *
 * @license http://opensource.org/licenses/bsd-license.php BSD
 */
namespace BEAR\Package;

use Composer\Script\Event;

/**
 * Composer callback script
 */
class Installer
{
    /**
     * @param Event $event
     */
    public static function packageUpdate(Event $event)
    {
        $composer = $event->getComposer();
        $version = $event->getComposer()->getPackage()->getPrettyVersion();
        $hash = $event->getComposer()->getLocker()->getLockData()['hash'];
        $bearRoot = dirname(__DIR__);
        file_put_contents($bearRoot . '/VERSION', $version);
        file_put_contents($bearRoot . '/ID', $hash);

        $helloApp = dirname(__DIR__) . '/vendor/bear/demo-apps/Demo.Helloworld';
        $sandboxApp = dirname(__DIR__) . '/vendor/bear/demo-apps/Demo.Sandbox';
        if (file_exists($helloApp)) {
            rename($helloApp, dirname(__DIR__) . '/apps/Demo.Helloworld');
            rename($sandboxApp, dirname(__DIR__) . '/apps/Demo.Sandbox');
        }

        include $bearRoot . '/bin/env.php';
    }
}
<commit_msg>use link to move Demo.* apps<commit_after><?php
/**
 * This file is part of the BEAR.Package package
 *
 * @license http://opensource.org/licenses/bsd-license.php BSD
 */
namespace BEAR\Package;

use BEAR\Sunday\Exception\LogicException;
use Composer\Script\Event;

/**
 * Composer callback script
 */
class Installer
{
    /**
     * @param Event $event
     */
    public static function packageUpdate(Event $event)
    {
        $composer = $event->getComposer();
        $version = $event->getComposer()->getPackage()->getPrettyVersion();
        $hash = $event->getComposer()->getLocker()->getLockData()['hash'];
        $bearRoot = dirname(__DIR__);
        file_put_contents($bearRoot . '/VERSION', $version);
        file_put_contents($bearRoot . '/ID', $hash);

        $targetHello = dirname(__DIR__) . '/vendor/bear/demo-apps/Demo.Helloworld';
        $targetSandbox = dirname(__DIR__) . '/vendor/bear/demo-apps/Demo.Sandbox';
        $helloApp = dirname(__DIR__) . '/apps/Demo.Helloworld';
        $sandboxApp = dirname(__DIR__) . '/apps/Demo.Sandbox';
        if (! file_exists($targetHello)) {
            link($targetHello, $helloApp);
            link($targetSandbox, $sandboxApp);
        }

        include $bearRoot . '/bin/env.php';
    }
}

{'fraction_non_alphanumeric': 0.16303436714165967, 'fraction_numerical': 0.0, 'mean_word_length': 2.8562197092084007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '303767', 'n_tokens_mistral': 759, 'n_tokens_neox': 734, 'n_words': 131}