<commit_before><?php
namespace Craft;

use InvalidArgumentException;
use AssetRev\Utilities\FilenameRev;

class AssetRevService extends BaseApplicationComponent
{
    /**
     * Get the filename of a asset
     *
     * @param $file
     * @throws InvalidArgumentException
     * @return string
     */
    public function getAssetFilename($file)
    {
        $revver = new FilenameRev(
            $this->parseEnvironmentString(craft()->config->get('manifestPath', 'assetrev')),
            $this->parseEnvironmentString(craft()->config->get('assetsBasePath', 'assetrev')),
            $this->parseEnvironmentString(craft()->config->get('assetPrefix', 'assetrev'))
        );

        $revver->setBasePath(CRAFT_BASE_PATH);

        return $revver->rev($file);
    }

    /**
     * Build an asset's URL
     *
     * @param  string $basePath Base path to assets as defined in the plugin settings
     * @param  string $file     Asset filename<commit_msg>Fix asset url prefix config key<commit_after><?php
namespace Craft;

use InvalidArgumentException;
use AssetRev\Utilities\FilenameRev;

class AssetRevService extends BaseApplicationComponent
{
    /**
     * Get the filename of a asset
     *
     * @param $file
     * @throws InvalidArgumentException
     * @return string
     */
    public function getAssetFilename($file)
    {
        $revver = new FilenameRev(
            $this->parseEnvironmentString(craft()->config->get('manifestPath', 'assetrev')),
            $this->parseEnvironmentString(craft()->config->get('assetsBasePath', 'assetrev')),
            $this->parseEnvironmentString(craft()->config->get('assetUrlPrefix', 'assetrev'))
        );

        $revver->setBasePath(CRAFT_BASE_PATH);

        return $revver->rev($file);
    }

    /**
     * Build an asset's URL
     *
     * @param  string $basePath Base path to assets as defined in the plugin settings
     * @param  string $file     Asset filename
{'fraction_non_alphanumeric': 0.11989664082687339, 'fraction_numerical': 0.0, 'mean_word_length': 2.9672131147540983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '2961302', 'n_tokens_mistral': 533, 'n_tokens_neox': 514, 'n_words': 124}