PHP CS fix

This commit is contained in:
Nicolas Le Goff
2014-05-30 15:22:00 +02:00
parent 8dd6512cf8
commit e5b8817c46
99 changed files with 113 additions and 166 deletions

View File

@@ -67,16 +67,9 @@ use Alchemy\Phrasea\Controller\Root\Session;
use Alchemy\Phrasea\Controller\Setup as SetupController;
use Alchemy\Phrasea\Controller\Thesaurus\Thesaurus;
use Alchemy\Phrasea\Controller\Thesaurus\Xmlhttp as ThesaurusXMLHttp;
use Alchemy\Phrasea\Controller\Utils\ConnectionTest;
use Alchemy\Phrasea\Controller\Utils\PathFileTest;
use Alchemy\Phrasea\Controller\User\Notifications;
use Alchemy\Phrasea\Controller\User\Preferences;
use Alchemy\Phrasea\Core\Event\Subscriber\SessionManagerSubscriber;
use Alchemy\Phrasea\Core\PhraseaExceptionHandler;
use Alchemy\Phrasea\Core\Event\Subscriber\LogoutSubscriber;
use Alchemy\Phrasea\Core\Event\Subscriber\PhraseaLocaleSubscriber;
use Alchemy\Phrasea\Core\Event\Subscriber\MaintenanceSubscriber;
use Alchemy\Phrasea\Core\Event\Subscriber\CookiesDisablerSubscriber;
use Alchemy\Phrasea\Core\Provider\AuthenticationManagerServiceProvider;
use Alchemy\Phrasea\Core\Provider\BrowserServiceProvider;
use Alchemy\Phrasea\Core\Provider\BorderManagerServiceProvider;
@@ -103,7 +96,6 @@ use Alchemy\Phrasea\Core\Provider\TemporaryFilesystemServiceProvider;
use Alchemy\Phrasea\Core\Provider\TokensServiceProvider;
use Alchemy\Phrasea\Core\Provider\UnicodeServiceProvider;
use Alchemy\Phrasea\Exception\InvalidArgumentException;
use Alchemy\Phrasea\Exception\LogicException;
use Alchemy\Phrasea\Twig\JSUniqueID;
use Alchemy\Phrasea\Twig\Fit;
use Alchemy\Phrasea\Twig\Camelize;
@@ -136,10 +128,8 @@ use XPDF\XPDFServiceProvider;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\Form\FormFactory;
use Symfony\Component\Form\FormTypeInterface;
@@ -284,7 +274,7 @@ class Application extends SilexApplication
'session.test' => $this->getEnvironment() === static::ENV_TEST,
'session.storage.options' => array('cookie_lifetime' => 0)
));
$this['session.storage.test'] = $this->share(function($app) {
$this['session.storage.test'] = $this->share(function ($app) {
return new MockArraySessionStorage();
});

View File

@@ -3,7 +3,6 @@
namespace Alchemy\Phrasea\Authentication\Phrasea;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Authentication\Phrasea\FailureManager;
use Symfony\Component\HttpFoundation\Request;
class FailureHandledNativeAuthentication implements PasswordAuthenticationInterface

View File

@@ -12,7 +12,6 @@
namespace Alchemy\Phrasea\Border;
use Alchemy\Phrasea\Core\Configuration\Configuration;
use Alchemy\Phrasea\Media\MimeTypeGuesser as AlchemyMimeTypeGuesser;
use MediaVorus\Utils\AudioMimeTypeGuesser;
use MediaVorus\Utils\PostScriptMimeTypeGuesser;
use MediaVorus\Utils\RawImageMimeTypeGuesser;

View File

@@ -11,13 +11,6 @@
namespace Alchemy\Phrasea\Cache;
use Alchemy\Phrasea\Cache\ApcCache;
use Alchemy\Phrasea\Cache\ArrayCache;
use Alchemy\Phrasea\Cache\Cache;
use Alchemy\Phrasea\Cache\MemcacheCache;
use Alchemy\Phrasea\Cache\RedisCache;
use Alchemy\Phrasea\Cache\WinCacheCache;
use Alchemy\Phrasea\Cache\XcacheCache;
use Alchemy\Phrasea\Exception\RuntimeException;
class Factory

View File

@@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Cache;
use Alchemy\Phrasea\Exception\RuntimeException;
use Alchemy\Phrasea\Core\Configuration\Compiler;
use Alchemy\Phrasea\Cache\Cache;
use Alchemy\Phrasea\Cache\Factory;
use Monolog\Logger;
class Manager

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Command;
use Alchemy\Phrasea\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Command;
use Alchemy\Phrasea\Command\Command;
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Command;
use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Core\Event\CollectionCreateEvent;
use Alchemy\Phrasea\Core\PhraseaEvents;
use Symfony\Component\Console\Input\InputArgument;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Command;
use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Border\File;
use Alchemy\Phrasea\Border\Manager;
use Entities\LazaretFile;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Command;
use Alchemy\Phrasea\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Command;
use Alchemy\Phrasea\Command\Command;
use Alchemy\Phrasea\Command\Upgrade\Step31;
use Alchemy\Phrasea\Command\Upgrade\Step35;
use Symfony\Component\Console\Input\InputOption;

View File

@@ -196,7 +196,7 @@ class Users implements ControllerProviderInterface
}
$filename = sprintf('user_export_%s.csv', date('Ymd'));
$response = new CSVFileResponse($filename, function() use ($app, $userTable) {
$response = new CSVFileResponse($filename, function () use ($app, $userTable) {
$app['csv.exporter']->export('php://output', $userTable);
});
@@ -343,7 +343,7 @@ class Users implements ControllerProviderInterface
} while (count($results) > 0);
$filename = sprintf('user_export_%s.csv', date('Ymd'));
$response = new CSVFileResponse($filename, function() use ($app, $buffer) {
$response = new CSVFileResponse($filename, function () use ($app, $buffer) {
$app['csv.exporter']->export('php://output', $buffer);
});
@@ -601,7 +601,7 @@ class Users implements ControllerProviderInterface
$nbUsrToAdd = 0;
$lines = array();
$app['csv.interpreter']->addObserver(function(array $row) use (&$lines) {
$app['csv.interpreter']->addObserver(function (array $row) use (&$lines) {
$lines[] = $row;
});
$app['csv.lexer']->parse($file->getPathname(), $app['csv.interpreter']);

View File

@@ -307,8 +307,6 @@ class Activity implements ControllerProviderInterface
$activity->setConfig(false);
if ($request->request->get('printcsv') == 'on') {
$activity->setHasLimit(false);
$activity->setPrettyString(false);
@@ -860,13 +858,13 @@ class Activity implements ControllerProviderInterface
$result = $report->getResult();
array_unshift($result, $headers);
$collection = new CallbackCollection($result, function($row) use ($report) {
$collection = new CallbackCollection($result, function ($row) use ($report) {
// restrict to displayed fields
return array_map('strip_tags', array_intersect_key($row, $report->getDisplay()));
});
$filename = sprintf('report_export_%s_%s.csv', $type, date('Ymd'));
$response = new CSVFileResponse($filename, function() use ($app, $collection) {
$response = new CSVFileResponse($filename, function () use ($app, $collection) {
$app['csv.exporter']->export('php://output', $collection);
});

View File

@@ -469,7 +469,6 @@ class Informations implements ControllerProviderInterface
$reportArray = $info->buildTabGrpInfo(false, array(), $request->request->get('user'), $conf, false);
if ($request->request->get('printcsv') == 'on') {
return $this->getCSVResponse($app, $info, 'info_user');
}
@@ -518,13 +517,13 @@ class Informations implements ControllerProviderInterface
$result = $report->getResult();
array_unshift($result, $headers);
$collection = new CallbackCollection($result, function($row) use ($report) {
$collection = new CallbackCollection($result, function ($row) use ($report) {
// restrict fields to the displayed ones
return array_map('strip_tags', array_intersect_key($row, $report->getDisplay()));
});
$filename = sprintf('report_export_%s_%s.csv', $type, date('Ymd'));
$response = new CSVFileResponse($filename, function() use ($app, $collection) {
$response = new CSVFileResponse($filename, function () use ($app, $collection) {
$app['csv.exporter']->export('php://output', $collection);
});

View File

@@ -18,7 +18,6 @@ use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
class Root implements ControllerProviderInterface
{
@@ -89,7 +88,7 @@ class Root implements ControllerProviderInterface
}
$granted = array();
foreach($app['authentication']->getUser()->acl()->get_granted_base(array('canreport')) as $collection) {
foreach ($app['authentication']->getUser()->acl()->get_granted_base(array('canreport')) as $collection) {
if (!isset($granted[$collection->get_sbas_id()])) {
$granted[$collection->get_sbas_id()] = array(
'id' => $collection->get_sbas_id(),
@@ -483,28 +482,28 @@ class Root implements ControllerProviderInterface
$result = array();
$result[] = array_keys($conf_nav);
foreach($report['nav']['result'] as $row) {
foreach ($report['nav']['result'] as $row) {
$result[] = array_values($row);
};
$result[] = array_keys($conf_os);
foreach($report['os']['result'] as $row) {
foreach ($report['os']['result'] as $row) {
$result[] = array_values($row);
};
$result[] = array_keys($conf_res);
foreach($report['res']['result'] as $row) {
foreach ($report['res']['result'] as $row) {
$result[] = array_values($row);
};
$result[] = array_keys($conf_mod);
foreach($report['mod']['result'] as $row) {
foreach ($report['mod']['result'] as $row) {
$result[] = array_values($row);
};
$result[] = array_keys($conf_combo);
foreach($report['combo']['result'] as $row) {
foreach ($report['combo']['result'] as $row) {
$result[] = array_values($row);
};
$filename = sprintf('report_export_info_%s.csv', date('Ymd'));
$response = new CSVFileResponse($filename, function() use ($app, $result) {
$response = new CSVFileResponse($filename, function () use ($app, $result) {
$app['csv.exporter']->export('php://output', $result);
});
@@ -683,13 +682,13 @@ class Root implements ControllerProviderInterface
$result = $report->getResult();
array_unshift($result, $headers);
$collection = new CallbackCollection($result, function($row) use ($report) {
$collection = new CallbackCollection($result, function ($row) use ($report) {
// restrict fields to the displayed ones
return array_map('strip_tags', array_intersect_key($row, $report->getDisplay()));
});
$filename = sprintf('report_export_%s_%s.csv', $type, date('Ymd'));
$response = new CSVFileResponse($filename, function() use ($app, $collection) {
$response = new CSVFileResponse($filename, function () use ($app, $collection) {
$app['csv.exporter']->export('php://output', $collection);
});

View File

@@ -230,7 +230,6 @@ class Developers implements ControllerProviderInterface
return $app->json(array('success' => !$error));
}
/**
* Change application webhook
*

View File

@@ -825,8 +825,7 @@ class Xmlhttp implements ControllerProviderInterface
$lcoll = '';
$collections = $app['authentication']->getUser()->ACL()
->get_granted_base(array(), array($sbid)); // array(), $sbid);
foreach($collections as $collection)
{
foreach ($collections as $collection) {
$lcoll .= ($lcoll?",":"") . $collection->get_coll_id();
}
$site = $app['phraseanet.configuration']['main']['key'];

View File

@@ -113,7 +113,7 @@ class SessionManagerSubscriber implements EventSubscriberInterface
$idle = 0;
if (isset($this->app["phraseanet.configuration"]["session"]["idle"])) {
$idle = (int)($this->app["phraseanet.configuration"]["session"]["idle"]);
$idle = (int) ($this->app["phraseanet.configuration"]["session"]["idle"]);
}
$now = new \DateTime();
$dt = $now->getTimestamp() - $session->getUpdated()->getTimestamp();

View File

@@ -26,6 +26,7 @@ class CSVServiceProvider implements ServiceProviderInterface
{
$app['csv.exporter.config'] = $app->share(function () {
$config = new ExporterConfig();
return $config
->setDelimiter(";")
->setEnclosure('"')

View File

@@ -23,19 +23,19 @@ class PhraseaEventServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['phraseanet.logout-subscriber'] = $app->share(function(Application $app) {
$app['phraseanet.logout-subscriber'] = $app->share(function (Application $app) {
return new LogoutSubscriber();
});
$app['phraseanet.locale-subscriber'] = $app->share(function(Application $app) {
$app['phraseanet.locale-subscriber'] = $app->share(function (Application $app) {
return new PhraseaLocaleSubscriber($app);
});
$app['phraseanet.maintenance-subscriber'] = $app->share(function(Application $app) {
$app['phraseanet.maintenance-subscriber'] = $app->share(function (Application $app) {
return new MaintenanceSubscriber($app);
});
$app['phraseanet.cookie-disabler-subscriber'] = $app->share(function(Application $app) {
$app['phraseanet.cookie-disabler-subscriber'] = $app->share(function (Application $app) {
return new CookiesDisablerSubscriber($app);
});
$app['phraseanet.session-manager-subscriber'] = $app->share(function(Application $app) {
$app['phraseanet.session-manager-subscriber'] = $app->share(function (Application $app) {
return new SessionManagerSubscriber($app);
});
}

View File

@@ -11,7 +11,6 @@
namespace Alchemy\Phrasea\Notification;
use Alchemy\Phrasea\Notification\EmitterInterface;
use Alchemy\Phrasea\Notification\Mail\MailInterface;
use Alchemy\Phrasea\Exception\LogicException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

View File

@@ -12,8 +12,6 @@
namespace Alchemy\Phrasea\SearchEngine;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
use Alchemy\Phrasea\SearchEngine\SearchEngineResult;
use Alchemy\Phrasea\Exception\RuntimeException;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Doctrine\Common\Collections\ArrayCollection;

View File

@@ -9,7 +9,6 @@
* file that was distributed with this source code.
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Exception\RuntimeException;
class API_Webhook

View File

@@ -122,7 +122,7 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf
try {
$feedIds = $collection->get_data_from_cache(self::CACHE_PUBLIC);
return new self($app, array_map(function($id) use ($app) {
return new self($app, array_map(function ($id) use ($app) {
return new \Feed_Adapter($app, $id);
}, $feedIds));
} catch (CacheException $e) {
@@ -140,7 +140,7 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf
$feeds[] = new \Feed_Adapter($app, $row['id']);
}
$collection->set_data_to_cache(array_map(function($feed) {
$collection->set_data_to_cache(array_map(function ($feed) {
return $feed->get_id();
}, $feeds), self::CACHE_PUBLIC);

View File

@@ -397,14 +397,13 @@ class caption_Field_Value implements cache_cacheableInterface
$note += ($node->getAttribute("w") == $term_noacc) ? 2 : 0;
if($context_noacc != "")
$note += ($node->getAttribute("k") == $context_noacc) ? 1 : 0;
if($note > $bestnote)
{
if ($note > $bestnote) {
$bestnote = $note;
$bestnode = $node;
}
}
if($bestnode) {
if ($bestnode) {
list($term, $context) = $this->splitTermAndContext(str_replace(array("[[em]]", "[[/em]]"), array("", ""), $value));
// a value has been found in thesaurus, update value & set the query to bounce to the value
$this->value = $bestnode->getAttribute('v');
@@ -414,7 +413,6 @@ class caption_Field_Value implements cache_cacheableInterface
$this->isThesaurusValue = false;
}
return $this;
}

View File

@@ -10,8 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Filesystem\Filesystem;
class patch_384alpha3a implements patchInterface
{

View File

@@ -10,8 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Filesystem\Filesystem;
class patch_384alpha4a implements patchInterface
{

View File

@@ -65,7 +65,7 @@ class task_period_apiwebhooks extends task_appboxAbstract
$rows = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$stmt->closeCursor();
return array_map(function($row) {
return array_map(function ($row) {
return $row['webhook_url'];
}, $rows);
}

View File

@@ -162,4 +162,3 @@ session:
idle: 0
# 1 week
lifetime: 604800

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Application;
use Symfony\Component\HttpFoundation\Response;
class ApiJSONPApplication extends ApiAbstract
class ApiJSONPTest extends ApiAbstract
{
protected function evaluateResponseBadRequest(Response $response)

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Application;
class ApiJsonApplication extends ApiAbstract
class ApiJsonTest extends ApiAbstract
{
public function getParameters(array $parameters = array())

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Application;
class ApiYamlApplication extends ApiAbstract
class ApiYamlTest extends ApiAbstract
{
public function getParameters(array $parameters = array())

View File

@@ -9,7 +9,7 @@ use Alchemy\Phrasea\Authentication\Context;
* Test oauthv2 flow based on ietf authv2 spec
* @link http://tools.ietf.org/html/draft-ietf-oauth-v2-18
*/
class oauthv2_application_test extends \PhraseanetWebTestCaseAuthenticatedAbstract
class OAuth2Test extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
/**
*

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Application;
use Alchemy\Phrasea\Border\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class ApplicationOverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
public function testDatafilesRouteAuthenticated()
{

View File

@@ -2,7 +2,6 @@
namespace Alchemy\Phrasea\Authentication\PersistentCookie;
use Alchemy\Phrasea\Authentication\PersistentCookie\Manager;
use Entities\Session;
class ManagerTest extends \PHPUnit_Framework_TestCase

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Cache;
use \Alchemy\Phrasea\Cache\RedisCache;
class RedisTest extends \PhraseanetPHPUnitAbstract
class RedisCacheTest extends \PhraseanetPHPUnitAbstract
{
public function testBasics()

View File

@@ -2,8 +2,6 @@
namespace Alchemy\Phrasea\Command\Compile;
use Alchemy\Phrasea\Command\Compile\Configuration;
class ConfigurationTest extends \PhraseanetPHPUnitAbstract
{
public function testExecute()

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Admin;
use PHPExiftool\Driver\Tag\IPTC\ObjectName;
use Alchemy\Phrasea\Vocabulary\Controller as VocabularyController;
class ControllerFieldsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class FieldsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
public function testRoot()
{

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Admin;
class Module_Admin_Route_PublicationTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class PublicationTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
public static $account = null;
public static $api = null;

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Admin;
use Alchemy\Phrasea\Media\Subdef\Image;
class ControllerSubdefsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class SubdefsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Admin;
class ControllerUsersTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class UsersTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;
protected $usersParameters;

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Application;
class ControllerBasketTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class BasketTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod;
require_once __DIR__ . '/../../../../../classes/Bridge/Bridge_datas.inc';
class BridgeApplication extends \PhraseanetWebTestCaseAuthenticatedAbstract
class BridgeTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
public static $account = null;
public static $api = null;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerEditTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class EditTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Application;
use Symfony\Component\CssSelector\CssSelector;
class ControllerFeedApp extends \PhraseanetWebTestCaseAuthenticatedAbstract
class FeedTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
/**
*

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerLanguageTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class LanguageTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -3,7 +3,6 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Alchemy\Phrasea\Border\Attribute\AttributeInterface;
use Alchemy\Phrasea\Core\Event\Subscriber\SessionManagerSubscriber;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\HttpFoundation\Response;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerMoveCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class MoveCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerPrinterTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class PrinterTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerPushTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class PushTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerRootTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class RootTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Symfony\Component\HttpKernel\Client;
class ControllerStoryTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class StoryTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
public function testRootPost()
{

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class ControllerToolsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class ToolsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;
protected $tmpFile;

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod;
use Alchemy\Phrasea\SearchEngine\SearchEngineOptions;
class ControllerTooltipTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class TooltipTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerUsrListsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class UsrListsTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Controller\Prod;
class ControllerWorkZoneTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
class WorkZoneTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
{
protected $client;

View File

@@ -1838,7 +1838,7 @@ class LoginTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
foreach (self::$DI['app']['phraseanet.appbox']->get_databoxes() as $databox) {
self::$termsOfUse[$databox->get_sbas_id()] = $databox->get_cgus();
foreach( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) {
foreach ( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) {
$databox->update_cgus($lng, '', false);
}
}
@@ -1852,7 +1852,7 @@ class LoginTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
foreach (self::$DI['app']['phraseanet.appbox']->get_databoxes() as $databox) {
self::$termsOfUse[$databox->get_sbas_id()] = $databox->get_cgus();
foreach( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) {
foreach ( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) {
$databox->update_cgus($lng, 'something', false);
}
}

View File

@@ -7,7 +7,7 @@ require_once __DIR__ . '/../../../../../classes/FeedValidator.inc';
use Alchemy\Phrasea\Application;
use Symfony\Component\HttpFoundation\Response;
class RssFeedTest extends \PhraseanetWebTestCaseAbstract
class RSSFeedTest extends \PhraseanetWebTestCaseAbstract
{
/**
*

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\CLIProvider;
/**
* @covers Alchemy\Phrasea\Core\CLIProvider\ComposerSetupServiceProvider
*/
class ComposerSetupServiceProvidertest extends ServiceProviderTestCase
class ComposerSetupServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\CLIProvider;
/**
* @covers Alchemy\Phrasea\Core\CLIProvider\LessBuilderServiceProvider
*/
class LessBuilderServiceProvidertest extends ServiceProviderTestCase
class LessBuilderServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -8,7 +8,7 @@ use Symfony\Component\Process\ExecutableFinder;
/**
* @covers Alchemy\Phrasea\Core\CLIProvider\PluginServiceProvider
*/
class PluginServiceProvidertest extends ServiceProviderTestCase
class PluginServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -200,7 +200,6 @@ class SessionManagerSubscriberTest extends \PhraseanetWebTestCaseAuthenticatedAb
$app['EM'] = $this->getMockBuilder('Doctrine\ORM\EntityManager')->disableOriginalConstructor()->getMock();
$app['EM']->expects($this->never())->method('flush');
$app->get('/login', function () {
return '';
})->bind("homepage");

View File

@@ -11,7 +11,7 @@ use Silex\Application;
/**
* @covers Alchemy\Phrasea\Core\Provider\AuthenticationManagerServiceProvider
*/
class AuthenticationManagerServiceProvidertest extends ServiceProviderTestCase
class AuthenticationManagerServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -11,7 +11,7 @@ use XPDF\XPDFServiceProvider;
/**
* @covers Alchemy\Phrasea\Core\Provider\BorderManagerServiceProvider
*/
class BorderManagerServiceProvidertest extends ServiceProviderTestCase
class BorderManagerServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\BrowserServiceProvider
*/
class BrowserServiceProvidertest extends ServiceProviderTestCase
class BrowserServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\CacheServiceProvider
*/
class CacheServiceProvidertest extends ServiceProviderTestCase
class CacheServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -10,7 +10,7 @@ use Symfony\Component\HttpKernel\Client;
/**
* @covers Alchemy\Phrasea\Core\Provider\ConfigurationServiceProvider
*/
class ConfigurationServiceProvidertest extends ServiceProviderTestCase
class ConfigurationServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\ConfigurationTesterServiceProvider
*/
class ConfigurationTesterServiceProvidertest extends ServiceProviderTestCase
class ConfigurationTesterServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
use Alchemy\Phrasea\Core\Provider\FtpServiceProvider;
class FTPServiceProvidertest extends \PhraseanetPHPUnitAbstract
class FTPServiceProviderTest extends \PhraseanetPHPUnitAbstract
{
public function testGetInstantiate()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\JMSServiceProviderServiceProvider
*/
class JMSServiceProviderServiceProvidertest extends ServiceProviderTestCase
class JMSSerializerServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -8,7 +8,7 @@ use Alchemy\Phrasea\Core\Provider\LocaleServiceProvider;
/**
* @covers Alchemy\Phrasea\Core\Provider\LocaleServiceProvider
*/
class LocaleServiceProvidertest extends \PhraseanetPHPUnitAbstract
class LocaleServiceProviderTest extends \PhraseanetPHPUnitAbstract
{
public function testLocalesAvailable()
{

View File

@@ -7,7 +7,7 @@ use Alchemy\Phrasea\Core\Provider\NotificationDelivererServiceProvider;
/**
* @covers Alchemy\Phrasea\Core\Provider\NotificationDelivererServiceProvider
*/
class NotificationDelivererServiceProvidertest extends ServiceProviderTestCase
class NotificationDelivererServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\ORMServiceProvider
*/
class ORMServiceProvidertest extends ServiceProviderTestCase
class ORMServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\PhraseaVersionServiceProvider
*/
class PhraseaVersionServiceProvidertest extends ServiceProviderTestCase
class PhraseaVersionServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -2,7 +2,7 @@
namespace Alchemy\Tests\Phrasea\Core\Provider;
class PhraseanetServiceProvidertest extends ServiceProviderTestCase
class PhraseanetServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -7,7 +7,7 @@ use Alchemy\Phrasea\Core\Provider\RegistrationServiceProvider;
/**
* @covers Alchemy\Phrasea\Core\Provider\RegistrationServiceProvider
*/
class RegistrationServiceProvidertest extends \PhraseanetPHPUnitAbstract
class RegistrationServiceProviderTest extends \PhraseanetPHPUnitAbstract
{
public function testSameInstanceShouldBereturnedEveryTime()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\SearchEngineServiceProvider
*/
class SearchEngineServiceProvidertest extends ServiceProviderTestCase
class SearchEngineServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\TaskManagerServiceProvider
*/
class TaskManagerServiceProvidertest extends ServiceProviderTestCase
class TaskManagerServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\TemporaryFilesystemServiceProvider
*/
class TemporaryFilesystemServiceProvidertest extends ServiceProviderTestCase
class TemporaryFilesystemServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\TokensServiceProvider
*/
class TokensServiceProvidertest extends ServiceProviderTestCase
class TokensServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Core\Provider;
/**
* @covers Alchemy\Phrasea\Core\Provider\UnicodeServiceProvider
*/
class UnicodeServiceProvidertest extends ServiceProviderTestCase
class UnicodeServiceProviderTest extends ServiceProviderTestCase
{
public function provideServiceDescription()
{

View File

@@ -5,7 +5,7 @@ namespace Alchemy\Tests\Phrasea\Http\XSendFile;
use Alchemy\Phrasea\Http\XSendFile\NginxMode;
use Symfony\Component\HttpFoundation\Request;
class XSendFileModeNginxTest extends \PhraseanetPHPUnitAbstract
class NginxModeTest extends \PhraseanetPHPUnitAbstract
{
public function testGetVirtualHost()
{

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag;
use Alchemy\Phrasea\Metadata\Tag\TfEditdate;
class TfEditdateTest extends \PHPUnit_Framework_TestCase
class TfEditDateTest extends \PHPUnit_Framework_TestCase
{
/**

View File

@@ -4,7 +4,7 @@ namespace Alchemy\Tests\Phrasea\Metadata\Tag;
use Alchemy\Phrasea\Metadata\Tag\TfMimetype;
class TfMimetypeTest extends \PHPUnit_Framework_TestCase
class TfMimeTypeTest extends \PHPUnit_Framework_TestCase
{
/**

View File

@@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\SearchEngine;
use Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine;
use Alchemy\Phrasea\SearchEngine\Phrasea\ConfigurationPanel;
use Alchemy\Tests\Phrasea\SearchEngine\ConfigurationPanelAbstractTest;
class PhraseaConfigurationPanelTest extends ConfigurationPanelAbstractTest
{

View File

@@ -3,7 +3,6 @@
namespace Alchemy\Tests\Phrasea\SearchEngine;
use Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine;
use Alchemy\Tests\Phrasea\SearchEngine\SearchEngineAbstractTest;
use Symfony\Component\Process\Process;
/**

View File

@@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\SearchEngine;
use Alchemy\Phrasea\SearchEngine\SphinxSearch\SphinxSearchEngine;
use Alchemy\Phrasea\SearchEngine\SphinxSearch\ConfigurationPanel;
use Alchemy\Tests\Phrasea\SearchEngine\ConfigurationPanelAbstractTest;
class SphinxSearchConfigurationPanelTest extends ConfigurationPanelAbstractTest
{

View File

@@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\SearchEngine;
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\SearchEngine\SphinxSearch\SphinxSearchEngine;
use Alchemy\Tests\Phrasea\SearchEngine\SearchEngineAbstractTest;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\Process;

View File

@@ -8,7 +8,6 @@ use Silex\WebTestCase;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Client;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
use Symfony\Component\Routing\RequestContext;
abstract class PhraseanetPHPUnitAbstract extends WebTestCase