<commit_before><?php

include '/home/www/workspace/magento/lib/aws.phar';

use Aws\S3\S3Client;
use Aws\S3\Exception\AccessDeniedException;

class MageFM_CDN_Model_Storage_S3 implements MageFM_CDN_Model_Storage_StorageInterface
{

    public function saveContent($path, $content)
    {
        try {
            $s3 = $this->getClient();

            $result = $s3->putObject(array(
                'Bucket' => $this->getConfig('bucket'),
                'Key' => $path,
                'Body' => $content,
                'ACL' => 'public-read',
            ));

            return array(
                'success' => true,
                'url' => $result['ObjectURL']
            );
        } catch (Exception $e) {
            return array(
                'success' => false,
                'message' => $e->getMessage(),
            );
        }
    }<commit_msg>AWS SDK 2.5.2 (S3 and Common only) + dependencies<commit_after><?php

include 'lib/Aws/autoload.php';

use Aws\S3\S3Client;
use Aws\S3\Exception\AccessDeniedException;

class MageFM_CDN_Model_Storage_S3 implements MageFM_CDN_Model_Storage_StorageInterface
{

    public function saveContent($path, $content)
    {
        try {
            $s3 = $this->getClient();

            $result = $s3->putObject(array(
                'Bucket' => $this->getConfig('bucket'),
                'Key' => $path,
                'Body' => $content,
                'ACL' => 'public-read',
            ));

            return array(
                'success' => true,
                'url' => $result['ObjectURL']
            );
        } catch (Exception $e) {
            return array(
                'success' => false,
                'message' => $e->getMessage(),
            );
        }
    }
{'fraction_non_alphanumeric': 0.13952164009111617, 'fraction_numerical': 0.009111617312072893, 'mean_word_length': 1.610698365527489, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '5146442', 'n_tokens_mistral': 541, 'n_tokens_neox': 520, 'n_words': 93}