<commit_before><?php

/**
 * Minds S3 Torrent Builder
 *
 * @author emi
 */

namespace Minds\Core\Torrent\TorrentBuilders;

use Minds\Core\Di\Di;
use Minds\Core\Media\Services\AWS;

class S3 implements TorrentBuilderInterface
{
    /** @var AWS */
    protected $aws;

    /** @var string */
    protected $key;

    /** @var string */
    protected $file;

    public function __construct($aws = null)
    {
        $this->aws = $aws ?: new AWS([
            's3' => [
                'endpoint' => Di::_()->get('Config')->get('cinemr_url'),
                'force_path_style' => true,
                'bucket_endpoint' => true,
            ]
        ]);
    }
<commit_msg>(fix): Allow using roles and default AWS config<commit_after><?php

/**
 * Minds S3 Torrent Builder
 *
 * @author emi
 */

namespace Minds\Core\Torrent\TorrentBuilders;

use Minds\Core\Di\Di;
use Minds\Core\Media\Services\AWS;
use Minds\Core\Media\Services\Factory;

class S3 implements TorrentBuilderInterface
{
    /** @var AWS */
    protected $aws;

    /** @var string */
    protected $key;

    /** @var string */
    protected $file;

    public function __construct($aws = null)
    {
        $this->aws = $aws ?: Factory::build('AWS');
    }

{'fraction_non_alphanumeric': 0.15252854812398042, 'fraction_numerical': 0.004078303425774877, 'mean_word_length': 2.361643835616438, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '2537092', 'n_tokens_mistral': 404, 'n_tokens_neox': 396, 'n_words': 89}