<commit_before><?php
/* @var $this yii\web\View */
/* @var $generator \dlds\giixer\generators\ultimate\Generator */

echo "<?php\n";
?>

namespace <?= $generator->helperComponent->getNsByPattern(basename(__FILE__, '.php'), $generator->helperComponent->getHelperClass(basename(__FILE__, '.php'), true)) ?>;

use yii\helpers\ArrayHelper;
<?php foreach ($generator->usedClasses as $class): ?>
use <?= $class.";\n" ?>
<?php endforeach; ?>

/**
 * This is common IMAGE helper for table "<?= $generator->generateTableName($generator->tableName) ?>".
 *
 */
class <?= $generator->helperComponent->getHelperClass(basename(__FILE__, '.php'), true) ?> extends <?= $baseClass ?> {

    /**
     * Specific versions
     */
    //const VERSION_DEFAULT_AVATAR = 10;

    /**
     * Retrieves image versions
     * @return type
     */
    public static function getVersions()
    {
        $versions = parent::getVersions();

        return ArrayHelper::merge($versions, [
            self::VERSION_XS => function($img) {
                return $img->thumbnail(new \Imagine\Image\Box(65, 65), \Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND);
            },
            self::VERSION_SM => function($img) {
                return $img->thumbnail(new \Imagine\Image\Box(135, 135), \Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND);
            },
        ]);
    }
<commit_msg>fixes<commit_after><?php
/* @var $this yii\web\View */
/* @var $generator \dlds\giixer\generators\ultimate\Generator */

echo "<?php\n";
?>

namespace <?= $generator->helperComponent->getNsByPattern(basename(__FILE__, '.php'), $generator->helperComponent->getHelperClass(basename(__FILE__, '.php'), true)) ?>;

use yii\helpers\ArrayHelper;
<?php foreach ($generator->usedClasses as $class): ?>
use <?= $class.";\n" ?>
<?php endforeach; ?>

/**
 * This is common IMAGE helper for table "<?= $generator->generateTableName($generator->tableName) ?>".
 *
 */
class <?= $generator->helperComponent->getHelperClass(basename(__FILE__, '.php'), true) ?> extends <?= sprintf('\\%s', $baseClass) ?> {

    /**
     * Specific versions
     */
    //const VERSION_DEFAULT_AVATAR = 10;

    /**
     * Retrieves image versions
     * @return type
     */
    public static function getVersions()
    {
        $versions = parent::getVersions();

        return ArrayHelper::merge($versions, [
            self::VERSION_XS => function($img) {
                return $img->thumbnail(new \Imagine\Image\Box(65, 65), \Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND);
            },
            self::VERSION_SM => function($img) {
                return $img->thumbnail(new \Imagine\Image\Box(135, 135), \Imagine\Image\ImageInterface::THUMBNAIL_OUTBOUND);
            },
        ]);
    }

{'fraction_non_alphanumeric': 0.17730755198832543, 'fraction_numerical': 0.008755928493250638, 'mean_word_length': 3.1671732522796354, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 45, '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': '6718958', 'n_tokens_mistral': 865, 'n_tokens_neox': 833, 'n_words': 145}