diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index c07ccf6e1f..1c1ad8da42 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -425,10 +425,10 @@ class Manager /** * Send a package file to lazaret * - * @param File $file The package file - * @param Visa $visa The visa related to the package file - * @param LazaretSession $session The current LazaretSession - * @param Boolean $forced True if the file has been forced to quarantine + * @param File $file The package file + * @param Visa $visa The visa related to the package file + * @param LazaretSession $session The current LazaretSession + * @param Boolean $forced True if the file has been forced to quarantine * * @return LazaretFile */ diff --git a/lib/Alchemy/Phrasea/Command/Task/SchedulerRun.php b/lib/Alchemy/Phrasea/Command/Task/SchedulerRun.php index be88299c3c..d47135f9b9 100644 --- a/lib/Alchemy/Phrasea/Command/Task/SchedulerRun.php +++ b/lib/Alchemy/Phrasea/Command/Task/SchedulerRun.php @@ -14,7 +14,6 @@ namespace Alchemy\Phrasea\Command\Task; use Alchemy\TaskManager\TaskManager; use Alchemy\Phrasea\Command\Command; use Alchemy\TaskManager\Event\TaskManagerSubscriber\LockFileSubscriber; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/Alchemy/Phrasea/Command/Task/SchedulerState.php b/lib/Alchemy/Phrasea/Command/Task/SchedulerState.php index f5d310dbef..6897ea3052 100644 --- a/lib/Alchemy/Phrasea/Command/Task/SchedulerState.php +++ b/lib/Alchemy/Phrasea/Command/Task/SchedulerState.php @@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputOption; -use Alchemy\Phrasea\TaskManager\TaskManagerStatus; class SchedulerState extends Command { diff --git a/lib/Alchemy/Phrasea/Command/Task/TaskStart.php b/lib/Alchemy/Phrasea/Command/Task/TaskStart.php index a1495bb1a8..c34b2ccd68 100644 --- a/lib/Alchemy/Phrasea/Command/Task/TaskStart.php +++ b/lib/Alchemy/Phrasea/Command/Task/TaskStart.php @@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; class TaskStart extends Command { diff --git a/lib/Alchemy/Phrasea/Command/Task/TaskStop.php b/lib/Alchemy/Phrasea/Command/Task/TaskStop.php index 694c335de8..0a4a9e6f54 100644 --- a/lib/Alchemy/Phrasea/Command/Task/TaskStop.php +++ b/lib/Alchemy/Phrasea/Command/Task/TaskStop.php @@ -15,7 +15,6 @@ use Alchemy\Phrasea\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; class TaskStop extends Command { diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php b/lib/Alchemy/Phrasea/Controller/Admin/Publications.php index 9aea63e4a4..c7dc1461a0 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Publications.php @@ -31,12 +31,12 @@ class Publications implements ControllerProviderInterface $app['controller.admin.publications'] = $this; $controllers = $app['controllers_factory']; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { $app['firewall']->requireAccessToModule('admin') ->requireRight('bas_chupub'); }); - $controllers->get('/list/', function(PhraseaApplication $app) { + $controllers->get('/list/', function (PhraseaApplication $app) { $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser( $app['authentication']->getUser() ); @@ -45,7 +45,7 @@ class Publications implements ControllerProviderInterface ->render('admin/publications/list.html.twig', array('feeds' => $feeds)); })->bind('admin_feeds_list'); - $controllers->post('/create/', function(PhraseaApplication $app, Request $request) { + $controllers->post('/create/', function (PhraseaApplication $app, Request $request) { if ('' === $title = trim($request->request->get('title', ''))) { $app->abort(400, "Bad request"); } @@ -78,7 +78,7 @@ class Publications implements ControllerProviderInterface return $app->redirectPath('admin_feeds_list'); })->bind('admin_feeds_create'); - $controllers->get('/feed/{id}/', function(PhraseaApplication $app, Request $request, $id) { + $controllers->get('/feed/{id}/', function (PhraseaApplication $app, Request $request, $id) { $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); return $app['twig'] @@ -87,7 +87,7 @@ class Publications implements ControllerProviderInterface ->bind('admin_feeds_feed') ->assert('id', '\d+'); - $controllers->post('/feed/{id}/update/', function(PhraseaApplication $app, Request $request, $id) { + $controllers->post('/feed/{id}/update/', function (PhraseaApplication $app, Request $request, $id) { if ('' === $title = trim($request->request->get('title', ''))) { $app->abort(400, "Bad request"); @@ -108,7 +108,7 @@ class Publications implements ControllerProviderInterface $app['EM']->flush(); return $app->redirectPath('admin_feeds_list'); - })->before(function(Request $request) use ($app) { + })->before(function (Request $request) use ($app) { $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $request->attributes->get('id')); if (!$feed->isOwner($app['authentication']->getUser())) { @@ -118,7 +118,7 @@ class Publications implements ControllerProviderInterface ->bind('admin_feeds_feed_update') ->assert('id', '\d+'); - $controllers->post('/feed/{id}/iconupload/', function(PhraseaApplication $app, Request $request, $id) { + $controllers->post('/feed/{id}/iconupload/', function (PhraseaApplication $app, Request $request, $id) { $datas = array( 'success' => false, 'message' => '', @@ -192,7 +192,7 @@ class Publications implements ControllerProviderInterface ->bind('admin_feeds_feed_icon') ->assert('id', '\d+'); - $controllers->post('/feed/{id}/addpublisher/', function(PhraseaApplication $app, $id) { + $controllers->post('/feed/{id}/addpublisher/', function (PhraseaApplication $app, $id) { $error = ''; try { $request = $app['request']; @@ -218,7 +218,7 @@ class Publications implements ControllerProviderInterface ->bind('admin_feeds_feed_add_publisher') ->assert('id', '\d+'); - $controllers->post('/feed/{id}/removepublisher/', function(PhraseaApplication $app, $id) { + $controllers->post('/feed/{id}/removepublisher/', function (PhraseaApplication $app, $id) { try { $request = $app['request']; @@ -245,7 +245,7 @@ class Publications implements ControllerProviderInterface ->bind('admin_feeds_feed_remove_publisher') ->assert('id', '\d+'); - $controllers->post('/feed/{id}/delete/', function(PhraseaApplication $app, $id) { + $controllers->post('/feed/{id}/delete/', function (PhraseaApplication $app, $id) { $feed = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\Feed', $id); if (null === $feed) { diff --git a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php index 6c71badfe8..1dd27b2998 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php @@ -27,7 +27,7 @@ class TaskManager implements ControllerProviderInterface $controllers = $app['controllers_factory']; $controllers - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireRight('taskmanager'); }) ->convert('task', function ($id) use ($app) { diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1.php b/lib/Alchemy/Phrasea/Controller/Api/V1.php index e1bbf8edba..d49d33a1c8 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1.php @@ -52,7 +52,7 @@ class V1 implements ControllerProviderInterface * @ throws \API_V1_exception_unauthorized * @ throws \API_V1_exception_forbidden */ - $controllers->before(function($request) use ($app) { + $controllers->before(function ($request) use ($app) { $context = new Context(Context::CONTEXT_OAUTH2_TOKEN); $app['dispatcher']->dispatch(PhraseaEvents::PRE_AUTHENTICATE, new PreAuthenticate($request, $context)); @@ -167,7 +167,7 @@ class V1 implements ControllerProviderInterface /** * Method Not Allowed Closure */ - $bad_request_exception = function() { + $bad_request_exception = function () { throw new \API_V1_exception_badrequest(); }; @@ -191,7 +191,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/monitor/scheduler/', function(SilexApplication $app, Request $request) { + $controllers->get('/monitor/scheduler/', function (SilexApplication $app, Request $request) { return $app['api']->get_scheduler($app)->get_response(); })->before($mustBeAdmin); @@ -205,7 +205,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/monitor/tasks/', function(SilexApplication $app, Request $request) { + $controllers->get('/monitor/tasks/', function (SilexApplication $app, Request $request) { return $app['api']->get_task_list($app)->get_response(); })->before($mustBeAdmin); @@ -219,7 +219,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/monitor/task/{task}/', function(SilexApplication $app, Request $request, $task) { + $controllers->get('/monitor/task/{task}/', function (SilexApplication $app, Request $request, $task) { return $app['api']->get_task($app, $task)->get_response(); }) ->convert('task', array($app['converter.task'], 'convert')) @@ -236,7 +236,7 @@ class V1 implements ControllerProviderInterface * - name (string) change the name of the task * - autostart (boolean) start task when scheduler starts */ - $controllers->post('/monitor/task/{task}/', function(SilexApplication $app, Request $request, $task) { + $controllers->post('/monitor/task/{task}/', function (SilexApplication $app, Request $request, $task) { return $app['api']->set_task_property($app, $task)->get_response(); }) ->convert('task', array($app['converter.task'], 'convert')) @@ -252,7 +252,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->post('/monitor/task/{task}/start/', function(SilexApplication $app, Request $request, $task) { + $controllers->post('/monitor/task/{task}/start/', function (SilexApplication $app, Request $request, $task) { return $app['api']->start_task($app, $task)->get_response(); }) ->convert('task', array($app['converter.task'], 'convert')) @@ -268,7 +268,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->post('/monitor/task/{task}/stop/', function(SilexApplication $app, Request $request, $task) { + $controllers->post('/monitor/task/{task}/stop/', function (SilexApplication $app, Request $request, $task) { return $app['api']->stop_task($app, $task)->get_response(); }) ->convert('task', array($app['converter.task'], 'convert')) @@ -284,7 +284,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/monitor/phraseanet/', function(SilexApplication $app, Request $request) { + $controllers->get('/monitor/phraseanet/', function (SilexApplication $app, Request $request) { return $app['api']->get_phraseanet_monitor($app)->get_response(); })->before($mustBeAdmin); @@ -296,7 +296,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/databoxes/list/', function(SilexApplication $app, Request $request) { + $controllers->get('/databoxes/list/', function (SilexApplication $app, Request $request) { return $app['api']->get_databoxes($request)->get_response(); }); @@ -308,7 +308,7 @@ class V1 implements ControllerProviderInterface * Parameters ; * DATABOX_ID : required INT */ - $controllers->get('/databoxes/{databox_id}/collections/', function(SilexApplication $app, $databox_id) { + $controllers->get('/databoxes/{databox_id}/collections/', function (SilexApplication $app, $databox_id) { return $app['api'] ->get_databox_collections($app['request'], $databox_id) ->get_response(); @@ -325,7 +325,7 @@ class V1 implements ControllerProviderInterface * DATABOX_ID : required INT * */ - $controllers->get('/databoxes/{databox_id}/status/', function(SilexApplication $app, $databox_id) { + $controllers->get('/databoxes/{databox_id}/status/', function (SilexApplication $app, $databox_id) { return $app['api'] ->get_databox_status($app['request'], $databox_id) ->get_response(); @@ -341,7 +341,7 @@ class V1 implements ControllerProviderInterface * Parameters ; * DATABOX_ID : required INT */ - $controllers->get('/databoxes/{databox_id}/metadatas/', function(SilexApplication $app, $databox_id) { + $controllers->get('/databoxes/{databox_id}/metadatas/', function (SilexApplication $app, $databox_id) { return $app['api'] ->get_databox_metadatas($app['request'], $databox_id) ->get_response(); @@ -357,7 +357,7 @@ class V1 implements ControllerProviderInterface * Parameters ; * DATABOX_ID : required INT */ - $controllers->get('/databoxes/{databox_id}/termsOfUse/', function(SilexApplication $app, $databox_id) { + $controllers->get('/databoxes/{databox_id}/termsOfUse/', function (SilexApplication $app, $databox_id) { return $app['api'] ->get_databox_terms($app['request'], $databox_id) ->get_response(); @@ -365,11 +365,11 @@ class V1 implements ControllerProviderInterface $controllers->get('/databoxes/{any_id}/termsOfUse/', $bad_request_exception); - $controllers->get('/quarantine/list/', function(SilexApplication $app, Request $request) { + $controllers->get('/quarantine/list/', function (SilexApplication $app, Request $request) { return $app['api']->list_quarantine($app, $request)->get_response(); }); - $controllers->get('/quarantine/item/{lazaret_id}/', function($lazaret_id, SilexApplication $app, Request $request) { + $controllers->get('/quarantine/item/{lazaret_id}/', function ($lazaret_id, SilexApplication $app, Request $request) { return $app['api']->list_quarantine_item($lazaret_id, $app, $request)->get_response(); }); @@ -381,7 +381,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->post('/records/add/', function(SilexApplication $app, Request $request) { + $controllers->post('/records/add/', function (SilexApplication $app, Request $request) { return $app['api']->add_record($app, $request)->get_response(); }); @@ -401,7 +401,7 @@ class V1 implements ControllerProviderInterface * Array containing an array of records and stories collection * */ - $controllers->match('/search/', function() use ($app) { + $controllers->match('/search/', function () use ($app) { return $app['api']->search($app['request'])->get_response(); }); @@ -421,11 +421,11 @@ class V1 implements ControllerProviderInterface * Array of record objects * */ - $controllers->match('/records/search/', function(SilexApplication $app) { + $controllers->match('/records/search/', function (SilexApplication $app) { return $app['api']->search_records($app['request'])->get_response(); }); - $controllers->get('/records/{databox_id}/{record_id}/caption/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->get('/records/{databox_id}/{record_id}/caption/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->caption_records($app['request'], $databox_id, $record_id) ->get_response(); @@ -443,7 +443,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->get('/records/{databox_id}/{record_id}/metadatas/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->get('/records/{databox_id}/{record_id}/metadatas/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->get_record_metadatas($app['request'], $databox_id, $record_id) ->get_response(); @@ -461,7 +461,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->get('/records/{databox_id}/{record_id}/status/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->get('/records/{databox_id}/{record_id}/status/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->get_record_status($app['request'], $databox_id, $record_id) ->get_response(); @@ -479,7 +479,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->get('/records/{databox_id}/{record_id}/related/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->get('/records/{databox_id}/{record_id}/related/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->get_record_related($app['request'], $databox_id, $record_id) ->get_response(); @@ -497,7 +497,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->get('/records/{databox_id}/{record_id}/embed/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->get('/records/{databox_id}/{record_id}/embed/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->get_record_embed($app['request'], $databox_id, $record_id) ->get_response(); @@ -515,7 +515,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->post('/records/{databox_id}/{record_id}/setmetadatas/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->post('/records/{databox_id}/{record_id}/setmetadatas/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->set_record_metadatas($app['request'], $databox_id, $record_id) ->get_response(); @@ -533,7 +533,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->post('/records/{databox_id}/{record_id}/setstatus/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->post('/records/{databox_id}/{record_id}/setstatus/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->set_record_status($app['request'], $databox_id, $record_id) ->get_response(); @@ -551,7 +551,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->post('/records/{databox_id}/{record_id}/setcollection/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->post('/records/{databox_id}/{record_id}/setcollection/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->set_record_collection($app['request'], $databox_id, $record_id) ->get_response(); @@ -559,7 +559,7 @@ class V1 implements ControllerProviderInterface $controllers->post('/records/{wrong_databox_id}/{wrong_record_id}/setcollection/', $bad_request_exception); - $controllers->get('/records/{databox_id}/{record_id}/', function(SilexApplication $app, $databox_id, $record_id) { + $controllers->get('/records/{databox_id}/{record_id}/', function (SilexApplication $app, $databox_id, $record_id) { return $app['api'] ->get_record($app['request'], $databox_id, $record_id) ->get_response(); @@ -575,7 +575,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/baskets/list/', function(SilexApplication $app) { + $controllers->get('/baskets/list/', function (SilexApplication $app) { return $app['api']->search_baskets($app['request'])->get_response(); }); @@ -587,7 +587,7 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->post('/baskets/add/', function(SilexApplication $app) { + $controllers->post('/baskets/add/', function (SilexApplication $app) { return $app['api']->create_basket($app['request'])->get_response(); }); @@ -600,7 +600,7 @@ class V1 implements ControllerProviderInterface * BASKET_ID : required INT * */ - $controllers->get('/baskets/{basket_id}/content/', function(SilexApplication $app, $basket_id) { + $controllers->get('/baskets/{basket_id}/content/', function (SilexApplication $app, $basket_id) { return $app['api']->get_basket($app['request'], $basket_id)->get_response(); })->assert('basket_id', '\d+'); @@ -615,7 +615,7 @@ class V1 implements ControllerProviderInterface * BASKET_ID : required INT * */ - $controllers->post('/baskets/{basket_id}/setname/', function(SilexApplication $app, $basket_id) { + $controllers->post('/baskets/{basket_id}/setname/', function (SilexApplication $app, $basket_id) { return $app['api'] ->set_basket_title($app['request'], $basket_id) ->get_response(); @@ -632,7 +632,7 @@ class V1 implements ControllerProviderInterface * BASKET_ID : required INT * */ - $controllers->post('/baskets/{basket_id}/setdescription/', function(SilexApplication $app, $basket_id) { + $controllers->post('/baskets/{basket_id}/setdescription/', function (SilexApplication $app, $basket_id) { return $app['api'] ->set_basket_description($app['request'], $basket_id) ->get_response(); @@ -649,7 +649,7 @@ class V1 implements ControllerProviderInterface * BASKET_ID : required INT * */ - $controllers->post('/baskets/{basket_id}/delete/', function(SilexApplication $app, $basket_id) { + $controllers->post('/baskets/{basket_id}/delete/', function (SilexApplication $app, $basket_id) { return $app['api']->delete_basket($app['request'], $basket_id)->get_response(); })->assert('basket_id', '\d+'); @@ -663,19 +663,19 @@ class V1 implements ControllerProviderInterface * Parameters : * */ - $controllers->get('/feeds/list/', function(SilexApplication $app) { + $controllers->get('/feeds/list/', function (SilexApplication $app) { return $app['api'] ->search_publications($app['request'], $app['authentication']->getUser()) ->get_response(); }); - $controllers->get('/feeds/content/', function(SilexApplication $app) { + $controllers->get('/feeds/content/', function (SilexApplication $app) { return $app['api'] ->get_publications($app['request'], $app['authentication']->getUser()) ->get_response(); }); - $controllers->get('/feeds/entry/{entry_id}/', function(SilexApplication $app, $entry_id) { + $controllers->get('/feeds/entry/{entry_id}/', function (SilexApplication $app, $entry_id) { return $app['api'] ->get_feed_entry($app['request'], $entry_id, $app['authentication']->getUser()) ->get_response(); @@ -692,7 +692,7 @@ class V1 implements ControllerProviderInterface * PUBLICATION_ID : required INT * */ - $controllers->get('/feeds/{feed_id}/content/', function(SilexApplication $app, $feed_id) { + $controllers->get('/feeds/{feed_id}/content/', function (SilexApplication $app, $feed_id) { return $app['api'] ->get_publication($app['request'], $feed_id, $app['authentication']->getUser()) ->get_response(); @@ -710,7 +710,7 @@ class V1 implements ControllerProviderInterface * RECORD_ID : required INT * */ - $controllers->get('/stories/{databox_id}/{story_id}/embed/', function($databox_id, $story_id) use ($app) { + $controllers->get('/stories/{databox_id}/{story_id}/embed/', function ($databox_id, $story_id) use ($app) { $result = $app['api']->get_story_embed($app['request'], $databox_id, $story_id); return $result->get_response(); @@ -719,7 +719,7 @@ class V1 implements ControllerProviderInterface $controllers->get('/stories/{any_id}/{anyother_id}/embed/', $bad_request_exception); - $controllers->get('/stories/{databox_id}/{story_id}/', function($databox_id, $story_id) use ($app) { + $controllers->get('/stories/{databox_id}/{story_id}/', function ($databox_id, $story_id) use ($app) { $result = $app['api']->get_story($app['request'], $databox_id, $story_id); return $result->get_response(); @@ -727,7 +727,7 @@ class V1 implements ControllerProviderInterface $controllers->get('/stories/{any_id}/{anyother_id}/', $bad_request_exception); - $controllers->get('/stories/{databox_id}/{story_id}/', function($databox_id, $story_id) use ($app) { + $controllers->get('/stories/{databox_id}/{story_id}/', function ($databox_id, $story_id) use ($app) { $result = $app['api']->get_story($app['request'], $databox_id, $story_id); return $result->get_response(); diff --git a/lib/Alchemy/Phrasea/Controller/Lightbox.php b/lib/Alchemy/Phrasea/Controller/Lightbox.php index 19922fba1d..44afc04ac6 100644 --- a/lib/Alchemy/Phrasea/Controller/Lightbox.php +++ b/lib/Alchemy/Phrasea/Controller/Lightbox.php @@ -29,7 +29,7 @@ class Lightbox implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { if (!$request->query->has('LOG')) { return; } @@ -62,7 +62,7 @@ class Lightbox implements ControllerProviderInterface } }); - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { $app['firewall']->requireAuthentication(); }); @@ -96,7 +96,7 @@ class Lightbox implements ControllerProviderInterface }) ->bind('lightbox'); - $controllers->get('/ajax/NOTE_FORM/{sselcont_id}/', function(SilexApplication $app, $sselcont_id) { + $controllers->get('/ajax/NOTE_FORM/{sselcont_id}/', function (SilexApplication $app, $sselcont_id) { if (!$app['browser']->isMobile()) { return new Response(''); @@ -116,7 +116,7 @@ class Lightbox implements ControllerProviderInterface ->bind('lightbox_ajax_note_form') ->assert('sselcont_id', '\d+'); - $controllers->get('/ajax/LOAD_BASKET_ELEMENT/{sselcont_id}/', function(SilexApplication $app, $sselcont_id) { + $controllers->get('/ajax/LOAD_BASKET_ELEMENT/{sselcont_id}/', function (SilexApplication $app, $sselcont_id) { /* @var $repository Alchemy\Phrasea\Model\Repositories\BasketElementRepository */ $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\BasketElement'); @@ -162,7 +162,7 @@ class Lightbox implements ControllerProviderInterface ->bind('lightbox_ajax_load_basketelement') ->assert('sselcont_id', '\d+'); - $controllers->get('/ajax/LOAD_FEED_ITEM/{entry_id}/{item_id}/', function(SilexApplication $app, $entry_id, $item_id) { + $controllers->get('/ajax/LOAD_FEED_ITEM/{entry_id}/{item_id}/', function (SilexApplication $app, $entry_id, $item_id) { $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($entry_id); $item = $entry->getItem($item_id); @@ -344,7 +344,7 @@ class Lightbox implements ControllerProviderInterface ->bind('lightbox_feed_entry') ->assert('entry_id', '\d+'); - $controllers->get('/ajax/LOAD_REPORT/{ssel_id}/', function(SilexApplication $app, $ssel_id) { + $controllers->get('/ajax/LOAD_REPORT/{ssel_id}/', function (SilexApplication $app, $ssel_id) { $template = 'lightbox/basket_content_report.html.twig'; @@ -405,7 +405,7 @@ class Lightbox implements ControllerProviderInterface ->bind('lightbox_ajax_set_note') ->assert('sselcont_id', '\d+'); - $controllers->post('/ajax/SET_ELEMENT_AGREEMENT/{sselcont_id}/', function(SilexApplication $app, $sselcont_id) { + $controllers->post('/ajax/SET_ELEMENT_AGREEMENT/{sselcont_id}/', function (SilexApplication $app, $sselcont_id) { $request = $app['request']; $agreement = $request->request->get('agreement'); @@ -468,7 +468,7 @@ class Lightbox implements ControllerProviderInterface ->bind('lightbox_ajax_set_element_agreement') ->assert('sselcont_id', '\d+'); - $controllers->post('/ajax/SET_RELEASE/{ssel_id}/', function(SilexApplication $app, $ssel_id) { + $controllers->post('/ajax/SET_RELEASE/{ssel_id}/', function (SilexApplication $app, $ssel_id) { $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Basket'); diff --git a/lib/Alchemy/Phrasea/Controller/Permalink.php b/lib/Alchemy/Phrasea/Controller/Permalink.php index 1e59eb5b37..aff5210703 100644 --- a/lib/Alchemy/Phrasea/Controller/Permalink.php +++ b/lib/Alchemy/Phrasea/Controller/Permalink.php @@ -46,7 +46,7 @@ class Permalink extends AbstractDelivery return $record; }; - $deliverPermaview = function($sbas_id, $record_id, $token, $subdef, PhraseaApplication $app) use ($retrieveRecord) { + $deliverPermaview = function ($sbas_id, $record_id, $token, $subdef, PhraseaApplication $app) use ($retrieveRecord) { $databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id); $record = $retrieveRecord($app, $databox, $token, $record_id, $subdef); @@ -62,7 +62,7 @@ class Permalink extends AbstractDelivery return $app['twig']->render('overview.html.twig', $params); }; - $deliverPermalink = function(PhraseaApplication $app, $sbas_id, $record_id, $token, $subdef) use ($that, $retrieveRecord) { + $deliverPermalink = function (PhraseaApplication $app, $sbas_id, $record_id, $token, $subdef) use ($that, $retrieveRecord) { $databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id); $record = $retrieveRecord($app, $databox, $token, $record_id, $subdef); @@ -114,7 +114,7 @@ class Permalink extends AbstractDelivery return $response; }; - $controllers->get('/v1/{sbas_id}/{record_id}/caption/', function(PhraseaApplication $app, Request $request, $sbas_id, $record_id) use ($retrieveRecord) { + $controllers->get('/v1/{sbas_id}/{record_id}/caption/', function (PhraseaApplication $app, Request $request, $sbas_id, $record_id) use ($retrieveRecord) { $token = $request->query->get('token'); $databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id); @@ -135,7 +135,7 @@ class Permalink extends AbstractDelivery ->assert('sbas_id', '\d+') ->assert('record_id', '\d+'); - $controllers->get('/v1/{label}/{sbas_id}/{record_id}/{token}/{subdef}/view/', function(PhraseaApplication $app, $label, $sbas_id, $record_id, $token, $subdef) use ($deliverPermaview) { + $controllers->get('/v1/{label}/{sbas_id}/{record_id}/{token}/{subdef}/view/', function (PhraseaApplication $app, $label, $sbas_id, $record_id, $token, $subdef) use ($deliverPermaview) { return $deliverPermaview($sbas_id, $record_id, $token, $subdef, $app); }) ->bind('permalinks_permaview_old') @@ -151,7 +151,7 @@ class Permalink extends AbstractDelivery ->assert('sbas_id', '\d+') ->assert('record_id', '\d+'); - $controllers->get('/v1/{label}/{sbas_id}/{record_id}/{token}/{subdef}/', function(PhraseaApplication $app, $label, $sbas_id, $record_id, $token, $subdef) use ($deliverPermalink) { + $controllers->get('/v1/{label}/{sbas_id}/{record_id}/{token}/{subdef}/', function (PhraseaApplication $app, $label, $sbas_id, $record_id, $token, $subdef) use ($deliverPermalink) { return $deliverPermalink($app, $sbas_id, $record_id, $token, $subdef); }) ->bind('permalinks_permalink_old') diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php b/lib/Alchemy/Phrasea/Controller/Prod/Feed.php index ec344bb7b8..74ea31ca48 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Feed.php @@ -36,18 +36,18 @@ class Feed implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { $app['firewall']->requireAuthentication(); }); - $controllers->post('/requestavailable/', function(Application $app, Request $request) { + $controllers->post('/requestavailable/', function (Application $app, Request $request) { $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); $publishing = RecordsRequest::fromRequest($app, $request, true, array(), array('bas_chupub')); return $app['twig']->render('prod/actions/publish/publish.html.twig', array('publishing' => $publishing, 'feeds' => $feeds)); }); - $controllers->post('/entry/create/', function(Application $app, Request $request) { + $controllers->post('/entry/create/', function (Application $app, Request $request) { $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($request->request->get('feed_id')); if (null === $feed) { @@ -95,11 +95,11 @@ class Feed implements ControllerProviderInterface return $app->json($datas); }) ->bind('prod_feeds_entry_create') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireRight('bas_chupub'); }); - $controllers->get('/entry/{id}/edit/', function(Application $app, Request $request, $id) { + $controllers->get('/entry/{id}/edit/', function (Application $app, Request $request, $id) { $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($id); if (!$entry->isPublisher($app['authentication']->getUser())) { @@ -114,11 +114,11 @@ class Feed implements ControllerProviderInterface }) ->bind('feed_entry_edit') ->assert('id', '\d+') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireRight('bas_chupub'); }); - $controllers->post('/entry/{id}/update/', function(Application $app, Request $request, $id) { + $controllers->post('/entry/{id}/update/', function (Application $app, Request $request, $id) { $datas = array('error' => true, 'message' => '', 'datas' => ''); $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($id); @@ -177,11 +177,11 @@ class Feed implements ControllerProviderInterface )); }) ->bind('prod_feeds_entry_update') - ->assert('id', '\d+')->before(function(Request $request) use ($app) { + ->assert('id', '\d+')->before(function (Request $request) use ($app) { $app['firewall']->requireRight('bas_chupub'); }); - $controllers->post('/entry/{id}/delete/', function(Application $app, Request $request, $id) { + $controllers->post('/entry/{id}/delete/', function (Application $app, Request $request, $id) { $datas = array('error' => true, 'message' => ''); $entry = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedEntry')->find($id); @@ -199,11 +199,11 @@ class Feed implements ControllerProviderInterface return $app->json(array('error' => false, 'message' => 'succes')); }) ->bind('prod_feeds_entry_delete') - ->assert('id', '\d+')->before(function(Request $request) use ($app) { + ->assert('id', '\d+')->before(function (Request $request) use ($app) { $app['firewall']->requireRight('bas_chupub'); }); - $controllers->get('/', function(Application $app, Request $request) { + $controllers->get('/', function (Application $app, Request $request) { $request = $app['request']; $page = (int) $request->query->get('page'); $page = $page > 0 ? $page : 1; @@ -219,7 +219,7 @@ class Feed implements ControllerProviderInterface return new Response($datas); })->bind('prod_feeds'); - $controllers->get('/feed/{id}/', function(Application $app, Request $request, $id) { + $controllers->get('/feed/{id}/', function (Application $app, Request $request, $id) { $page = (int) $request->query->get('page'); $page = $page > 0 ? $page : 1; @@ -236,7 +236,7 @@ class Feed implements ControllerProviderInterface ->bind('prod_feeds_feed') ->assert('id', '\d+'); - $controllers->get('/subscribe/aggregated/', function(Application $app, Request $request) { + $controllers->get('/subscribe/aggregated/', function (Application $app, Request $request) { $renew = ($request->query->get('renew') === 'true'); $feeds = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser($app['authentication']->getUser()); @@ -257,7 +257,7 @@ class Feed implements ControllerProviderInterface return $app->json($output); })->bind('prod_feeds_subscribe_aggregated'); - $controllers->get('/subscribe/{id}/', function(Application $app, Request $request, $id) { + $controllers->get('/subscribe/{id}/', function (Application $app, Request $request, $id) { $renew = ($request->query->get('renew') === 'true'); $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($id); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Order.php b/lib/Alchemy/Phrasea/Controller/Prod/Order.php index 2d466b82a9..4df1a1fc0b 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Order.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Order.php @@ -41,13 +41,13 @@ class Order implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { $app['firewall']->requireAuthentication() ->requireRight('order'); }); $controllers->get('/', 'controller.prod.order:displayOrders') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireOrdersAdmin(); }) ->bind('prod_orders'); @@ -56,21 +56,21 @@ class Order implements ControllerProviderInterface ->bind('prod_order_new'); $controllers->get('/{order_id}/', 'controller.prod.order:displayOneOrder') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireOrdersAdmin(); }) ->bind('prod_order') ->assert('order_id', '\d+'); $controllers->post('/{order_id}/send/', 'controller.prod.order:sendOrder') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireOrdersAdmin(); }) ->bind('prod_order_send') ->assert('order_id', '\d+'); $controllers->post('/{order_id}/deny/', 'controller.prod.order:denyOrder') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireOrdersAdmin(); }) ->bind('prod_order_deny') @@ -135,7 +135,7 @@ class Order implements ControllerProviderInterface } } - $noAdmins = $collectionHasOrderAdmins->forAll(function($key, $hasAdmin) { + $noAdmins = $collectionHasOrderAdmins->forAll(function ($key, $hasAdmin) { return false === $hasAdmin; }); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Push.php b/lib/Alchemy/Phrasea/Controller/Prod/Push.php index a77dc2af7e..ceb087708a 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Push.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Push.php @@ -35,7 +35,7 @@ class Push implements ControllerProviderInterface { protected function getUserFormatter() { - return function(\User_Adapter $user) { + return function (\User_Adapter $user) { $subtitle = array_filter(array($user->get_job(), $user->get_company())); return array( @@ -54,7 +54,7 @@ class Push implements ControllerProviderInterface { $userFormatter = $this->getUserFormatter(); - return function(UsrList $List) use ($userFormatter, $app) { + return function (UsrList $List) use ($userFormatter, $app) { $entries = array(); foreach ($List->getEntries() as $entry) { @@ -77,7 +77,7 @@ class Push implements ControllerProviderInterface protected function getUsersInSelectionExtractor() { - return function(array $selection) { + return function (array $selection) { $Users = new \Doctrine\Common\Collections\ArrayCollection(); foreach ($selection as $record) { @@ -107,7 +107,7 @@ class Push implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { $app['firewall']->requireAuthentication() ->requireRight('push'); }); @@ -118,7 +118,7 @@ class Push implements ControllerProviderInterface $userSelection = $this->getUsersInSelectionExtractor(); - $controllers->post('/sendform/', function(Application $app) use ($userSelection) { + $controllers->post('/sendform/', function (Application $app) use ($userSelection) { $push = new RecordHelper\Push($app, $app['request']); $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); @@ -136,7 +136,7 @@ class Push implements ControllerProviderInterface return $app['twig']->render('prod/actions/Push.html.twig', $params); }); - $controllers->post('/validateform/', function(Application $app) use ($userSelection) { + $controllers->post('/validateform/', function (Application $app) use ($userSelection) { $push = new RecordHelper\Push($app, $app['request']); $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); @@ -154,7 +154,7 @@ class Push implements ControllerProviderInterface return $app['twig']->render('prod/actions/Push.html.twig', $params); }); - $controllers->post('/send/', function(Application $app) { + $controllers->post('/send/', function (Application $app) { $request = $app['request']; $ret = array( @@ -269,7 +269,7 @@ class Push implements ControllerProviderInterface return $app->json($ret); })->bind('prod_push_send'); - $controllers->post('/validate/', function(Application $app) { + $controllers->post('/validate/', function (Application $app) { $request = $app['request']; $ret = array( @@ -471,7 +471,7 @@ class Push implements ControllerProviderInterface return $app->json($ret); })->bind('prod_push_validate'); - $controllers->get('/user/{usr_id}/', function(Application $app, $usr_id) use ($userFormatter) { + $controllers->get('/user/{usr_id}/', function (Application $app, $usr_id) use ($userFormatter) { $datas = null; $request = $app['request']; @@ -495,7 +495,7 @@ class Push implements ControllerProviderInterface return $app->json($datas); })->assert('usr_id', '\d+'); - $controllers->get('/list/{list_id}/', function(Application $app, $list_id) use ($listFormatter) { + $controllers->get('/list/{list_id}/', function (Application $app, $list_id) use ($listFormatter) { $datas = null; $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); @@ -511,7 +511,7 @@ class Push implements ControllerProviderInterface ->bind('prod_push_lists_list') ->assert('list_id', '\d+'); - $controllers->post('/add-user/', function(Application $app, Request $request) use ($userFormatter) { + $controllers->post('/add-user/', function (Application $app, Request $request) use ($userFormatter) { $result = array('success' => false, 'message' => '', 'user' => null); try { @@ -576,13 +576,13 @@ class Push implements ControllerProviderInterface return $app->json($result); })->bind('prod_push_do_add_user'); - $controllers->get('/add-user/', function(Application $app, Request $request) { + $controllers->get('/add-user/', function (Application $app, Request $request) { $params = array('callback' => $request->query->get('callback')); return $app['twig']->render('prod/User/Add.html.twig', $params); })->bind('prod_push_add_user'); - $controllers->get('/search-user/', function(Application $app) use ($userFormatter, $listFormatter) { + $controllers->get('/search-user/', function (Application $app) use ($userFormatter, $listFormatter) { $request = $app['request']; $query = new \User_Query($app); @@ -619,7 +619,7 @@ class Push implements ControllerProviderInterface return $app->json($datas); }); - $controllers->match('/edit-list/{list_id}/', function(Application $app, Request $request, $list_id) { + $controllers->match('/edit-list/{list_id}/', function (Application $app, Request $request, $list_id) { $repository = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\UsrList'); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Share.php b/lib/Alchemy/Phrasea/Controller/Prod/Share.php index 69204aaf6a..031ddb60a2 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Share.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Share.php @@ -27,12 +27,12 @@ class Share implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { $app['firewall']->requireNotGuest(); }); $controllers->get('/record/{base_id}/{record_id}/', 'controller.prod.share:shareRecord') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireRightOnSbas(\phrasea::sbasFromBas($app, $request->attributes->get('base_id')), 'bas_chupub'); }) ->bind('share_record'); diff --git a/lib/Alchemy/Phrasea/Controller/Root/Login.php b/lib/Alchemy/Phrasea/Controller/Root/Login.php index 6816145e4b..c0386655bc 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Login.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Login.php @@ -52,7 +52,7 @@ class Login implements ControllerProviderInterface { $items = array(); - foreach($app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedItem')->loadLatest($app, 20) as $item) { + foreach ($app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\FeedItem')->loadLatest($app, 20) as $item) { $record = $item->getRecord($app); $preview = $record->get_subdef('preview'); $permalink = $preview->get_permalink(); @@ -93,7 +93,7 @@ class Login implements ControllerProviderInterface $app['login.controller'] = $this; - $controllers->before(function(Request $request) use ($app) { + $controllers->before(function (Request $request) use ($app) { if ($request->getPathInfo() == $app->path('homepage')) { return; } @@ -101,7 +101,7 @@ class Login implements ControllerProviderInterface // Displays the homepage $controllers->get('/', 'login.controller:login') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); if (null !== $request->query->get('postlog')) { @@ -126,14 +126,14 @@ class Login implements ControllerProviderInterface // Authentication end point $controllers->post('/authenticate/', 'login.controller:authenticate') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); }) ->bind('login_authenticate'); // Guest access end point $controllers->match('/authenticate/guest/', 'login.controller:authenticateAsGuest') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); }) ->bind('login_authenticate_as_guest') @@ -141,67 +141,67 @@ class Login implements ControllerProviderInterface // Authenticate with an AuthProvider $controllers->get('/provider/{providerId}/authenticate/', 'login.controller:authenticateWithProvider') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); }) ->bind('login_authentication_provider_authenticate'); // AuthProviders callbacks $controllers->get('/provider/{providerId}/callback/', 'login.controller:authenticationCallback') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); })->bind('login_authentication_provider_callback'); // Logout end point $controllers->get('/logout/', 'login.controller:logout') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireAuthentication(); })->bind('logout'); // Registration end point ; redirects to classic registration or AuthProvider registration $controllers->get('/register/', 'login.controller:displayRegisterForm') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); })->bind('login_register'); // Classic registration end point $controllers->match('/register-classic/', 'login.controller:doRegistration') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); }) ->bind('login_register_classic'); // Provide a JSON serialization of registration fields configuration - $controllers->get('/registration-fields/', function(PhraseaApplication $app, Request $request) { + $controllers->get('/registration-fields/', function (PhraseaApplication $app, Request $request) { return $app->json($app['registration.fields']); })->bind('login_registration_fields'); // Unlocks an email address that is currently locked $controllers->get('/register-confirm/', 'login.controller:registerConfirm') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); })->bind('login_register_confirm'); // Displays a form to send an account unlock email again $controllers->get('/send-mail-confirm/', 'login.controller:sendConfirmMail') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); })->bind('login_send_mail'); // Forgot password end point $controllers->match('/forgot-password/', 'login.controller:forgotPassword') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); })->bind('login_forgot_password'); // Renew password end point $controllers->match('/renew-password/', 'login.controller:renewPassword') - ->before(function(Request $request) use ($app) { + ->before(function (Request $request) use ($app) { $app['firewall']->requireNotAuthenticated(); })->bind('login_renew_password'); // Displays Terms of use - $controllers->get('/cgus', function(PhraseaApplication $app, Request $request) { + $controllers->get('/cgus', function (PhraseaApplication $app, Request $request) { return $app['twig']->render('login/cgus.html.twig', array_merge( array('cgus' => \databox_cgu::getHome($app)), self::getDefaultTemplateVariables($app) diff --git a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php b/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php index 0f47d41424..66fc32c145 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php +++ b/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php @@ -29,7 +29,7 @@ class RSSFeeds implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->get('/feed/{id}/{format}/', function(Application $app, $id, $format) { + $controllers->get('/feed/{id}/{format}/', function (Application $app, $id, $format) { $feed = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->find($id); if (null === $feed) { @@ -51,7 +51,7 @@ class RSSFeeds implements ControllerProviderInterface ->assert('id', '\d+') ->assert('format', '(rss|atom)'); - $controllers->get('/userfeed/{token}/{id}/{format}/', function(Application $app, $token, $id, $format) { + $controllers->get('/userfeed/{token}/{id}/{format}/', function (Application $app, $token, $id, $format) { $token = $app["EM"]->find('Alchemy\Phrasea\Model\Entities\FeedToken', $id); $request = $app['request']; @@ -66,7 +66,7 @@ class RSSFeeds implements ControllerProviderInterface ->assert('id', '\d+') ->assert('format', '(rss|atom)'); - $controllers->get('/userfeed/aggregated/{token}/{format}/', function(Application $app, $token, $format) { + $controllers->get('/userfeed/aggregated/{token}/{format}/', function (Application $app, $token, $format) { $token = $app['EM']->getRepository('Alchemy\Phrasea\Model\Entities\AggregateToken')->findOneBy(array("value" => $token)); $user = \User_Adapter::getInstance($token->getUsrId(), $app); @@ -85,7 +85,7 @@ class RSSFeeds implements ControllerProviderInterface ->bind('feed_user_aggregated') ->assert('format', '(rss|atom)'); - $controllers->get('/aggregated/{format}/', function(Application $app, $format) { + $controllers->get('/aggregated/{format}/', function (Application $app, $format) { $feed = Aggregate::getPublic($app); $request = $app['request']; @@ -97,7 +97,7 @@ class RSSFeeds implements ControllerProviderInterface ->bind('feed_public_aggregated') ->assert('format', '(rss|atom)'); - $controllers->get('/cooliris/', function(Application $app) { + $controllers->get('/cooliris/', function (Application $app) { $feed = Aggregate::getPublic($app); $request = $app['request']; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Session.php b/lib/Alchemy/Phrasea/Controller/Root/Session.php index c24290597d..e145ba6c89 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Session.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Session.php @@ -29,7 +29,7 @@ class Session implements ControllerProviderInterface ->bind('update_session'); $controllers->post('/delete/{id}', 'controller.session:deleteSession') - ->before(function() use ($app) { + ->before(function () use ($app) { $app['firewall']->requireAuthentication(); }) ->bind('delete_session'); diff --git a/lib/Alchemy/Phrasea/Controller/Setup.php b/lib/Alchemy/Phrasea/Controller/Setup.php index dcd12bd54a..4b75ae0071 100644 --- a/lib/Alchemy/Phrasea/Controller/Setup.php +++ b/lib/Alchemy/Phrasea/Controller/Setup.php @@ -30,7 +30,7 @@ class Setup implements ControllerProviderInterface $controllers = $app['controllers_factory']; - $controllers->get('/', function(Application $app) { + $controllers->get('/', function (Application $app) { return $app->redirectPath('install_root'); })->bind('setup'); diff --git a/lib/Alchemy/Phrasea/Core/CLIProvider/LessBuilderServiceProvider.php b/lib/Alchemy/Phrasea/Core/CLIProvider/LessBuilderServiceProvider.php index 3538c3732f..5c2158e056 100644 --- a/lib/Alchemy/Phrasea/Core/CLIProvider/LessBuilderServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/CLIProvider/LessBuilderServiceProvider.php @@ -20,36 +20,36 @@ class LessBuilderServiceProvider implements ServiceProviderInterface { public function register(Application $app) { - $app['phraseanet.less-assets'] = $app->share(function($app) { + $app['phraseanet.less-assets'] = $app->share(function ($app) { return array( $app['root.path'] . '/www/assets/bootstrap/img/glyphicons-halflings-white.png' => $app['root.path'] . '/www/skins/build/bootstrap/img/glyphicons-halflings-white.png', $app['root.path'] . '/www/assets/bootstrap/img/glyphicons-halflings.png' => $app['root.path'] . '/www/skins/build/bootstrap/img/glyphicons-halflings.png', ); }); - $app['phraseanet.less-mapping.base'] = $app->share(function($app) { + $app['phraseanet.less-mapping.base'] = $app->share(function ($app) { return array(); }); - $app['phraseanet.less-mapping.customizable'] = $app->share(function($app) { + $app['phraseanet.less-mapping.customizable'] = $app->share(function ($app) { return array( $app['root.path'] . '/www/skins/login/less/login.less' => $app['root.path'] . '/www/assets/build/login.css', $app['root.path'] . '/www/skins/account/account.less' => $app['root.path'] . '/www/assets/build/account.css', ); }); - $app['phraseanet.less-mapping'] = $app->share(function($app) { + $app['phraseanet.less-mapping'] = $app->share(function ($app) { return array_merge( $app['phraseanet.less-mapping.base'], $app['phraseanet.less-mapping.customizable'] ); }); - $app['phraseanet.less-compiler'] = $app->share(function($app) { + $app['phraseanet.less-compiler'] = $app->share(function ($app) { return new LessCompiler($app['filesystem'], $app['driver.recess']); }); - $app['phraseanet.less-builder'] = $app->share(function($app) { + $app['phraseanet.less-builder'] = $app->share(function ($app) { return new LessBuilder($app['phraseanet.less-compiler'], $app['filesystem']); }); } diff --git a/lib/Alchemy/Phrasea/Core/CLIProvider/TaskManagerServiceProvider.php b/lib/Alchemy/Phrasea/Core/CLIProvider/TaskManagerServiceProvider.php index 2f9a6a3f87..c8b27ef3af 100644 --- a/lib/Alchemy/Phrasea/Core/CLIProvider/TaskManagerServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/CLIProvider/TaskManagerServiceProvider.php @@ -23,14 +23,14 @@ class TaskManagerServiceProvider implements ServiceProviderInterface { public function register(Application $app) { - $app['task-manager.logger'] = $app->share(function(Application $app) { + $app['task-manager.logger'] = $app->share(function (Application $app) { $logger = new Logger('task-manager logger'); $logger->pushHandler(new NullHandler()); return $logger; }); - $app['task-manager'] = $app->share(function(Application $app) { + $app['task-manager'] = $app->share(function (Application $app) { $options = $app['task-manager.listener.options']; return TaskManager::create( @@ -45,7 +45,7 @@ class TaskManagerServiceProvider implements ServiceProviderInterface ); }); - $app['task-manager.task-list'] = $app->share(function(Application $app) { + $app['task-manager.task-list'] = $app->share(function (Application $app) { $conf = $app['phraseanet.registry']->get('GV_PHP_INI', null); $finder = new PhpExecutableFinder(); $php = $finder->find(); diff --git a/lib/Alchemy/Phrasea/Core/Provider/ConvertersServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/ConvertersServiceProvider.php index 90a51bafe6..5866cb3823 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/ConvertersServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/ConvertersServiceProvider.php @@ -19,7 +19,7 @@ class ConvertersServiceProvider implements ServiceProviderInterface { public function register(Application $app) { - $app['converter.task'] = $app->share(function($app) { + $app['converter.task'] = $app->share(function ($app) { return new TaskConverter($app['EM']); }); } diff --git a/lib/Alchemy/Phrasea/Core/Provider/FeedServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/FeedServiceProvider.php index f3efe87e6f..475ee07709 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/FeedServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/FeedServiceProvider.php @@ -24,29 +24,29 @@ class FeedServiceProvider implements ServiceProviderInterface { public function register(Application $app) { - $app['feed.user-link-generator'] = $app->share(function($app) { + $app['feed.user-link-generator'] = $app->share(function ($app) { return new FeedLinkGenerator($app['url_generator'], $app['EM'], $app['tokens']); }); - $app['feed.aggregate-link-generator'] = $app->share(function($app) { + $app['feed.aggregate-link-generator'] = $app->share(function ($app) { return new AggregateLinkGenerator($app['url_generator'], $app['EM'], $app['tokens']); }); - $app['feed.link-generator-collection'] = $app->share(function($app) { + $app['feed.link-generator-collection'] = $app->share(function ($app) { $collection = new LinkGeneratorCollection(); $collection->pushGenerator($app['feed.user-link-generator']); $collection->pushGenerator($app['feed.aggregate-link-generator']); return $collection; }); - $app['feed.rss-formatter'] = $app->share(function($app) { + $app['feed.rss-formatter'] = $app->share(function ($app) { return new RssFormatter($app['feed.link-generator-collection']); }); - $app['feed.atom-formatter'] = $app->share(function($app) { + $app['feed.atom-formatter'] = $app->share(function ($app) { return new AtomFormatter($app['feed.link-generator-collection']); }); - $app['feed.cooliris-formatter'] = $app->share(function($app) { + $app['feed.cooliris-formatter'] = $app->share(function ($app) { return new CoolirisFormatter($app['feed.link-generator-collection']); }); - $app['feed.formatter-strategy'] = $app->protect(function($type) use ($app) { + $app['feed.formatter-strategy'] = $app->protect(function ($type) use ($app) { switch ($type) { case 'rss': return $app['feed.rss-formatter']; diff --git a/lib/Alchemy/Phrasea/Core/Provider/ManipulatorServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/ManipulatorServiceProvider.php index 4e4cbf814b..9dcd86bfb9 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/ManipulatorServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/ManipulatorServiceProvider.php @@ -21,14 +21,14 @@ class ManipulatorServiceProvider implements ServiceProviderInterface { public function register(SilexApplication $app) { - $app['manipulator.task'] = $app->share(function(SilexApplication $app) { + $app['manipulator.task'] = $app->share(function (SilexApplication $app) { return new TaskManipulator($app['EM'], $app['task-manager.notifier']); }); - $app['manipulator.user'] = $app->share(function($app) { + $app['manipulator.user'] = $app->share(function ($app) { return new UserManipulator($app['model.user-manager'], $app['auth.password-encoder'], $app['geonames.connector']); }); - $app['model.user-manager'] = $app->share(function($app) { + $app['model.user-manager'] = $app->share(function ($app) { return new UserManager($app['EM'], $app['phraseanet.appbox']->get_connection()); }); } diff --git a/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php index 1dfa1b5d60..511c530405 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/ORMServiceProvider.php @@ -43,7 +43,7 @@ class ORMServiceProvider implements ServiceProviderInterface return new MonologSQLLogger($logger, 'yaml'); }); - $app['EM.driver'] = $app->share(function(Application $app) { + $app['EM.driver'] = $app->share(function (Application $app) { AnnotationRegistry::registerFile( $app['root.path'].'/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php' ); @@ -71,7 +71,7 @@ class ORMServiceProvider implements ServiceProviderInterface return $driverChain; }); - $app['EM.config'] = $app->share(function(Application $app) { + $app['EM.config'] = $app->share(function (Application $app) { $config = new ORMConfiguration(); if ($app['debug']) { @@ -99,27 +99,27 @@ class ORMServiceProvider implements ServiceProviderInterface return $config; }); - $app['EM.opcode-cache-type'] = $app->share(function(Application $app) { + $app['EM.opcode-cache-type'] = $app->share(function (Application $app) { return $app['phraseanet.configuration']['main']['opcodecache']['type']; }); - $app['EM.opcode-cache-options'] = $app->share(function(Application $app) { + $app['EM.opcode-cache-options'] = $app->share(function (Application $app) { return $app['phraseanet.configuration']['main']['opcodecache']['options']; }); - $app['EM.cache-type'] = $app->share(function(Application $app) { + $app['EM.cache-type'] = $app->share(function (Application $app) { return $app['phraseanet.configuration']['main']['cache']['type']; }); - $app['EM.cache-options'] = $app->share(function(Application $app) { + $app['EM.cache-options'] = $app->share(function (Application $app) { return $app['phraseanet.configuration']['main']['cache']['options']; }); - $app['EM.events-manager'] = $app->share(function(Application $app) { + $app['EM.events-manager'] = $app->share(function (Application $app) { $evm = new EventManager(); $evm->addEventSubscriber(new TimestampableListener()); return $evm; }); - $app['EM.dbal-conf'] = $app->share(function(Application $app) { + $app['EM.dbal-conf'] = $app->share(function (Application $app) { if ('test' === $app->getEnvironment()) { return $app['phraseanet.configuration']['main']['database-test']; } @@ -127,7 +127,7 @@ class ORMServiceProvider implements ServiceProviderInterface return $app['phraseanet.configuration']['main']['database']; }); - $app['EM'] = $app->share(function(Application $app) { + $app['EM'] = $app->share(function (Application $app) { try { $em = EntityManager::create($app['EM.dbal-conf'], $app['EM.config'], $app['EM.events-manager']); } catch (\Exception $e) { diff --git a/lib/Alchemy/Phrasea/Core/Provider/TasksServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/TasksServiceProvider.php index 8cd26ae9e4..ca4954cc43 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/TasksServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/TasksServiceProvider.php @@ -31,11 +31,11 @@ class TasksServiceProvider implements ServiceProviderInterface { public function register(Application $app) { - $app['task-manager.notifier'] = $app->share(function(Application $app) { + $app['task-manager.notifier'] = $app->share(function (Application $app) { return Notifier::create($app['task-manager.listener.options']); }); - $app['task-manager.listener.options'] = $app->share(function(Application $app) { + $app['task-manager.listener.options'] = $app->share(function (Application $app) { if (isset($app['phraseanet.configuration']['task-manager']) && isset($app['phraseanet.configuration']['task-manager']['listener'])) { $listenerConf = $app['phraseanet.configuration']['task-manager']['listener']; } else { @@ -50,15 +50,15 @@ class TasksServiceProvider implements ServiceProviderInterface ), $listenerConf); }); - $app['task-manager.job-factory'] = $app->share(function(Application $app) { + $app['task-manager.job-factory'] = $app->share(function (Application $app) { return new JobFactory($app['dispatcher'],isset($app['task-manager.logger']) ? $app['task-manager.logger'] : $app['logger']); }); - $app['task-manager.status'] = $app->share(function(Application $app) { + $app['task-manager.status'] = $app->share(function (Application $app) { return new TaskManagerStatus($app['phraseanet.configuration']); }); - $app['task-manager.live-information'] = $app->share(function(Application $app) { + $app['task-manager.live-information'] = $app->share(function (Application $app) { return new LiveInformation($app['task-manager.status'], $app['task-manager.notifier']); }); @@ -66,11 +66,11 @@ class TasksServiceProvider implements ServiceProviderInterface return $app['root.path'].'/logs'; }); - $app['task-manager.log-file.factory'] = $app->share(function(Application $app) { + $app['task-manager.log-file.factory'] = $app->share(function (Application $app) { return new LogFileFactory($app['task-manager.log-file.root']); }); - $app['task-manager.available-jobs'] = $app->share(function(Application $app) { + $app['task-manager.available-jobs'] = $app->share(function (Application $app) { return array( new FtpJob(), new ArchiveJob(), diff --git a/lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php b/lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php index ad5954a1f8..1c48dfc4b3 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php +++ b/lib/Alchemy/Phrasea/Model/Entities/AggregateToken.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; -use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\Table(name="AggregateTokens") diff --git a/lib/Alchemy/Phrasea/Model/Entities/Basket.php b/lib/Alchemy/Phrasea/Model/Entities/Basket.php index 227791b120..a9575a3826 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Basket.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Basket.php @@ -365,7 +365,7 @@ class Basket /** * Set order * - * @param Order $order + * @param Order $order * @return Basket */ public function setOrder(Order $order = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/BasketElement.php b/lib/Alchemy/Phrasea/Model/Entities/BasketElement.php index 60a2550f04..a38a0757c3 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/BasketElement.php +++ b/lib/Alchemy/Phrasea/Model/Entities/BasketElement.php @@ -247,7 +247,7 @@ class BasketElement /** * Set basket * - * @param Basket $basket + * @param Basket $basket * @return BasketElement */ public function setBasket(Basket $basket = null) @@ -277,7 +277,7 @@ class BasketElement /** * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return ValidationData */ public function getUserValidationDatas(\User_Adapter $user, Application $app) diff --git a/lib/Alchemy/Phrasea/Model/Entities/Feed.php b/lib/Alchemy/Phrasea/Model/Entities/Feed.php index 340b19dbb7..a4f11d97bf 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Feed.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Feed.php @@ -548,7 +548,7 @@ class Feed implements FeedInterface * * Returns a boolean indicating whether a given user has access to the feed * - * @param \User_Adapter $user + * @param \User_Adapter $user * @param \Alchemy\Phrasea\Application $app * * @return boolean @@ -561,6 +561,7 @@ class Feed implements FeedInterface || in_array($coll->get_base_id(), array_keys($user->ACL()->get_granted_base()))) { return true; } + return false; } } diff --git a/lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php b/lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php index ee733e6a63..302ba522e7 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedEntry.php @@ -236,7 +236,7 @@ class FeedEntry /** * Add items * - * @param FeedItem $items + * @param FeedItem $items * @return FeedEntry */ public function addItem(FeedItem $items) @@ -292,7 +292,7 @@ class FeedEntry /** * Set feed * - * @param Feed $feed + * @param Feed $feed * @return FeedEntry */ public function setFeed(Feed $feed = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php b/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php index df555628b7..70933cffcb 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php @@ -109,7 +109,7 @@ class FeedPublisher /** * Set feed * - * @param Feed $feed + * @param Feed $feed * @return FeedPublisher */ public function setFeed(Feed $feed = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/FeedToken.php b/lib/Alchemy/Phrasea/Model/Entities/FeedToken.php index 2dbd9fdd6e..063232125d 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FeedToken.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedToken.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; -use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\Table(name="FeedTokens") @@ -79,7 +78,7 @@ class FeedToken /** * Set feed * - * @param Feed $feed + * @param Feed $feed * @return FeedToken */ public function setFeed(Feed $feed = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php b/lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php index ffc4325e83..d48fd99335 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpCredential.php @@ -13,7 +13,6 @@ namespace Alchemy\Phrasea\Model\Entities; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; -use Alchemy\Phrasea\Application; /** * @ORM\Table(name="FtpCredential") diff --git a/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php b/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php index f669336d4a..91731b1548 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php @@ -144,7 +144,7 @@ class FtpExport /** * Set crash * - * @param integer $crash + * @param integer $crash * * @return FtpExport */ @@ -180,7 +180,7 @@ class FtpExport /** * Set nbretry * - * @param integer $nbretry + * @param integer $nbretry * * @return FtpExport */ @@ -204,7 +204,7 @@ class FtpExport /** * Set mail * - * @param string $mail + * @param string $mail * * @return FtpExport */ @@ -228,7 +228,7 @@ class FtpExport /** * Set addr * - * @param string $addr + * @param string $addr * * @return FtpExport */ @@ -252,7 +252,7 @@ class FtpExport /** * Set ssl * - * @param boolean $ssl + * @param boolean $ssl * * @return FtpExport */ @@ -276,7 +276,7 @@ class FtpExport /** * Set login * - * @param string $login + * @param string $login * * @return FtpExport */ @@ -300,7 +300,7 @@ class FtpExport /** * Set pwd * - * @param string $pwd + * @param string $pwd * * @return FtpExport */ @@ -324,7 +324,7 @@ class FtpExport /** * Set passif * - * @param boolean $passif + * @param boolean $passif * * @return FtpExport */ @@ -348,7 +348,7 @@ class FtpExport /** * Set destfolder * - * @param string $destfolder + * @param string $destfolder * * @return FtpExport */ @@ -372,7 +372,7 @@ class FtpExport /** * Set sendermail * - * @param string $sendermail + * @param string $sendermail * * @return FtpExport */ @@ -396,7 +396,7 @@ class FtpExport /** * Set textMailSender * - * @param string $textMailSender + * @param string $textMailSender * * @return FtpExport */ @@ -420,7 +420,7 @@ class FtpExport /** * Set textMailReceiver * - * @param string $textMailReceiver + * @param string $textMailReceiver * * @return FtpExport */ @@ -444,7 +444,7 @@ class FtpExport /** * Set usrId * - * @param integer $usrId + * @param integer $usrId * * @return FtpExport */ @@ -478,7 +478,7 @@ class FtpExport /** * Set user * - * @param \User_Adapter $user + * @param \User_Adapter $user * * @return FtpExport */ @@ -492,7 +492,7 @@ class FtpExport /** * Set foldertocreate * - * @param string $foldertocreate + * @param string $foldertocreate * * @return FtpExport */ @@ -516,7 +516,7 @@ class FtpExport /** * Set logfile * - * @param boolean $logfile + * @param boolean $logfile * * @return FtpExport */ @@ -540,7 +540,7 @@ class FtpExport /** * Set created * - * @param \DateTime $created + * @param \DateTime $created * * @return FtpExport */ @@ -564,7 +564,7 @@ class FtpExport /** * Set updated * - * @param \DateTime $updated + * @param \DateTime $updated * * @return FtpExport */ @@ -588,7 +588,7 @@ class FtpExport /** * Add elements * - * @param FtpExportElement $elements + * @param FtpExportElement $elements * * @return FtpExport */ diff --git a/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php b/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php index 1a635e4f5d..64e06e500d 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpExportElement.php @@ -108,7 +108,7 @@ class FtpExportElement /** * Set recordId * - * @param integer $recordId + * @param integer $recordId * * @return FtpExportElement */ @@ -132,7 +132,7 @@ class FtpExportElement /** * Set baseId * - * @param integer $baseId + * @param integer $baseId * * @return FtpExportElement */ @@ -156,7 +156,7 @@ class FtpExportElement /** * Set subdef * - * @param string $subdef + * @param string $subdef * * @return FtpExportElement */ @@ -180,7 +180,7 @@ class FtpExportElement /** * Set filename * - * @param string $filename + * @param string $filename * * @return FtpExportElement */ @@ -204,7 +204,7 @@ class FtpExportElement /** * Set folder * - * @param string $folder + * @param string $folder * * @return FtpExportElement */ @@ -228,7 +228,7 @@ class FtpExportElement /** * Set error * - * @param boolean $error + * @param boolean $error * * @return FtpExportElement */ @@ -252,7 +252,7 @@ class FtpExportElement /** * Set done * - * @param boolean $done + * @param boolean $done * * @return FtpExportElement */ @@ -276,7 +276,7 @@ class FtpExportElement /** * Set businessfields * - * @param boolean $businessfields + * @param boolean $businessfields * * @return FtpExportElement */ @@ -300,7 +300,7 @@ class FtpExportElement /** * Set created * - * @param \DateTime $created + * @param \DateTime $created * * @return FtpExportElement */ @@ -324,7 +324,7 @@ class FtpExportElement /** * Set updated * - * @param \DateTime $updated + * @param \DateTime $updated * * @return FtpExportElement */ @@ -348,7 +348,7 @@ class FtpExportElement /** * Set export * - * @param FtpExport $export + * @param FtpExport $export * * @return FtpExportElement */ diff --git a/lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php index 7b2187abc3..9630c82bab 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretAttribute.php @@ -160,7 +160,7 @@ class LazaretAttribute /** * Set lazaretFile * - * @param LazaretFile $lazaretFile + * @param LazaretFile $lazaretFile * @return LazaretAttribute */ public function setLazaretFile(LazaretFile $lazaretFile = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php index 668b7f5fb2..2eae1193c6 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretCheck.php @@ -73,7 +73,7 @@ class LazaretCheck /** * Set lazaretFile * - * @param LazaretFile $lazaretFile + * @param LazaretFile $lazaretFile * @return LazaretCheck */ public function setLazaretFile(LazaretFile $lazaretFile = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php index b5674ec0f3..f0ef1f6c96 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php @@ -159,7 +159,7 @@ class LazaretSession /** * Add files * - * @param LazaretFile $files + * @param LazaretFile $files * @return LazaretSession */ public function addFile(LazaretFile $files) diff --git a/lib/Alchemy/Phrasea/Model/Entities/Session.php b/lib/Alchemy/Phrasea/Model/Entities/Session.php index 6799c0cc6d..b59b37dbf5 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Session.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Session.php @@ -438,7 +438,7 @@ class Session /** * Get a module by its identifier * - * @param integer $moduleId + * @param integer $moduleId * @return Alchemy\Phrasea\Model\Entities\SessionModule|null */ public function getModuleById($moduleId) diff --git a/lib/Alchemy/Phrasea/Model/Entities/SessionModule.php b/lib/Alchemy/Phrasea/Model/Entities/SessionModule.php index 24ac0d9d62..c36dd4f807 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/SessionModule.php +++ b/lib/Alchemy/Phrasea/Model/Entities/SessionModule.php @@ -132,7 +132,7 @@ class SessionModule /** * Set session * - * @param Session $session + * @param Session $session * @return SessionModule */ public function setSession(Session $session = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/Task.php b/lib/Alchemy/Phrasea/Model/Entities/Task.php index 96abe00c51..93bed32811 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Task.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Task.php @@ -101,7 +101,7 @@ class Task /** * Set name * - * @param string $name + * @param string $name * @return Task */ public function setName($name) @@ -124,7 +124,7 @@ class Task /** * Set JobId * - * @param string $jobId + * @param string $jobId * @return Task */ public function setJobId($jobId) @@ -147,7 +147,7 @@ class Task /** * Set settings * - * @param string $settings + * @param string $settings * @return Task */ public function setSettings($settings) @@ -170,7 +170,7 @@ class Task /** * Set completed * - * @param boolean $completed + * @param boolean $completed * @return Task */ public function setCompleted($completed) @@ -193,7 +193,7 @@ class Task /** * Set status * - * @param string $status + * @param string $status * @return Task */ public function setStatus($status) @@ -220,7 +220,7 @@ class Task /** * Set crashed * - * @param integer $crashed + * @param integer $crashed * @return Task */ public function setCrashed($crashed) @@ -266,7 +266,7 @@ class Task /** * Set created * - * @param \DateTime $created + * @param \DateTime $created * @return Task */ public function setCreated($created) @@ -289,7 +289,7 @@ class Task /** * Set updated * - * @param \DateTime $updated + * @param \DateTime $updated * @return Task */ public function setUpdated($updated) @@ -312,7 +312,7 @@ class Task /** * Set last execution * - * @param \DateTime $lastExecution + * @param \DateTime $lastExecution * @return Task */ public function setExecuted($lastExecution) diff --git a/lib/Alchemy/Phrasea/Model/Entities/User.php b/lib/Alchemy/Phrasea/Model/Entities/User.php index 521d1190a0..42d724c54f 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/User.php +++ b/lib/Alchemy/Phrasea/Model/Entities/User.php @@ -953,7 +953,7 @@ class User * Retrieves user setting value. * * @param string $name - * @param mixed $default + * @param mixed $default * * @return string */ diff --git a/lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php b/lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php index 0d47ab94dd..706cca62d8 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UserNotificationSetting.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Entities; -use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Alchemy/Phrasea/Model/Entities/UserQuery.php b/lib/Alchemy/Phrasea/Model/Entities/UserQuery.php index 9801635249..c68bae573b 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UserQuery.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UserQuery.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Entities; -use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Alchemy/Phrasea/Model/Entities/UserSetting.php b/lib/Alchemy/Phrasea/Model/Entities/UserSetting.php index 860df152c6..faa4a251a5 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UserSetting.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UserSetting.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Entities; -use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Alchemy/Phrasea/Model/Entities/UsrList.php b/lib/Alchemy/Phrasea/Model/Entities/UsrList.php index 0c6a95dbfc..9d4209ef21 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UsrList.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrList.php @@ -222,7 +222,7 @@ class UsrList /** * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return UsrListOwner */ public function getOwner(\User_Adapter $user, Application $app) @@ -245,7 +245,7 @@ class UsrList public function has(\User_Adapter $user, Application $app) { return $this->entries->exists( - function($key, $entry) use ($user, $app) { + function ($key, $entry) use ($user, $app) { return $entry->getUser($app)->get_id() === $user->get_id(); } ); diff --git a/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php b/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php index 7179095c3a..2f86d53f15 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php @@ -143,7 +143,7 @@ class UsrListEntry /** * Set list * - * @param UsrList $list + * @param UsrList $list * @return UsrListEntry */ public function setList(UsrList $list = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php b/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php index a44da1d8e2..7763147922 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php @@ -178,7 +178,7 @@ class UsrListOwner /** * Set list * - * @param UsrList $list + * @param UsrList $list * @return UsrListOwner */ public function setList(UsrList $list = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/ValidationData.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationData.php index 20a39f969d..d16d6f38eb 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ValidationData.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationData.php @@ -160,7 +160,7 @@ class ValidationData /** * Set basket_element * - * @param BasketElement $basketElement + * @param BasketElement $basketElement * @return ValidationData */ public function setBasketElement(BasketElement $basketElement = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php index 0987a2bff6..fada77f5c6 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php @@ -244,7 +244,7 @@ class ValidationParticipant /** * Add datas * - * @param ValidationData $datas + * @param ValidationData $datas * @return ValidationParticipant */ public function addData(ValidationData $datas) @@ -277,7 +277,7 @@ class ValidationParticipant /** * Set session * - * @param ValidationSession $session + * @param ValidationSession $session * @return ValidationParticipant */ public function setSession(ValidationSession $session = null) diff --git a/lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php index 55f0067d00..031c1b3689 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationSession.php @@ -194,7 +194,7 @@ class ValidationSession /** * Set basket * - * @param Basket $basket + * @param Basket $basket * @return ValidationSession */ public function setBasket(Basket $basket = null) diff --git a/lib/Alchemy/Phrasea/Model/Manager/UserManager.php b/lib/Alchemy/Phrasea/Model/Manager/UserManager.php index d749b578a9..cc6462b81e 100644 --- a/lib/Alchemy/Phrasea/Model/Manager/UserManager.php +++ b/lib/Alchemy/Phrasea/Model/Manager/UserManager.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Manager; -use Alchemy\Phrasea\Exception\InvalidArgumentException; use Doctrine\Common\Persistence\ObjectManager; use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\UserSetting; @@ -91,13 +90,13 @@ class UserManager */ private function cleanSettings(User $user) { - foreach($user->getNotificationSettings() as $userNotificationSetting) { + foreach ($user->getNotificationSettings() as $userNotificationSetting) { $this->objectManager->remove($userNotificationSetting); } $user->getNotificationSettings()->clear(); - foreach($user->getSettings() as $userSetting) { + foreach ($user->getSettings() as $userSetting) { $this->objectManager->remove($userSetting); } @@ -111,7 +110,7 @@ class UserManager */ private function cleanQueries(User $user) { - foreach($user->getQueries() as $userQuery) { + foreach ($user->getQueries() as $userQuery) { $this->objectManager->remove($userQuery); } @@ -140,7 +139,7 @@ class UserManager $elements = $this->objectManager->getRepository('Alchemy\Phrasea\Model\Entities\FtpExport') ->findBy(array('usrId' => $user->getId())); - foreach($elements as $element) { + foreach ($elements as $element) { $this->objectManager->remove($element); } } @@ -155,7 +154,7 @@ class UserManager $orders = $this->objectManager->getRepository('Alchemy\Phrasea\Model\Entities\Order') ->findBy(array('usrId' => $user->getId())); - foreach($orders as $order) { + foreach ($orders as $order) { $this->objectManager->remove($order); } } diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/TaskManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/TaskManipulator.php index f361c1ace9..6e89184348 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/TaskManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/TaskManipulator.php @@ -32,9 +32,9 @@ class TaskManipulator implements ManipulatorInterface /** * Creates a Task. * - * @param string $name - * @param string $jobId - * @param string $settings + * @param string $name + * @param string $jobId + * @param string $settings * @param integer $period * * @return Task diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php index ee1f4d52ef..3c860ca7dd 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/UserManipulator.php @@ -15,10 +15,8 @@ use Alchemy\Geonames\Connector as GeonamesConnector; use Alchemy\Geonames\Exception\ExceptionInterface as GeonamesExceptionInterface; use Alchemy\Phrasea\Model\Manager\UserManager; use Alchemy\Phrasea\Model\Entities\User; -use Alchemy\Phrasea\Model\Repositories\UserRepository; use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Exception\InvalidArgumentException; -use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; /** @@ -59,7 +57,7 @@ class UserManipulator implements ManipulatorInterface * @return User * * @throws InvalidArgumentException if login or email is not valid. - * @throws RuntimeException if login or email already exists. + * @throws RuntimeException if login or email already exists. */ public function createUser($login, $password, $email = null, $admin = false) { @@ -82,7 +80,7 @@ class UserManipulator implements ManipulatorInterface * @return User The template * * @throws InvalidArgumentException if login is not valid. - * @throws RuntimeException if login already exists. + * @throws RuntimeException if login already exists. */ public function createTemplate($login, User $owner) { @@ -142,7 +140,7 @@ class UserManipulator implements ManipulatorInterface * @param string $email * * @throws InvalidArgumentException if email is not valid or already exists. - * @throws RuntimeException if email already exists. + * @throws RuntimeException if email already exists. */ public function setEmail(User $user, $email) { @@ -195,7 +193,7 @@ class UserManipulator implements ManipulatorInterface * @param sring $login * * @throws InvalidArgumentException if login is not valid. - * @throws RuntimeException if login already exists. + * @throws RuntimeException if login already exists. */ private function doSetLogin(User $user, $login) { @@ -213,7 +211,7 @@ class UserManipulator implements ManipulatorInterface * @param string $email * * @throws InvalidArgumentException if email is not valid or already exists. - * @throws RuntimeException if email already exists. + * @throws RuntimeException if email already exists. */ private function doSetEmail(User $user, $email) { diff --git a/lib/Alchemy/Phrasea/Model/MonologSQLLogger.php b/lib/Alchemy/Phrasea/Model/MonologSQLLogger.php index 9c8ec89bf7..a944af7e9c 100644 --- a/lib/Alchemy/Phrasea/Model/MonologSQLLogger.php +++ b/lib/Alchemy/Phrasea/Model/MonologSQLLogger.php @@ -37,8 +37,8 @@ class MonologSQLLogger implements SQLLogger /** * Tell which monolog user to use and which format to output * - * @param LoggerInterface $logger A monolog logger instance - * @param string $type the output format + * @param LoggerInterface $logger A monolog logger instance + * @param string $type the output format */ public function __construct(LoggerInterface $logger, $type = self::YAML) { diff --git a/lib/Alchemy/Phrasea/Model/Repositories/FeedItemRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/FeedItemRepository.php index 57ce597c94..272f0f22ba 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/FeedItemRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/FeedItemRepository.php @@ -66,7 +66,7 @@ class FeedItemRepository extends EntityRepository $result = $query->getResult(); - foreach($result as $item) { + foreach ($result as $item) { try { $record = $item->getRecord($app); } catch (NotFoundHttpException $e) { diff --git a/lib/Alchemy/Phrasea/Model/Repositories/FeedPublisherRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/FeedPublisherRepository.php index cf1f9a2f2c..7c9c6a7589 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/FeedPublisherRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/FeedPublisherRepository.php @@ -3,8 +3,6 @@ namespace Alchemy\Phrasea\Model\Repositories; use Doctrine\ORM\EntityRepository; -use Alchemy\Phrasea\Model\Entities\Feed; -use Alchemy\Phrasea\Model\Entities\FeedPublisher; /** * FeedPublisherRepository diff --git a/lib/Alchemy/Phrasea/Model/Repositories/FeedRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/FeedRepository.php index ed38e5a117..b29098dcd5 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/FeedRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/FeedRepository.php @@ -2,9 +2,7 @@ namespace Alchemy\Phrasea\Model\Repositories; -use Alchemy\Phrasea\Application; use Doctrine\ORM\EntityRepository; -use Alchemy\Phrasea\Model\Entities\Feed; /** * FeedRepository diff --git a/lib/Alchemy/Phrasea/Model/Repositories/LazaretFileRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/LazaretFileRepository.php index ef72d520fb..0672d960b7 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/LazaretFileRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/LazaretFileRepository.php @@ -15,7 +15,7 @@ class LazaretFileRepository extends EntityRepository public function findPerPage(array $base_ids, $offset = 0, $perPage = 10) { - $base_ids = implode(', ', array_map(function($int) { + $base_ids = implode(', ', array_map(function ($int) { return (int) $int; }, $base_ids)); diff --git a/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php index e985a6ffb3..3bb2de84ee 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Repositories; -use Alchemy\Phrasea\Application; use Doctrine\ORM\EntityRepository; /** diff --git a/lib/Alchemy/Phrasea/Model/Repositories/StoryWZRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/StoryWZRepository.php index c91f326276..b7b73a0c98 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/StoryWZRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/StoryWZRepository.php @@ -46,7 +46,7 @@ class StoryWZRepository extends EntityRepository $sortedStories[] = $story->getRecord($app)->get_title(); } - uasort($sortedStories, function($a, $b) { + uasort($sortedStories, function ($a, $b) { if ($a == $b) { return 0; } diff --git a/lib/Alchemy/Phrasea/Model/Repositories/UsrListOwnerRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/UsrListOwnerRepository.php index ed63b9258e..7c66fb4fb1 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/UsrListOwnerRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/UsrListOwnerRepository.php @@ -21,7 +21,7 @@ class UsrListOwnerRepository extends EntityRepository * * * @param UsrList $list - * @param type $owner_id + * @param type $owner_id * @return UsrList */ public function findByListAndOwner(UsrList $list, $owner_id) @@ -44,7 +44,7 @@ class UsrListOwnerRepository extends EntityRepository * * * @param UsrList $list - * @param type $usr_id + * @param type $usr_id * @return UsrList */ public function findByListAndUsrId(UsrList $list, $usr_id) diff --git a/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php index 843ba6ee51..a7fcc9e9ca 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php @@ -41,8 +41,8 @@ class UsrListRepository extends EntityRepository /** * - * @param \User_Adapter $user - * @param type $list_id + * @param \User_Adapter $user + * @param type $list_id * @return UsrList */ public function findUserListByUserAndId(Application $app, \User_Adapter $user, $list_id) diff --git a/lib/Alchemy/Phrasea/TaskManager/Editor/SubdefsEditor.php b/lib/Alchemy/Phrasea/TaskManager/Editor/SubdefsEditor.php index 090778bb5d..7b5eb9b17c 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Editor/SubdefsEditor.php +++ b/lib/Alchemy/Phrasea/TaskManager/Editor/SubdefsEditor.php @@ -22,7 +22,7 @@ class SubdefsEditor extends AbstractEditor { return 'admin/task-manager/task-editor/subdefs.html.twig'; } - + /** * {@inheritdoc} */ @@ -30,7 +30,7 @@ class SubdefsEditor extends AbstractEditor { return 10; } - + /** * {@inheritdoc} */ @@ -43,7 +43,7 @@ class SubdefsEditor extends AbstractEditor EOF; } - + /** * {@inheritdoc} */ diff --git a/lib/Alchemy/Phrasea/TaskManager/Editor/WriteMetadataEditor.php b/lib/Alchemy/Phrasea/TaskManager/Editor/WriteMetadataEditor.php index 45d23b0b66..2ee993f2dc 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Editor/WriteMetadataEditor.php +++ b/lib/Alchemy/Phrasea/TaskManager/Editor/WriteMetadataEditor.php @@ -22,7 +22,7 @@ class WriteMetadataEditor extends AbstractEditor { return 'admin/task-manager/task-editor/write-metadata.html.twig'; } - + /** * {@inheritdoc} */ @@ -30,7 +30,7 @@ class WriteMetadataEditor extends AbstractEditor { return 10; } - + /** * {@inheritdoc} */ @@ -43,7 +43,7 @@ class WriteMetadataEditor extends AbstractEditor EOF; } - + /** * {@inheritdoc} */ diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php index 566d5b943f..16102e7cff 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php @@ -1061,7 +1061,7 @@ class ArchiveJob extends AbstractJob $record = null; - $postProcess = function($element, $visa, $code) use (&$record) { + $postProcess = function ($element, $visa, $code) use (&$record) { $record = $element; }; diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/BridgeJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/BridgeJob.php index c6c6c2e51b..b925381fe5 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/BridgeJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/BridgeJob.php @@ -105,7 +105,7 @@ class BridgeJob extends AbstractJob } /** - * @param Bridge_Element $element + * @param Bridge_Element $element * * @return BridgeJob */ @@ -127,8 +127,8 @@ class BridgeJob extends AbstractJob } /** - * @param Bridge_Element $element - * + * @param Bridge_Element $element + * * @return BridgeJob */ protected function update_element(Application $app, \Bridge_Element $element) diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/FtpJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/FtpJob.php index 199de4cdfc..60c377d795 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/FtpJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/FtpJob.php @@ -118,7 +118,6 @@ class FtpJob extends AbstractJob , " (" . date('r') . ")" ) . PHP_EOL; - $this->log('debug', $line); try { diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/FtpPullJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/FtpPullJob.php index 0e85abeb60..c431db59d2 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/FtpPullJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/FtpPullJob.php @@ -105,6 +105,7 @@ class FtpPullJob extends AbstractJob if (!$this->isStarted()) { $ftp->close(); $this->log('debug', "Stopping"); + return; } diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/WriteMetadataJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/WriteMetadataJob.php index 828e494491..1905543e83 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/WriteMetadataJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/WriteMetadataJob.php @@ -87,7 +87,7 @@ class WriteMetadataJob extends AbstractJob $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC); $stmt->closeCursor(); - foreach ($rs as $row ) { + foreach ($rs as $row) { $record_id = $row['record_id']; $jeton = $row['jeton']; diff --git a/lib/Alchemy/Phrasea/TaskManager/Log/LogFilefactory.php b/lib/Alchemy/Phrasea/TaskManager/Log/LogFilefactory.php index c7bf86bff5..8194dc62dd 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Log/LogFilefactory.php +++ b/lib/Alchemy/Phrasea/TaskManager/Log/LogFilefactory.php @@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\TaskManager\Log; use Alchemy\Phrasea\Model\Entities\Task; -class LogFileFactory +class LogFilefactory { private $root; diff --git a/lib/Alchemy/Phrasea/TaskManager/TaskManagerStatus.php b/lib/Alchemy/Phrasea/TaskManager/TaskManagerStatus.php index 083bd0845e..11bccfb1fe 100644 --- a/lib/Alchemy/Phrasea/TaskManager/TaskManagerStatus.php +++ b/lib/Alchemy/Phrasea/TaskManager/TaskManagerStatus.php @@ -79,6 +79,7 @@ class TaskManagerStatus { if (!isset($this->conf['task-manager'])) { $this->conf['task-manager'] = array('status' => static::STATUS_STARTED); + return; } if (!isset($this->conf['task-manager']['status'])) { diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index 5ecc54d349..fa1bdf9ed7 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -180,7 +180,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Get informations about an identified task * - * @param \Silex\Application $app The API silex application + * @param \Silex\Application $app The API silex application * @param Task $task * @return \API_V1_result */ @@ -196,8 +196,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Start a specified task * - * @param \Silex\Application $app The API silex application - * @param Task $task The task to start + * @param \Silex\Application $app The API silex application + * @param Task $task The task to start * @return \API_V1_result */ public function start_task(Application $app, Task $task) @@ -213,8 +213,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Stop a specified task * - * @param \Silex\Application $app The API silex application - * @param Task $task The task to stop + * @param \Silex\Application $app The API silex application + * @param Task $task The task to stop * @return \API_V1_result */ public function stop_task(Application $app, Task $task) @@ -232,8 +232,8 @@ class API_V1_adapter extends API_V1_Abstract * - name * - autostart * - * @param \Silex\Application $app Silex application - * @param Task $task The task + * @param \Silex\Application $app Silex application + * @param Task $task The task * @return \API_V1_result * @throws \API_V1_exception_badrequest */ diff --git a/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php b/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php index 583381e0ea..1e82ca3bc2 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php @@ -77,7 +77,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $records = array(); - $postProcessRecord = function($record) use (&$records) { + $postProcessRecord = function ($record) use (&$records) { $records[] = $record; }; @@ -87,7 +87,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $phpunit = $this; - $postProcess = function($element, $visa, $code) use ($phpunit, &$records) { + $postProcess = function ($element, $visa, $code) use ($phpunit, &$records) { $phpunit->assertInstanceOf('\\Alchemy\Phrasea\Model\Entities\\LazaretFile', $element); $phpunit->assertInstanceOf('\\Alchemy\\Phrasea\\Border\\Visa', $visa); $phpunit->assertEquals(Manager::LAZARET_CREATED, $code); @@ -96,7 +96,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(Manager::LAZARET_CREATED, $this->object->process($this->session, File::buildFromPathfile(self::$file1, self::$DI['collection'], self::$DI['app']), $postProcess)); - $postProcess = function($element, $visa, $code) use ($phpunit, &$records) { + $postProcess = function ($element, $visa, $code) use ($phpunit, &$records) { $phpunit->assertInstanceOf('\\record_adapter', $element); $phpunit->assertInstanceOf('\\Alchemy\\Phrasea\\Border\\Visa', $visa); $phpunit->assertEquals(Manager::RECORD_CREATED, $code); @@ -119,7 +119,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { $records = array(); - $postProcessRecord = function($record) use (&$records) { + $postProcessRecord = function ($record) use (&$records) { $records[] = $record; }; $this->assertEquals(Manager::LAZARET_CREATED, $this->object->process($this->session, File::buildFromPathfile(self::$file1, self::$DI['collection'], self::$DI['app']), NULL, Manager::FORCE_LAZARET)); @@ -139,7 +139,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { $records = array(); - $postProcessRecord = function($record) use (&$records) { + $postProcessRecord = function ($record) use (&$records) { $records[] = $record; }; @@ -252,7 +252,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { $lazaret = null; - $postProcessRecord = function($element) use (&$lazaret) { + $postProcessRecord = function ($element) use (&$lazaret) { $lazaret = $element; }; @@ -384,7 +384,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $phpunit = $this; $application = self::$DI['app']; - $postProcess = function($element, $visa, $code) use ($phpunit, $application) { + $postProcess = function ($element, $visa, $code) use ($phpunit, $application) { $phpunit->assertInstanceOf('\\Alchemy\Phrasea\Model\Entities\\LazaretFile', $element); /* @var $element \Alchemy\Phrasea\Model\Entities\LazaretFile */ @@ -553,7 +553,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract { $records = array(); - $postProcessRecord = function($record) use (&$records) { + $postProcessRecord = function ($record) use (&$records) { $records[] = $record; }; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php index 4d7828dfd8..5092cdc69a 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Root/RSSFeedTest.php @@ -564,7 +564,7 @@ class RssFeedTest extends \PhraseanetWebTestCaseAbstract public function removeBadItems(Array &$item_entries, Array $available_medium) { - $remove = function($entry_item, $key) use (&$item_entries, $available_medium) { + $remove = function ($entry_item, $key) use (&$item_entries, $available_medium) { $preview_sd = $entry_item->getRecord()->get_subdef('preview'); $url_preview = $preview_sd->get_permalink(); $thumbnail_sd = $entry_item->getRecord()->get_thumbnail(); diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php index e6e6b62721..4fe8ffaad1 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manager/UserManagerTest.php @@ -11,7 +11,6 @@ namespace Alchemy\Tests\Phrasea\Model\Manipulator; -use Alchemy\Phrasea\Model\Manager\UserManager; use Alchemy\Phrasea\Model\Entities\UserNotificationSetting; use Alchemy\Phrasea\Model\Entities\UserQuery; use Alchemy\Phrasea\Model\Entities\UserSetting; diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php index 5cfb707899..2c050dab38 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/UserManipulatorTest.php @@ -11,7 +11,6 @@ namespace Alchemy\Tests\Phrasea\Model\Manipulator; -use Doctrine\Common\Collections\ArrayCollection; use Alchemy\Phrasea\Model\Manipulator\UserManipulator; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; use Alchemy\Phrasea\Model\Entities\User; diff --git a/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php b/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php index ff67136da0..29034faf4d 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Repositories/FeedItemRepositoryTest.php @@ -2,10 +2,6 @@ namespace Alchemy\Tests\Phrasea\Model\Repositories; -use Alchemy\Phrasea\Model\Entities\FtpExport; -use Alchemy\Phrasea\Model\Entities\FtpExportElement; -use Gedmo\Timestampable\TimestampableListener; - class FeedItemRepositoryTest extends \PhraseanetPHPUnitAbstract { public function testIs_record_in_public_feedInPublicFeed() diff --git a/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php b/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php index d400ec1f16..d4202b249b 100644 --- a/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php +++ b/tests/Alchemy/Tests/Phrasea/TaskManager/LiveInformationTest.php @@ -47,7 +47,6 @@ class LiveInformationTest extends \PhraseanetPHPUnitAbstract $this->assertEquals($expected, $live->getManager()); } - public function testItReturnsWorkingTaskStatus() { $task = new Task(); diff --git a/tests/classes/PhraseanetPHPUnitAbstract.php b/tests/classes/PhraseanetPHPUnitAbstract.php index 80ccb063f1..8cbfb1009b 100644 --- a/tests/classes/PhraseanetPHPUnitAbstract.php +++ b/tests/classes/PhraseanetPHPUnitAbstract.php @@ -8,7 +8,6 @@ use Alchemy\Phrasea\Model\Entities\AggregateToken; use Alchemy\Phrasea\Model\Entities\Feed; use Alchemy\Phrasea\Model\Entities\FeedEntry; use Alchemy\Phrasea\Model\Entities\FeedItem; -use Alchemy\Phrasea\Model\Entities\FeedPublisher; use Alchemy\Phrasea\Model\Entities\FeedToken; use Alchemy\Phrasea\Model\Entities\Task; use Alchemy\Phrasea\Model\Entities\User; @@ -129,7 +128,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase $phpunit = $this; - self::$DI['app'] = self::$DI->share(function($DI) use ($phpunit) { + self::$DI['app'] = self::$DI->share(function ($DI) use ($phpunit) { $environment = 'test'; $app = require __DIR__ . '/../../lib/Alchemy/Phrasea/Application/Root.php'; @@ -137,7 +136,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase return new CsrfTestProvider(); }); - $app['url_generator'] = $app->share($app->extend('url_generator', function($generator, $app) { + $app['url_generator'] = $app->share($app->extend('url_generator', function ($generator, $app) { $host = parse_url($app['phraseanet.configuration']['main']['servername'], PHP_URL_HOST); $generator->setContext(new RequestContext('', 'GET', $host)); @@ -146,13 +145,13 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase $app['debug'] = true; - $app['EM'] = $app->share($app->extend('EM', function($em) use ($phpunit) { + $app['EM'] = $app->share($app->extend('EM', function ($em) use ($phpunit) { $phpunit::initializeSqliteDB(); return $em; })); - $app['browser'] = $app->share($app->extend('browser', function($browser) { + $app['browser'] = $app->share($app->extend('browser', function ($browser) { $browser->setUserAgent(PhraseanetPHPUnitAbstract::USER_AGENT_FIREFOX8MAC); @@ -164,21 +163,21 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase ->getMock(); $app['notification.deliverer']->expects($phpunit->any()) ->method('deliver') - ->will($phpunit->returnCallback(function() use ($phpunit) { + ->will($phpunit->returnCallback(function () use ($phpunit) { $phpunit->fail('Notification deliverer must be mocked'); })); return $app; }); - self::$DI['cli'] = self::$DI->share(function($DI) use ($phpunit) { + self::$DI['cli'] = self::$DI->share(function ($DI) use ($phpunit) { $app = new CLI('cli test', null, 'test'); $app['form.csrf_provider'] = $app->share(function () { return new CsrfTestProvider(); }); - $app['url_generator'] = $app->share($app->extend('url_generator', function($generator, $app) { + $app['url_generator'] = $app->share($app->extend('url_generator', function ($generator, $app) { $host = parse_url($app['phraseanet.configuration']['main']['servername'], PHP_URL_HOST); $generator->setContext(new RequestContext('', 'GET', $host)); @@ -193,7 +192,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase return $em; })); - $app['browser'] = $app->share($app->extend('browser', function($browser) { + $app['browser'] = $app->share($app->extend('browser', function ($browser) { $browser->setUserAgent(PhraseanetPHPUnitAbstract::USER_AGENT_FIREFOX8MAC); @@ -205,14 +204,14 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase ->getMock(); $app['notification.deliverer']->expects($phpunit->any()) ->method('deliver') - ->will($phpunit->returnCallback(function() use ($phpunit) { + ->will($phpunit->returnCallback(function () use ($phpunit) { $phpunit->fail('Notification deliverer must be mocked'); })); return $app; }); - self::$DI['client'] = self::$DI->share(function($DI) { + self::$DI['client'] = self::$DI->share(function ($DI) { return new Client($DI['app'], array()); }); @@ -293,7 +292,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase $purger = new Doctrine\Common\DataFixtures\Purger\ORMPurger(); $executor = new Doctrine\Common\DataFixtures\Executor\ORMExecutor(self::$DI['app']['EM'], $purger); $executor->execute($fixtureLoader->getFixtures(), $append); - self::$DI['client'] = self::$DI->share(function($DI) { + self::$DI['client'] = self::$DI->share(function ($DI) { return new Client($DI['app'], array()); }); } @@ -319,7 +318,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase $app['browser']->setUserAgent($user_agent); $app->register(new \Silex\Provider\TwigServiceProvider()); $app->setupTwig(); - self::$DI['client'] = self::$DI->share(function($DI) use ($app) { + self::$DI['client'] = self::$DI->share(function ($DI) use ($app) { return new Client($app, array()); }); } @@ -950,7 +949,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase self::$DI['collection'] = $coll; - self::$DI['collection_no_access'] = self::$DI->share(function($DI) use ($application, $databox, $collection_no_acces) { + self::$DI['collection_no_access'] = self::$DI->share(function ($DI) use ($application, $databox, $collection_no_acces) { if (!$collection_no_acces instanceof collection) { $collection_no_acces = collection::create($application, $databox, $application['phraseanet.appbox'], 'BIBOO', $DI['user']); } @@ -969,7 +968,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase return $collection_no_acces; }); - self::$DI['collection_no_access_by_status'] = self::$DI->share(function($DI) use ($application, $databox, $collection_no_acces_by_status) { + self::$DI['collection_no_access_by_status'] = self::$DI->share(function ($DI) use ($application, $databox, $collection_no_acces_by_status) { if (!$collection_no_acces_by_status instanceof collection) { $collection_no_acces_by_status = collection::create($application, $databox, $application['phraseanet.appbox'], 'BIBOONOACCESBYSTATUS', $DI['user']); } @@ -1002,7 +1001,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase $logger->pushHandler(new \Monolog\Handler\NullHandler()); self::$recordsInitialized = array(); - $resolvePathfile = function($i) { + $resolvePathfile = function ($i) { $finder = new Symfony\Component\Finder\Finder(); $name = $i < 10 ? 'test00' . $i . '.*' : 'test0' . $i . '.*'; @@ -1017,7 +1016,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase }; foreach (range(1, 24) as $i) { - self::$DI['record_' . $i] = self::$DI->share(function($DI) use ($logger, $resolvePathfile, $i) { + self::$DI['record_' . $i] = self::$DI->share(function ($DI) use ($logger, $resolvePathfile, $i) { PhraseanetPHPUnitAbstract::$recordsInitialized[] = $i; @@ -1032,7 +1031,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase } foreach (range(1, 2) as $i) { - self::$DI['record_story_' . $i] = self::$DI->share(function($DI) use ($i) { + self::$DI['record_story_' . $i] = self::$DI->share(function ($DI) use ($i) { PhraseanetPHPUnitAbstract::$recordsInitialized[] = 'story_' . $i; @@ -1040,7 +1039,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase }); } - self::$DI['record_no_access'] = self::$DI->share(function($DI) { + self::$DI['record_no_access'] = self::$DI->share(function ($DI) { PhraseanetPHPUnitAbstract::$recordsInitialized[] = 'no_access'; @@ -1049,7 +1048,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase return \record_adapter::createFromFile($file, $DI['app']); }); - self::$DI['record_no_access_by_status'] = self::$DI->share(function($DI) { + self::$DI['record_no_access_by_status'] = self::$DI->share(function ($DI) { PhraseanetPHPUnitAbstract::$recordsInitialized[] = 'no_access_by_status';