<commit_before><?php
namespace HealthCareAbroad\MediaBundle\Gaufrette;

use HealthCareAbroad\MediaBundle\Generator\Path\PathGeneratorInterface;
use HealthCareAbroad\MediaBundle\Gaufrette\Adapter\LocalAdapter;
use Gaufrette\Filesystem;

class FilesystemManager
{
    private $baseUploadRootDir;
    private $uploadRootDir;
    private $pathGenerator;

    public function __construct(PathGeneratorInterface $pathGenerator, $baseUploadRootDir)
    {
        $this->pathGenerator = $pathGenerator;
        $this->baseUploadRootDir = $baseUploadRootDir;
    }

    public function get($pathDiscriminator, $adapterType = 'local')
    {
        $this->uploadRootDir = $this->pathGenerator->generatePath($this->baseUploadRootDir, $pathDiscriminator);

        switch ($adapterType) {
            default:
                $adapter = new LocalAdapter($this->uploadRootDir, true);
        }

        return new Filesystem($adapter);
    }

//     public function getDoctor($adapterType = 'local')
//     {
//         $this->uploadRootDir = $this->pathGenerator->generatePath($this->baseUploadRootDir, 'doctors');
    
//         switch ($adapterType) {
//             default:
//                 $adapter = new LocalAdapter($this->uploadRootDir, true);
//         }

//         return new Filesystem($adapter);
//     }

    /**
     * Convenience functions
     *
     * @return string
     */
    public function getUploadRootDir()
    {
        return $this->uploadRootDir;
    }

//     public function getWebRootPath()
//     {
//         //TODO: use path generator
//         return '/media/';
//     }
}<commit_msg>uncomment the getWebRootPath function<commit_after><?php
namespace HealthCareAbroad\MediaBundle\Gaufrette;

use HealthCareAbroad\MediaBundle\Generator\Path\PathGeneratorInterface;
use HealthCareAbroad\MediaBundle\Gaufrette\Adapter\LocalAdapter;
use Gaufrette\Filesystem;

class FilesystemManager
{
    private $baseUploadRootDir;
    private $uploadRootDir;
    private $pathGenerator;

    public function __construct(PathGeneratorInterface $pathGenerator, $baseUploadRootDir)
    {
        $this->pathGenerator = $pathGenerator;
        $this->baseUploadRootDir = $baseUploadRootDir;
    }

    public function get($pathDiscriminator, $adapterType = 'local')
    {
        $this->uploadRootDir = $this->pathGenerator->generatePath($this->baseUploadRootDir, $pathDiscriminator);

        switch ($adapterType) {
            default:
                $adapter = new LocalAdapter($this->uploadRootDir, true);
        }

        return new Filesystem($adapter);
    }

//     public function getDoctor($adapterType = 'local')
//     {
//         $this->uploadRootDir = $this->pathGenerator->generatePath($this->baseUploadRootDir, 'doctors');
    
//         switch ($adapterType) {
//             default:
//                 $adapter = new LocalAdapter($this->uploadRootDir, true);
//         }

//         return new Filesystem($adapter);
//     }

    /**
     * Convenience functions
     *
     * @return string
     */
    public function getUploadRootDir()
    {
        return $this->uploadRootDir;
    }

    public function getWebRootPath()
    {
        //TODO: use path generator
        return '/media/';
    }
}
{'fraction_non_alphanumeric': 0.1175378905041757, 'fraction_numerical': 0.0, 'mean_word_length': 2.6377952755905514, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '4626717', 'n_tokens_mistral': 909, 'n_tokens_neox': 882, 'n_words': 161}