<commit_before><?php

namespace App\View\Helper;

use Cake\View\Helper;
use Cake\View\StringTemplateTrait;

class ElixirHelper extends Helper {

    /**
     * Get the path to a versioned Elixir file.
     *
     * @param  string  $file
     * @param  string  $buildDirectory
     * @return string
     *
     * @throws \InvalidArgumentException
     */
    function version($file, $buildDirectory = 'build')
    {

        static $manifest = [];
        static $manifestPath;

        if (empty($manifest) || $manifestPath !== $buildDirectory) {
            $path = WWW_ROOT.$buildDirectory.'/rev-manifest.json';

            if (file_exists($path)) {
                $manifest = json_decode(file_get_contents($path), true);
                $manifestPath = $buildDirectory;
            }
        }

        if (isset($manifest[$file])) {
            return '/'.trim($buildDirectory.'/'.$manifest[$file], '/');
        }<commit_msg>updating ElixirHelper to basic/non-framework version<commit_after><?php

// update this namespace to match your namespace structure
namespace App;

class ElixirHelper {

    /**
     * Get the path to a versioned Elixir file.
     *
     * @param  string  $file
     * @param  string  $buildDirectory
     * @return string
     *
     * @throws \InvalidArgumentException
     */
    function version($file, $buildDirectory = 'build')
    {

        static $manifest = [];
        static $manifestPath;

        if (empty($manifest) || $manifestPath !== $buildDirectory) {
            $path = WWW_ROOT.$buildDirectory.'/rev-manifest.json';

            if (file_exists($path)) {
                $manifest = json_decode(file_get_contents($path), true);
                $manifestPath = $buildDirectory;
            }
        }

        if (isset($manifest[$file])) {
            return '/'.trim($buildDirectory.'/'.$manifest[$file], '/');
        }
{'fraction_non_alphanumeric': 0.13319126265316994, 'fraction_numerical': 0.0, 'mean_word_length': 2.1884550084889645, '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': '6765942', 'n_tokens_mistral': 548, 'n_tokens_neox': 514, 'n_words': 114}