<commit_before><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Date: 18.02.14
 * Time: 23:14
 */

namespace Geekhub\DreamBundle\Service;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Liip\ImagineBundle\Imagine\Cache\CacheManager;

class DreamImageHandler
{
    protected $file;
    protected $liipimage;

    public function __construct(CacheManager $cacheManager)
    {
        $this->liipimage = $cacheManager;
    }
    public function init(UploadedFile $file)
    {
        $this->file = $file;
    }

    public function loadCompletedPictures()
    {
        $uploader = new SymfonyFileUploader($this->file, $this->liipimage);
        $uploader->setLiipImagineFilter('dream_thumb');
        $uploader->setUploadPathForPictures('upload/tmp/image/');
        $uploader->setUploadPathForFiles('');
        $uploader->setAllowedSizeForPictures(2*1024*1024);
        $uploader->setAllowedSizeForFile(0);
        $uploader->setAllowedPictureTypes(array('jpg', 'jpeg', 'png'));
        $uploader->setAllowedFilesTypes(array(''));

        $result = $uploader->load();

        return $result;
    }

    public function loadFiles()
    {
        $uploader = new SymfonyFileUploader($this->file, $this->liipimage);
        $uploader->setLiipImagineFilter('dream_thumb');
        $uploader->setUploadPathForPictures('upload/tmp/image/');
        $uploader->setUploadPathForFiles('upload/tmp/files/');
        $uploader->setAllowedSizeForPictures(2*1024*1024);
        $uploader->setAllowedSizeForFile(3*1024*1024);
        $uploader->setAllowedPictureTypes(array('jpg', 'jpeg', 'png', 'gif'));
        $uploader->setAllowedFilesTypes(array('doc', 'pdf', 'xls','ppt'));

        $result = $uploader->load();

        return $result;
    }

    public function loadPoster()
    {
        $uploader = new SymfonyFileUploader($this->file, $this->liipimage);
        $uploader->setLiipImagineFilter('dream_poster');
        $uploader->setUploadPathForPictures('upload/tmp/poster/');
        $uploader->setUploadPathForFiles('');
        $uploader->setAllowedSizeForPictures(2*1024*1024);
        $uploader->setAllowedSizeForFile(0);
        $uploader->setAllowedPictureTypes(array('jpg', 'jpeg', 'png', 'gif'));
        $uploader->setAllowedFilesTypes(array(''));

        $result = $uploader->load();

        return $result;

    }
}<commit_msg>change file size to allow file<commit_after><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Date: 18.02.14
 * Time: 23:14
 */

namespace Geekhub\DreamBundle\Service;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Liip\ImagineBundle\Imagine\Cache\CacheManager;

class DreamImageHandler
{
    protected $file;
    protected $liipimage;

    public function __construct(CacheManager $cacheManager)
    {
        $this->liipimage = $cacheManager;
    }
    public function init(UploadedFile $file)
    {
        $this->file = $file;
    }

    public function loadCompletedPictures()
    {
        $uploader = new SymfonyFileUploader($this->file, $this->liipimage);
        $uploader->setLiipImagineFilter('dream_thumb');
        $uploader->setUploadPathForPictures('upload/tmp/image/');
        $uploader->setUploadPathForFiles('');
        $uploader->setAllowedSizeForPictures(5*1024*1024);
        $uploader->setAllowedSizeForFile(0);
        $uploader->setAllowedPictureTypes(array('jpg', 'jpeg', 'png', 'gif'));
        $uploader->setAllowedFilesTypes(array(''));

        $result = $uploader->load();

        return $result;
    }

    public function loadFiles()
    {
        $uploader = new SymfonyFileUploader($this->file, $this->liipimage);
        $uploader->setLiipImagineFilter('dream_thumb');
        $uploader->setUploadPathForPictures('upload/tmp/image/');
        $uploader->setUploadPathForFiles('upload/tmp/files/');
        $uploader->setAllowedSizeForPictures(5*1024*1024);
        $uploader->setAllowedSizeForFile(3*1024*1024);
        $uploader->setAllowedPictureTypes(array('jpg', 'jpeg', 'png', 'gif'));
        $uploader->setAllowedFilesTypes(array('doc', 'pdf', 'xls','ppt'));

        $result = $uploader->load();

        return $result;
    }

    public function loadPoster()
    {
        $uploader = new SymfonyFileUploader($this->file, $this->liipimage);
        $uploader->setLiipImagineFilter('dream_poster');
        $uploader->setUploadPathForPictures('upload/tmp/poster/');
        $uploader->setUploadPathForFiles('');
        $uploader->setAllowedSizeForPictures(2*1024*1024);
        $uploader->setAllowedSizeForFile(0);
        $uploader->setAllowedPictureTypes(array('jpg', 'jpeg', 'png', 'gif'));
        $uploader->setAllowedFilesTypes(array(''));

        $result = $uploader->load();

        return $result;

    }
}
{'fraction_non_alphanumeric': 0.15386238919375264, 'fraction_numerical': 0.020261713803292527, 'mean_word_length': 3.4919431279620854, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 69, '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': '7482882', 'n_tokens_mistral': 1571, 'n_tokens_neox': 1469, 'n_words': 202}