<commit_before><?php

namespace Morfeu\Bundle\EntityBundle\Entity;

use Morfeu\Bundle\BusinessBundle\Service\UploadFileService;
use Symfony\Component\HttpFoundation\File\File;

abstract class BaseEntity
{

    public function upload($file, $extension = array('png', 'jpg'), $maxSize = 2097152)
    {
        $upload = new UploadFileService();
        $upload->setFormatExtensions($extension);
        $upload->setMaxSize($maxSize);
        $upload->setUploadDir($this->getUploadDir());
        $upload->setFile($file);

        $this->path = $upload->upload();

        return $upload->getFileName();
    }

    public function removeUpload($file)
    {
        $upload = new UploadFileService();
        $upload->setUploadDir($this->getUploadDir());

        $upload->setFile($file);

        $upload->removeUpload();
    }

    protected function getUploadDir()
    {
        return "uploads/" . substr(strrchr(get_class($this), "\\"), 1);
    }

    public function getImageComplete($file)
    {
        $result = null;
<commit_msg>Corrected the return in method function of upload<commit_after><?php

namespace Morfeu\Bundle\EntityBundle\Entity;

use Morfeu\Bundle\BusinessBundle\Service\UploadFileService;
use Symfony\Component\HttpFoundation\File\File;

abstract class BaseEntity
{

    public function upload($file, $extension = array('png', 'jpg'), $maxSize = 2097152)
    {
        $upload = new UploadFileService();
        $upload->setFormatExtensions($extension);
        $upload->setMaxSize($maxSize);
        $upload->setUploadDir($this->getUploadDir());
        $upload->setFile($file);

        $this->path = $upload->upload();

        return $upload->getFileName();
    }

    public function removeUpload($file)
    {
        $upload = new UploadFileService();
        $upload->setUploadDir($this->getUploadDir());

        $upload->setFile($file);

        $remove = $upload->removeUpload();

        return $remove;
    }

    protected function getUploadDir()
    {
        return "uploads/" . substr(strrchr(get_class($this), "\\"), 1);
    }

    public function getImageComplete($file)
    {
        $result = null;

{'fraction_non_alphanumeric': 0.14572629612330687, 'fraction_numerical': 0.007473143390938813, 'mean_word_length': 3.08, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '7145537', 'n_tokens_mistral': 638, 'n_tokens_neox': 603, 'n_words': 110}