This commit is contained in:
Nicolas Le Goff
2014-03-23 23:07:01 +01:00
parent e45d7edbc3
commit e317f86c51
34 changed files with 93 additions and 110 deletions

View File

@@ -46,14 +46,14 @@ class H264MappingGenerator extends Command
$factory = new H264Factory($this->container['monolog'], true, $type, $this->computeMapping($paths));
$mode = $factory->createMode(true);
$currentConf = isset($this->container['phraseanet.configuration']['h264-pseudo-streaming']) ? $this->container['phraseanet.configuration']['h264-pseudo-streaming'] : array();
$currentMapping = (isset($currentConf['mapping']) && is_array($currentConf['mapping'])) ? $currentConf['mapping'] : array();
$currentConf = isset($this->container['phraseanet.configuration']['h264-pseudo-streaming']) ? $this->container['phraseanet.configuration']['h264-pseudo-streaming'] : [];
$currentMapping = (isset($currentConf['mapping']) && is_array($currentConf['mapping'])) ? $currentConf['mapping'] : [];
$conf = array(
$conf = [
'enabled' => $enabled,
'type' => $type,
'mapping' => array_replace_recursive($mode->getMapping(), $currentMapping),
);
];
if ($input->getOption('write')) {
$output->write("Writing configuration ...");
@@ -64,7 +64,7 @@ class H264MappingGenerator extends Command
} else {
$output->writeln("Configuration will <info>not</info> be written, use <info>--write</info> option to write it");
$output->writeln("");
$output->writeln(Yaml::dump(array('h264-pseudo-streaming' => $conf), 4));
$output->writeln(Yaml::dump(['h264-pseudo-streaming' => $conf], 4));
}
return 0;
@@ -74,7 +74,7 @@ class H264MappingGenerator extends Command
{
$paths = array_unique($paths);
$ret = array();
$ret = [];
foreach ($paths as $path) {
$ret[$path] = $this->pathsToConf($path);
@@ -88,12 +88,12 @@ class H264MappingGenerator extends Command
static $n = 0;
$n++;
return array('mount-point' => 'mp4-videos-'.$n, 'directory' => $path, 'passphrase' => \random::generatePassword(32));
return ['mount-point' => 'mp4-videos-'.$n, 'directory' => $path, 'passphrase' => \random::generatePassword(32)];
}
private function extractPath(\appbox $appbox)
{
$paths = array();
$paths = [];
foreach ($appbox->get_databoxes() as $databox) {
foreach ($databox->get_subdef_structure() as $group => $subdefs) {

View File

@@ -14,7 +14,6 @@ namespace Alchemy\Phrasea\Controller\Admin;
use Alchemy\Phrasea\Exception\InvalidArgumentException;
use Alchemy\Phrasea\Form\TaskForm;
use Alchemy\Phrasea\Model\Entities\Task;
use Alchemy\Phrasea\TaskManager\TaskManagerStatus;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;

View File

@@ -36,7 +36,6 @@ use Alchemy\Phrasea\Model\Entities\FeedItem;
use Alchemy\Phrasea\Model\Entities\LazaretFile;
use Alchemy\Phrasea\Model\Entities\Task;
use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Entities\UserQuery;
use Alchemy\Phrasea\Model\Entities\ValidationData;
use Silex\Application;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -2093,7 +2092,7 @@ class V1 implements ControllerProviderInterface
break;
}
return array(
return [
'@entity@' => self::OBJECT_TYPE_USER,
'id' => $user->getId(),
'email' => $user->getEmail() ?: null,
@@ -2116,7 +2115,7 @@ class V1 implements ControllerProviderInterface
'created_on' => $user->getCreated() ? $user->getCreated()->format(DATE_ATOM) : null,
'updated_on' => $user->getUpdated() ? $user->getUpdated()->format(DATE_ATOM) : null,
'locale' => $user->getLocale() ?: null,
);
];
}
private function logout(Application $app)

View File

@@ -14,7 +14,6 @@ namespace Alchemy\Phrasea\Controller\Client;
use Alchemy\Phrasea\Feed\Aggregate;
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
use Alchemy\Phrasea\Exception\SessionNotFound;
use Alchemy\Phrasea\Model\Entities\UserQuery;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\Finder\Finder;

View File

@@ -20,7 +20,6 @@ use Silex\ControllerProviderInterface;
use Silex\Application as SilexApplication;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Lightbox implements ControllerProviderInterface
{

View File

@@ -17,7 +17,6 @@ use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;

View File

@@ -82,29 +82,29 @@ class Root implements ControllerProviderInterface
$dashboard->execute();
return $app->json(array('html' => $app['twig']->render('report/ajax_dashboard_content_child.html.twig', array(
return $app->json(['html' => $app['twig']->render('report/ajax_dashboard_content_child.html.twig', [
'dashboard' => $dashboard
))));
])]);
}
$granted = array();
$granted = [];
foreach($app['acl']->get($app['authentication']->getUser())->get_granted_base(array('canreport')) as $collection) {
foreach ($app['acl']->get($app['authentication']->getUser())->get_granted_base(['canreport']) as $collection) {
if (!isset($granted[$collection->get_sbas_id()])) {
$granted[$collection->get_sbas_id()] = array(
$granted[$collection->get_sbas_id()] = [
'id' => $collection->get_sbas_id(),
'name' => $collection->get_databox()->get_viewname(),
'collections' => array()
);
'collections' => []
];
}
$granted[$collection->get_sbas_id()]['collections'][] = array(
$granted[$collection->get_sbas_id()]['collections'][] = [
'id' => $collection->get_coll_id(),
'base_id' => $collection->get_base_id(),
'name' => $collection->get_name()
);
];
}
return $app['twig']->render('report/report_layout_child.html.twig', array(
return $app['twig']->render('report/report_layout_child.html.twig', [
'ajax_dash' => true,
'dashboard' => null,
'granted_bases' => $granted,
@@ -115,7 +115,7 @@ class Root implements ControllerProviderInterface
'g_anal' => $app['conf']->get(['registry', 'general', 'analytics']),
'ajax' => false,
'ajax_chart' => false
));
]);
}
/**

View File

@@ -411,7 +411,7 @@ class Xmlhttp implements ControllerProviderInterface
$data = [];
foreach ($app['repo.presets']->findBy(['user' => $user, 'sbasId' => $sbasId], ['creadted' => 'asc']) as $preset) {
$presetData = $fields = [];
array_walk($preset->getData(), function($field) use ($fields) {
array_walk($preset->getData(), function ($field) use ($fields) {
$fields[$field['name']][] = $field['value'];
});
$presetData['id'] = $preset->getId();
@@ -420,6 +420,7 @@ class Xmlhttp implements ControllerProviderInterface
$data[] = $presetData;
}
return $app['twig']->render('thesaurus/presets.html.twig', ['presets' => $data]);
}

View File

@@ -31,7 +31,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function prepare($prepareString)
public function prepare($prepareString)
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -39,7 +39,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function query()
public function query()
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -47,7 +47,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function quote($input, $type=\PDO::PARAM_STR)
public function quote($input, $type=\PDO::PARAM_STR)
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -55,7 +55,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function exec($statement)
public function exec($statement)
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -63,7 +63,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function lastInsertId($name = null)
public function lastInsertId($name = null)
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -71,7 +71,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function beginTransaction()
public function beginTransaction()
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -79,7 +79,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function commit()
public function commit()
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -87,7 +87,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function rollBack()
public function rollBack()
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -95,7 +95,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function errorCode()
public function errorCode()
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}
@@ -103,7 +103,7 @@ class ReconnectableConnection implements ConnectionInterface
/**
* {@inheritdoc}
*/
function errorInfo()
public function errorInfo()
{
return $this->tryMethod(__FUNCTION__, func_get_args());
}

View File

@@ -23,7 +23,6 @@ use Alchemy\Phrasea\Authentication\Phrasea\NativeAuthentication;
use Alchemy\Phrasea\Authentication\Phrasea\OldPasswordEncoder;
use Alchemy\Phrasea\Authentication\Phrasea\PasswordEncoder;
use Alchemy\Phrasea\Authentication\SuggestionFinder;
use Alchemy\Phrasea\Authentication\Token\TokenValidator;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Alchemy\Phrasea\Core\Event\Subscriber\PersistentCookieSubscriber;

View File

@@ -15,7 +15,6 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Model\Manipulator\TokenManipulator;
use Doctrine\ORM\EntityRepository;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class PasswordToken extends Constraint
{

View File

@@ -24,7 +24,7 @@ class Apache extends AbstractServerMode implements H264Interface
*/
public function setMapping(array $mapping)
{
$final = array();
$final = [];
foreach ($mapping as $key => $entry) {
if (!is_array($entry)) {
@@ -47,11 +47,11 @@ class Apache extends AbstractServerMode implements H264Interface
continue;
}
$final[$key] = array(
$final[$key] = [
'directory' => $this->sanitizePath(realpath($entry['directory'])),
'mount-point' => $this->sanitizeMountPoint($entry['mount-point']),
'passphrase' => trim($entry['passphrase']),
);
];
}
$this->mapping = $final;

View File

@@ -70,7 +70,7 @@ class H264Factory
/**
* Creates a new instance of H264 Factory given a configuration.
*
* @param Application $app
* @param Application $app
*
* @return H264Factory
*/
@@ -78,7 +78,7 @@ class H264Factory
{
$conf = $app['phraseanet.configuration']['h264-pseudo-streaming'];
$mapping = array();
$mapping = [];
if (isset($conf['mapping'])) {
$mapping = $conf['mapping'];

View File

@@ -24,7 +24,7 @@ class Nginx extends AbstractServerMode implements H264Interface
*/
public function setMapping(array $mapping)
{
$final = array();
$final = [];
foreach ($mapping as $key => $entry) {
if (!is_array($entry)) {
@@ -47,11 +47,11 @@ class Nginx extends AbstractServerMode implements H264Interface
continue;
}
$final[$key] = array(
$final[$key] = [
'directory' => $this->sanitizePath(realpath($entry['directory'])),
'mount-point' => $this->sanitizeMountPoint($entry['mount-point']),
'passphrase' => trim($entry['passphrase']),
);
];
}
$this->mapping = $final;
@@ -107,7 +107,7 @@ class Nginx extends AbstractServerMode implements H264Interface
$path = $entry['mount-point'].substr($pathfile, strlen($entry['directory']));
$expire = time() + 3600; // At which point in time the file should expire. time() + x; would be the usual usage.
$hash = str_replace(array('+', '/', '='), array('-', '_', ''), base64_encode(md5($expire.$path.' '.$entry['passphrase'], true)));
$hash = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(md5($expire.$path.' '.$entry['passphrase'], true)));
return Url::factory($path.'?hash='.$hash.'&expires='.$expire);
}

View File

@@ -62,7 +62,7 @@ class Token
/**
* Set value
*
* @param string $value
* @param string $value
* @return Token
*/
public function setValue($value)
@@ -85,7 +85,7 @@ class Token
/**
* Set type
*
* @param string $type
* @param string $type
* @return Token
*/
public function setType($type)
@@ -108,7 +108,7 @@ class Token
/**
* Set data
*
* @param string $data
* @param string $data
* @return Token
*/
public function setData($data)
@@ -131,7 +131,7 @@ class Token
/**
* Set created
*
* @param \DateTime $created
* @param \DateTime $created
* @return Token
*/
public function setCreated($created)
@@ -154,7 +154,7 @@ class Token
/**
* Set updated
*
* @param \DateTime $updated
* @param \DateTime $updated
* @return Token
*/
public function setUpdated($updated)
@@ -177,7 +177,7 @@ class Token
/**
* Set expiration
*
* @param \DateTime $updated
* @param \DateTime $updated
* @return Token
*/
public function setExpiration(\DateTime $expiration = null)
@@ -200,7 +200,7 @@ class Token
/**
* Set user
*
* @param User $user
* @param User $user
* @return Token
*/
public function setUser(User $user = null)

View File

@@ -17,7 +17,6 @@ use Alchemy\Phrasea\Model\Entities\Token;
use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Repositories\TokenRepository;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\Query;
use RandomLib\Generator;
class TokenManipulator implements ManipulatorInterface
@@ -48,10 +47,10 @@ class TokenManipulator implements ManipulatorInterface
}
/**
* @param User|null $user
* @param string $type
* @param User|null $user
* @param string $type
* @param \DateTime|null $expiration
* @param mixed|null $data
* @param mixed|null $data
*
* @return Token
*/
@@ -84,7 +83,7 @@ class TokenManipulator implements ManipulatorInterface
/**
* @param Basket $basket
* @param User $user
* @param User $user
*
* @return Token
*/
@@ -99,7 +98,7 @@ class TokenManipulator implements ManipulatorInterface
/**
* @param Basket $basket
* @param User $user
* @param User $user
*
* @return Token
*/
@@ -109,7 +108,7 @@ class TokenManipulator implements ManipulatorInterface
}
/**
* @param User $user
* @param User $user
* @param FeedEntry $entry
*
* @return Token

View File

@@ -4,7 +4,6 @@ namespace Alchemy\Phrasea\Model\Repositories;
use Alchemy\Phrasea\Model\Entities\Basket;
use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Entities\ValidationParticipant;
use Alchemy\Phrasea\Model\Manipulator\TokenManipulator;
use Doctrine\ORM\EntityRepository;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Model\Types;
use Alchemy\Phrasea\Exception\RuntimeException;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Platforms\AbstractPlatform;

View File

@@ -12,11 +12,8 @@
namespace Alchemy\Phrasea\Setup\Version\PreSchemaUpgrade;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Model\Entities\User;
use Alchemy\Phrasea\Model\Entities\FtpCredential;
use Doctrine\DBAL\Migrations\Configuration\Configuration;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\NoResultException;
use Doctrine\ORM\Query;
use Doctrine\ORM\Query\ResultSetMapping;

View File

@@ -17,7 +17,7 @@ class patch_384alpha1a implements patchInterface
private $release = '3.8.4-alpha.1';
/** @var array */
private $concern = array(base::APPLICATION_BOX);
private $concern = [base::APPLICATION_BOX];
/**
* {@inheritdoc}
@@ -58,11 +58,11 @@ class patch_384alpha1a implements patchInterface
{
$config = $app['phraseanet.configuration']->getConfig();
$config['h264-pseudo-streaming'] = array(
$config['h264-pseudo-streaming'] = [
'enabled' => false,
'type' => null,
'mapping' => array(),
);
'mapping' => [],
];
$app['phraseanet.configuration']->setConfig($config);

View File

@@ -10,8 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Model\Entities\Preset;
use Gedmo\Timestampable\TimestampableListener;
class patch_390alpha18a extends patchAbstract
{

View File

@@ -16,7 +16,6 @@ use Doctrine\ORM\Query;
use Doctrine\ORM\NoResultException;
use Gedmo\Timestampable\TimestampableListener;
class patch_390alpha1a extends patchAbstract
{
/** @var string */

View File

@@ -25,6 +25,7 @@ class DataboxTest extends \PhraseanetAuthenticatedWebTestCase
{
if (!self::$createdCollections) {
parent::tearDown();
return;
}

View File

@@ -8,7 +8,6 @@ use Alchemy\Phrasea\Controller\Api\V1;
use Alchemy\Phrasea\Core\PhraseaEvents;
use Alchemy\Phrasea\Authentication\Context;
use Alchemy\Phrasea\Model\Entities\Task;
use Alchemy\Phrasea\Model\Entities\LazaretSession;
use Alchemy\Phrasea\Model\Entities\User;
use Doctrine\Common\Collections\ArrayCollection;
use Guzzle\Common\Exception\GuzzleException;
@@ -1783,9 +1782,9 @@ abstract class ApiTestCase extends \PhraseanetWebTestCase
$route = '/api/v1/me/';
$this->evaluateMethodNotAllowedRoute($route, array('POST', 'PUT', 'DELETE'));
$this->evaluateMethodNotAllowedRoute($route, ['POST', 'PUT', 'DELETE']);
self::$DI['client']->request('GET', $route, $this->getParameters(), array(), array('HTTP_Accept' => $this->getAcceptMimeType()));
self::$DI['client']->request('GET', $route, $this->getParameters(), [], ['HTTP_Accept' => $this->getAcceptMimeType()]);
$content = $this->unserialize(self::$DI['client']->getResponse()->getContent());
$this->assertArrayHasKey('user', $content['response']);
@@ -1795,7 +1794,7 @@ abstract class ApiTestCase extends \PhraseanetWebTestCase
protected function evaluateGoodUserItem($data, User $user)
{
foreach (array(
foreach ([
'@entity@' => V1::OBJECT_TYPE_USER,
'id' => $user->getId(),
'email' => $user->getEmail() ?: null,
@@ -1817,7 +1816,7 @@ abstract class ApiTestCase extends \PhraseanetWebTestCase
'created_on' => $user->getCreated() ? $user->getCreated()->format(DATE_ATOM) : null,
'updated_on' => $user->getUpdated() ? $user->getUpdated()->format(DATE_ATOM) : null,
'locale' => $user->getLocale() ?: null,
) as $key => $value) {
] as $key => $value) {
$this->assertArrayHasKey($key, $data, 'Assert key is present '.$key);
if ($value) {
$this->assertEquals($value, $data[$key], 'Check key '.$key);

View File

@@ -28,10 +28,10 @@ class RootTest extends \PhraseanetAuthenticatedWebTestCase
{
$this->authenticate(self::$DI['app']);
$this->XMLHTTPRequest('GET', '/report/dashboard', array(
$this->XMLHTTPRequest('GET', '/report/dashboard', [
'dmin' => $this->dmin->format('Y-m-d'),
'dmax' => $this->dmin->format('Y-m-d'),
));
]);
$response = self::$DI['client']->getResponse();

View File

@@ -6,7 +6,6 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Model\Entities\Registration;
use Alchemy\Phrasea\Model\Entities\User;
use RandomLib\Factory;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class AccountTest extends \PhraseanetAuthenticatedWebTestCase
{

View File

@@ -5,7 +5,6 @@ namespace Alchemy\Tests\Phrasea\Form\Constraint;
use Alchemy\Phrasea\Form\Constraint\PasswordToken;
use Alchemy\Phrasea\Model\Entities\Token;
use Alchemy\Phrasea\Model\Manipulator\TokenManipulator;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class PasswordTokenTest extends \PhraseanetTestCase
{

View File

@@ -31,16 +31,16 @@ class ApacheTest extends \PhraseanetTestCase
touch($file);
}
$mapping = array(array(
$mapping = [[
'directory' => $dir,
'mount-point' => 'mp4-videos',
'passphrase' => '123456',
));
]];
return array(
array(array(), null, '/path/to/file'),
array($mapping, null, '/path/to/file'),
array($mapping, '/^\/mp4-videos\/[a-zA-Z0-9]+\/[0-9a-f]+\/to\/file$/', $file),
);
return [
[[], null, '/path/to/file'],
[$mapping, null, '/path/to/file'],
[$mapping, '/^\/mp4-videos\/[a-zA-Z0-9]+\/[0-9a-f]+\/to\/file$/', $file],
];
}
}

View File

@@ -66,19 +66,19 @@ class H264FactoryTest extends \PhraseanetTestCase
public function provideTypes()
{
return array(
array('nginx', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Nginx'),
array('apache', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'),
array('apache2', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'),
);
return [
['nginx', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Nginx'],
['apache', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'],
['apache2', $this->getNginxMapping(), 'Alchemy\Phrasea\Http\H264PseudoStreaming\Apache'],
];
}
private function getNginxMapping()
{
return array(array(
return [[
'directory' => __DIR__ . '/../../../../files/',
'mount-point' => '/protected/',
'passphrase' => 'dfdskqhfsfilddsmfmqsdmlfomqs',
));
]];
}
}

View File

@@ -31,16 +31,16 @@ class NginxTest extends \PhraseanetTestCase
touch($file);
}
$mapping = array(array(
$mapping = [[
'directory' => $dir,
'mount-point' => 'mp4-videos',
'passphrase' => '123456',
));
]];
return array(
array(array(), null, '/path/to/file'),
array($mapping, null, '/path/to/file'),
array($mapping, '/^\/mp4-videos\/to\/file\?hash=[a-zA-Z0-9-_+]+&expires=[0-9]+/', $file),
);
return [
[[], null, '/path/to/file'],
[$mapping, null, '/path/to/file'],
[$mapping, '/^\/mp4-videos\/to\/file\?hash=[a-zA-Z0-9-_+]+&expires=[0-9]+/', $file],
];
}
}

View File

@@ -88,7 +88,7 @@ class TokenManipulatorTest extends \PhraseanetTestCase
public function testCreateDownloadToken()
{
$data = serialize(array('some' => 'data'));
$data = serialize(['some' => 'data']);
$manipulator = new TokenManipulator(self::$DI['app']['EM'], self::$DI['app']['random.low'], self::$DI['app']['repo.tokens']);
$token = $manipulator->createDownloadToken(self::$DI['user'], $data);
@@ -100,7 +100,7 @@ class TokenManipulatorTest extends \PhraseanetTestCase
public function testCreateEmailExportToken()
{
$data = serialize(array('some' => 'data'));
$data = serialize(['some' => 'data']);
$manipulator = new TokenManipulator(self::$DI['app']['EM'], self::$DI['app']['random.low'], self::$DI['app']['repo.tokens']);
$token = $manipulator->createEmailExportToken($data);