<commit_before><?php

namespace CanalTP\MediaManager\Test\Storage;

use CanalTP\MediaManager\Registry;
use CanalTP\MediaManager\Company\Configuration\Builder\ConfigurationBuilder;
use CanalTP\MediaManager\Company\Configuration\Configuration;
use CanalTP\MediaManager\Media\Factory\MediaFactory;
use CanalTP\MediaManager\Company\Company;
// use CanalTP\MediaManager\Company\Configuration\Configuration;
// use CanalTP\MediaManager\Strategy\DefaultStrategy;
// use CanalTP\MediaManager\Storage\FileSystem;

class FileSystemTest extends \PHPUnit_Framework_TestCase
{
    private $storage = null;
    private $strategy = null;
    private $media = null;
    private $company = null;
    private $filePath = null;

    public function setUp()
    {
        $factory = new MediaFactory();
        $params = array(
            'company' => array(
                'storage' => array(
                    'type' => 'filesystem',
                    'path' => '/tmp/MediaManager/',
                ),
                'strategy' => 'default'
            )
        );
        $this->company = new Company();
        $this->company->setName('my_company');
        $this->configBuilder = new ConfigurationBuilder();

        $this->company->setConfiguration(
            $this->configBuilder->buildConfiguration($params)
        );
        $this->filePath = Registry::get('/') . Registry::get('SOUND_TEST');
        $this->media = $factory->create($this->filePath);<commit_msg>Syntax updated for sonar<commit_after><?php

namespace CanalTP\MediaManager\Test\Storage;

use CanalTP\MediaManager\Registry;
use CanalTP\MediaManager\Company\Configuration\Builder\ConfigurationBuilder;
use CanalTP\MediaManager\Company\Configuration\Configuration;
use CanalTP\MediaManager\Media\Factory\MediaFactory;
use CanalTP\MediaManager\Company\Company;

class FileSystemTest extends \PHPUnit_Framework_TestCase
{
    private $storage = null;
    private $strategy = null;
    private $media = null;
    private $company = null;
    private $filePath = null;

    public function setUp()
    {
        $factory = new MediaFactory();
        $params = array(
            'company' => array(
                'storage' => array(
                    'type' => 'filesystem',
                    'path' => '/tmp/MediaManager/',
                ),
                'strategy' => 'default'
            )
        );
        $this->company = new Company();
        $this->company->setName('my_company');
        $this->configBuilder = new ConfigurationBuilder();

        $this->company->setConfiguration(
            $this->configBuilder->buildConfiguration($params)
        );
        $this->filePath = Registry::get('/') . Registry::get('SOUND_TEST');
        $this->media = $factory->create($this->filePath);
{'fraction_non_alphanumeric': 0.1296028880866426, 'fraction_numerical': 0.0, 'mean_word_length': 2.6799468791500662, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '1366857', 'n_tokens_mistral': 736, 'n_tokens_neox': 721, 'n_words': 136}