diff --git a/lib/Alchemy/Phrasea/Authentication/Authenticator.php b/lib/Alchemy/Phrasea/Authentication/Authenticator.php index f5f269be04..89f31303c6 100644 --- a/lib/Alchemy/Phrasea/Authentication/Authenticator.php +++ b/lib/Alchemy/Phrasea/Authentication/Authenticator.php @@ -18,7 +18,6 @@ use Browser; use Doctrine\ORM\EntityManager; use Alchemy\Phrasea\Model\Entities\Session; use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Authenticator { diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php b/lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php index 7af6f7b824..66c027cb9b 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Dashboard.php @@ -152,7 +152,7 @@ class Dashboard implements ControllerProviderInterface } if ($admins > 0) { - $app['manipulator.user']->promote(array_filter(array_map(function($id) use ($app) { + $app['manipulator.user']->promote(array_filter(array_map(function ($id) use ($app) { return $app['manipulator.user']->getRepository()->find($id); }, $admins))); $app['manipulator.acl']->resetAdminRights($app['manipulator.user']->getRepository()->findAdmins()); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Query.php b/lib/Alchemy/Phrasea/Controller/Prod/Query.php index da251c5452..b973b411db 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Query.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Query.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Controller\Prod; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; -use Alchemy\Phrasea\Model\Entities\UserQuery; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\JsonResponse; diff --git a/lib/Alchemy/Phrasea/Controller/Root/Login.php b/lib/Alchemy/Phrasea/Controller/Root/Login.php index 5f9d1a73cc..23633ea903 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Login.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Login.php @@ -515,7 +515,7 @@ class Login implements ControllerProviderInterface * Sends an account unlock email. * * @param PhraseaApplication $app - * @param User $user + * @param User $user * * @throws InvalidArgumentException * @throws RuntimeException diff --git a/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php b/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php index 377e55d202..751945ffed 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php +++ b/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php @@ -91,20 +91,18 @@ class DisplaySettingService return $user->getSettings()->get($name)->getValue(); } - /** * Return a user notification setting given a user. * - * @param User $user + * @param User $user * @param string $name - * @param mixed $default + * @param mixed $default * * @return mixed */ public function getUserNotificationSetting(User $user, $name, $default = true) { if (false === $user->getNotificationSettings()->containsKey($name)) { - return $default; } diff --git a/lib/Alchemy/Phrasea/Feed/Aggregate.php b/lib/Alchemy/Phrasea/Feed/Aggregate.php index d7289725dd..85b804f5b4 100644 --- a/lib/Alchemy/Phrasea/Feed/Aggregate.php +++ b/lib/Alchemy/Phrasea/Feed/Aggregate.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Feed; use Alchemy\Phrasea\Application; -use Alchemy\Phrasea\Authentication\ACLProvider; use Alchemy\Phrasea\Exception\LogicException; use Alchemy\Phrasea\Model\Entities\User; use Doctrine\Common\Collections\ArrayCollection; @@ -73,7 +72,7 @@ class Aggregate implements FeedInterface * Creates an aggregate from all the feeds available to a given user. * * @param EntityManager $em - * @param User $user + * @param User $user * * @return Aggregate */ diff --git a/lib/Alchemy/Phrasea/Feed/Formatter/FeedFormatterInterface.php b/lib/Alchemy/Phrasea/Feed/Formatter/FeedFormatterInterface.php index a15aeb5ccb..9acbd078cc 100644 --- a/lib/Alchemy/Phrasea/Feed/Formatter/FeedFormatterInterface.php +++ b/lib/Alchemy/Phrasea/Feed/Formatter/FeedFormatterInterface.php @@ -22,7 +22,7 @@ interface FeedFormatterInterface * * @param FeedInterface $feed * @param type $page - * @param User $user + * @param User $user * @param type $generator * @param Application $app * @@ -35,7 +35,7 @@ interface FeedFormatterInterface * * @param FeedInterface $feed * @param type $page - * @param User $user + * @param User $user * @param type $generator * @param Application $app * diff --git a/lib/Alchemy/Phrasea/Feed/Link/LinkGeneratorInterface.php b/lib/Alchemy/Phrasea/Feed/Link/LinkGeneratorInterface.php index f4c46ad7f1..f3728d6c23 100644 --- a/lib/Alchemy/Phrasea/Feed/Link/LinkGeneratorInterface.php +++ b/lib/Alchemy/Phrasea/Feed/Link/LinkGeneratorInterface.php @@ -20,7 +20,7 @@ interface LinkGeneratorInterface * Generates a FeedLink based on given FeedInterface and User. * * @param FeedInterface $feed - * @param User $user + * @param User $user * @param type $format * @param type $page * @param type $renew diff --git a/lib/Alchemy/Phrasea/Model/Entities/Feed.php b/lib/Alchemy/Phrasea/Model/Entities/Feed.php index aa279aecfb..c9c843dbe3 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Feed.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Feed.php @@ -453,8 +453,8 @@ class Feed implements FeedInterface /** * Returns a boolean indicating whether the given user has access to the feed. * - * @param User $user - * @param Application $app + * @param User $user + * @param Application $app * * @return boolean */ @@ -548,7 +548,7 @@ class Feed implements FeedInterface * * Returns a boolean indicating whether a given user has access to the feed * - * @param User $user + * @param User $user * @param \Alchemy\Phrasea\Application $app * * @return boolean diff --git a/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php b/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php index 480e3631bf..12a4abcac7 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FeedPublisher.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/FtpExport.php b/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php index 8538eed2e6..a58431db06 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php +++ b/lib/Alchemy/Phrasea/Model/Entities/FtpExport.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Entities; -use Alchemy\Phrasea\Application; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; diff --git a/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php b/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php index fbe49775a2..9644fbac79 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.php +++ b/lib/Alchemy/Phrasea/Model/Entities/LazaretSession.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/Order.php b/lib/Alchemy/Phrasea/Model/Entities/Order.php index 99d07c095d..9198694e09 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Order.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Order.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/Session.php b/lib/Alchemy/Phrasea/Model/Entities/Session.php index 51e684e77d..ce87bfc732 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/Session.php +++ b/lib/Alchemy/Phrasea/Model/Entities/Session.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/UsrAuthProvider.php b/lib/Alchemy/Phrasea/Model/Entities/UsrAuthProvider.php index 93249b9def..600b6e3294 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UsrAuthProvider.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrAuthProvider.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 a4fca3e923..e4ace3a2fd 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 $user + * @param User $user * @return UsrListOwner */ public function getOwner(User $user) @@ -239,7 +239,7 @@ class UsrList /** * Return true if one of the entry is related to the given user * - * @param User $user + * @param User $user * @return boolean */ public function has(User $user, Application $app) diff --git a/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php b/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php index c2ad542781..9d3e19ed79 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrListEntry.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/UsrListOwner.php b/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php index 92e4161284..036993ec68 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.php +++ b/lib/Alchemy/Phrasea/Model/Entities/UsrListOwner.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/ValidationParticipant.php b/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php index cc00650fee..efcbc1f302 100644 --- a/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php +++ b/lib/Alchemy/Phrasea/Model/Entities/ValidationParticipant.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Entities; -use Alchemy\Phrasea\Application; use Doctrine\ORM\Mapping as ORM; /** diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/ACLManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/ACLManipulator.php index b98a0dcd0e..eb78cabc63 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/ACLManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/ACLManipulator.php @@ -40,13 +40,13 @@ class ACLManipulator implements ManipulatorInterface /** * Resets rights for users. * - * @param User[] $users + * @param User[] $users * * @throws InvalidArgumentException */ public function resetAdminRights($users) { - foreach($this->makeTraversable($users) as $user) { + foreach ($this->makeTraversable($users) as $user) { $this->doResetAdminRights($user); } } diff --git a/lib/Alchemy/Phrasea/Model/NativeQueryProvider.php b/lib/Alchemy/Phrasea/Model/NativeQueryProvider.php index 7bed0ee892..1e26af9519 100644 --- a/lib/Alchemy/Phrasea/Model/NativeQueryProvider.php +++ b/lib/Alchemy/Phrasea/Model/NativeQueryProvider.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model; use Doctrine\ORM\EntityManager; -use Doctrine\ORM\Query\ResultSetMapping; use Doctrine\ORM\Query\ResultSetMappingBuilder; use Alchemy\Phrasea\Model\Entities\User; @@ -91,4 +90,4 @@ class NativeQueryProvider return $query->getResults(); } -} \ No newline at end of file +} diff --git a/lib/Alchemy/Phrasea/Model/Repositories/BasketElementRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/BasketElementRepository.php index 48e6bfa332..40d9073144 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/BasketElementRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/BasketElementRepository.php @@ -98,7 +98,7 @@ class BasketElementRepository extends EntityRepository /** * * @param \record_adapter $record - * @param User $user + * @param User $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findReceivedElementsByRecord(\record_adapter $record, User $user) diff --git a/lib/Alchemy/Phrasea/Model/Repositories/BasketRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/BasketRepository.php index 3fd781a5cc..dbf7d3823d 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/BasketRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/BasketRepository.php @@ -28,7 +28,7 @@ class BasketRepository extends EntityRepository /** * Returns all basket for a given user that are not marked as archived * - * @param User $user + * @param User $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findActiveByUser(User $user, $sort = null) @@ -54,7 +54,7 @@ class BasketRepository extends EntityRepository /** * Returns all unread basket for a given user that are not marked as archived * - * @param User $user + * @param User $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findUnreadActiveByUser(User $user) @@ -89,7 +89,7 @@ class BasketRepository extends EntityRepository * Returns all baskets that are in validation session not expired and * where a specified user is participant (not owner) * - * @param User $user + * @param User $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findActiveValidationByUser(User $user, $sort = null) @@ -121,7 +121,7 @@ class BasketRepository extends EntityRepository * @throws NotFoundHttpException * @throws AccessDeniedHttpException * @param type $basket_id - * @param User $user + * @param User $user * @return Basket */ public function findUserBasket(Application $app, $basket_id, User $user, $requireOwner) @@ -270,8 +270,8 @@ class BasketRepository extends EntityRepository /** * Return all actives validation where current user is involved and user basket * - * @param User $user - * @param type $sort + * @param User $user + * @param type $sort * @return Array */ public function findActiveValidationAndBasketByUser(User $user, $sort = null) diff --git a/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php index 16f92356dd..fffcb7de41 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/SessionRepository.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Model\Repositories; use Doctrine\ORM\EntityRepository; -use Alchemy\Phrasea\Model\Entities\User; /** * SessionRepository diff --git a/lib/Alchemy/Phrasea/Model/Repositories/UsrListEntryRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/UsrListEntryRepository.php index a82469286e..9d75d406cd 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/UsrListEntryRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/UsrListEntryRepository.php @@ -31,7 +31,7 @@ class UsrListEntryRepository extends EntityRepository * Get all lists entries matching a given User * * @param User $user - * @param type $like + * @param type $like */ public function findUserList(User $user) { diff --git a/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php index 5290d50f83..9cec0f01bc 100644 --- a/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php +++ b/lib/Alchemy/Phrasea/Model/Repositories/UsrListRepository.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Model\Repositories; -use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Entities\UsrList; use Doctrine\ORM\EntityRepository; @@ -30,7 +29,7 @@ class UsrListRepository extends EntityRepository /** * Get all lists readable for a given User * - * @param User $user + * @param User $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findUserLists(User $user) @@ -51,8 +50,8 @@ class UsrListRepository extends EntityRepository /** * - * @param User $user - * @param type $list_id + * @param User $user + * @param type $list_id * @return UsrList */ public function findUserListByUserAndId(User $user, $list_id) @@ -74,7 +73,7 @@ class UsrListRepository extends EntityRepository /** * Search for a UsrList like '' with a given value, for a user * - * @param User $user + * @param User $user * @param type $name * @return \Doctrine\Common\Collections\ArrayCollection */ diff --git a/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php b/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php index 5d5bb704c8..bef32cc6a3 100644 --- a/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php +++ b/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php @@ -50,10 +50,10 @@ interface ControlProviderInterface /** * Find matching Term in the vocabulary repository * - * @param string $query A scalar quaery - * @param User $for_user The user doing the query + * @param string $query A scalar quaery + * @param User $for_user The user doing the query * @param TranslatorInterface $translator - * @param \databox $on_databox The databox where vocabulary should be requested + * @param \databox $on_databox The databox where vocabulary should be requested * * @return Doctrine\Common\Collections\ArrayCollection */ diff --git a/lib/classes/ACL.php b/lib/classes/ACL.php index 079f0d403e..31b49d9041 100644 --- a/lib/classes/ACL.php +++ b/lib/classes/ACL.php @@ -101,8 +101,8 @@ class ACL implements cache_cacheableInterface /** * Constructor * - * @param User $user - * @param Application $app + * @param User $user + * @param Application $app * * @return \ACL */ @@ -257,8 +257,8 @@ class ACL implements cache_cacheableInterface /** * Apply a template on user * - * @param User $template_user - * @param array $base_ids + * @param User $template_user + * @param array $base_ids * @return ACL */ public function apply_model(User $template_user, Array $base_ids) diff --git a/lib/classes/API/OAuth2/Application.php b/lib/classes/API/OAuth2/Application.php index 0fa9295e2d..59e60c1e46 100644 --- a/lib/classes/API/OAuth2/Application.php +++ b/lib/classes/API/OAuth2/Application.php @@ -519,7 +519,7 @@ class API_OAuth2_Application /** * - * @param User $user + * @param User $user * @return API_OAuth2_Account */ public function get_user_account(User $user) @@ -589,7 +589,7 @@ class API_OAuth2_Application /** * * @param Application $app - * @param User $user + * @param User $user * @param type $name * @return API_OAuth2_Application */ diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index c90ba10584..44fbb66d65 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -1460,7 +1460,7 @@ class API_V1_adapter extends API_V1_Abstract * List all avalaible feeds * * @param Request $request - * @param User $user + * @param User $user * @return API_V1_result */ public function search_publications(Request $request, User $user) @@ -1493,7 +1493,7 @@ class API_V1_adapter extends API_V1_Abstract * * @param Request $request * @param int $publication_id - * @param User $user + * @param User $user * @return API_V1_result */ public function get_publication(Request $request, $publication_id, User $user) diff --git a/lib/classes/Bridge/Account.php b/lib/classes/Bridge/Account.php index ac5499d173..ad06022d9a 100644 --- a/lib/classes/Bridge/Account.php +++ b/lib/classes/Bridge/Account.php @@ -254,7 +254,7 @@ class Bridge_Account * * @param Application $app * @param Bridge_Api $api - * @param User $user + * @param User $user * @param string $distant_id * @return Bridge_Account */ @@ -309,7 +309,7 @@ class Bridge_Account /** * * @param Application $app - * @param User $user + * @param User $user * @return Bridge_Account */ public static function get_accounts_by_user(Application $app, User $user) @@ -341,11 +341,11 @@ class Bridge_Account /** * - * @param Application $app - * @param Bridge_Api $api - * @param User $user - * @param string $dist_id - * @param string $name + * @param Application $app + * @param Bridge_Api $api + * @param User $user + * @param string $dist_id + * @param string $name * * @return Bridge_Account */ diff --git a/lib/classes/appbox/register.php b/lib/classes/appbox/register.php index d5063fa26e..89442dc565 100644 --- a/lib/classes/appbox/register.php +++ b/lib/classes/appbox/register.php @@ -37,7 +37,7 @@ class appbox_register /** * Add a registration request for a user on a collection * - * @param User $user + * @param User $user * @param collection $collection * @return appbox_register */ @@ -56,8 +56,8 @@ class appbox_register * Return an array of collection objects where provided * user is waiting for approbation * - * @param Application $app - * @param User $user + * @param Application $app + * @param User $user * * @return array */ diff --git a/lib/classes/databox.php b/lib/classes/databox.php index 0033530e23..f870264ccb 100644 --- a/lib/classes/databox.php +++ b/lib/classes/databox.php @@ -968,7 +968,7 @@ class databox extends base /** * - * @param User $user + * @param User $user * @return databox */ public function registerAdmin(User $user) diff --git a/lib/classes/eventsmanager/notify/uploadquarantine.php b/lib/classes/eventsmanager/notify/uploadquarantine.php index b35b15067f..9627082b85 100644 --- a/lib/classes/eventsmanager/notify/uploadquarantine.php +++ b/lib/classes/eventsmanager/notify/uploadquarantine.php @@ -99,8 +99,8 @@ class eventsmanager_notify_uploadquarantine extends eventsmanager_notifyAbstract /** * Notifiy an user using the specified datas * - * @param User $user - * @param string $datas + * @param User $user + * @param string $datas */ private function notifyUser(User $user, $datas) { diff --git a/lib/classes/patch/381alpha3a.php b/lib/classes/patch/381alpha3a.php index 8a306093cb..46c2761c46 100644 --- a/lib/classes/patch/381alpha3a.php +++ b/lib/classes/patch/381alpha3a.php @@ -10,7 +10,6 @@ */ use Alchemy\Phrasea\Application; -use Alchemy\Phrasea\Model\Entities\User; class patch_381alpha3a implements patchInterface { diff --git a/lib/classes/record/preview.php b/lib/classes/record/preview.php index e1cfc0315b..a24a7fbd0a 100644 --- a/lib/classes/record/preview.php +++ b/lib/classes/record/preview.php @@ -141,7 +141,7 @@ class record_preview extends record_adapter case "BASK": $Basket = $app['converter.basket']->convert($contId); $app['acl.basket']->hasAccess($Basket, $app['authentication']->getUser()); - + /* @var $Basket Basket */ $this->container = $Basket; $this->total = $Basket->getElements()->count(); diff --git a/lib/classes/set/export.php b/lib/classes/set/export.php index a68ac7fa56..3360f253c8 100644 --- a/lib/classes/set/export.php +++ b/lib/classes/set/export.php @@ -389,11 +389,11 @@ class set_export extends set_abstract /** * - * @param User $user - * @param Filesystem $filesystem - * @param Array $subdefs - * @param boolean $rename_title - * @param boolean $includeBusinessFields + * @param User $user + * @param Filesystem $filesystem + * @param Array $subdefs + * @param boolean $rename_title + * @param boolean $includeBusinessFields * * @return Array */ diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php index 30ee50b9cb..1c45fed6c6 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php @@ -244,7 +244,6 @@ class AuthenticatorTest extends \PhraseanetTestCase $session->set('usr_id', self::$DI['user']->getId()); $session->set('session_id', 1); - $authenticator = new Authenticator($app, $browser, $session, $app['EM']); $this->assertTrue($authenticator->isAuthenticated()); $this->assertEquals(self::$DI['user'], $authenticator->getUser()); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminDashboardTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminDashboardTest.php index 14bbbf2d7d..25767a3cf8 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminDashboardTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminDashboardTest.php @@ -110,7 +110,7 @@ class AdminDashboardTest extends \PhraseanetAuthenticatedWebTestCase { $this->setAdmin(true); - $admins = array_map(function(User $user) { + $admins = array_map(function (User $user) { return $user->getId(); }, self::$DI['app']['manipulator.user']->getRepository()->findAdmins()); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/OrderTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/OrderTest.php index 0bc3b50df7..22e8d6915b 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/OrderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/OrderTest.php @@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod; use Alchemy\Phrasea\Model\Entities\Order; use Alchemy\Phrasea\Model\Entities\OrderElement; -use Alchemy\Phrasea\Application as SilexApplication; class OrderTest extends \PhraseanetAuthenticatedWebTestCase { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php b/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php index bb119b84e9..4a9cbbb358 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php @@ -214,7 +214,7 @@ class RecordsRequestTest extends \PhraseanetAuthenticatedTestCase $serialized = $records->serializedList(); $exploded = explode(';', $serialized); $expected = ''; - foreach($story->getRecord(self::$DI['app'])->get_children() as $record) { + foreach ($story->getRecord(self::$DI['app'])->get_children() as $record) { $expected .= $expected === '' ? $record->get_serialize_key() : ';' . $record->get_serialize_key(); } $this->assertEquals($expected, $serialized); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Root/LoginTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Root/LoginTest.php index 366f811e0a..5e326f4a3f 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Root/LoginTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Root/LoginTest.php @@ -1800,7 +1800,7 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase foreach (self::$DI['app']['phraseanet.appbox']->get_databoxes() as $databox) { self::$termsOfUse[$databox->get_sbas_id()] = $databox->get_cgus(); - foreach( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) { + foreach ( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) { $databox->update_cgus($lng, '', false); } } @@ -1814,7 +1814,7 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase foreach (self::$DI['app']['phraseanet.appbox']->get_databoxes() as $databox) { self::$termsOfUse[$databox->get_sbas_id()] = $databox->get_cgus(); - foreach( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) { + foreach ( self::$termsOfUse[$databox->get_sbas_id()]as $lng => $tou) { $databox->update_cgus($lng, 'something', false); } } diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php index b1bdb70eca..61fed125ff 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/AuthenticationManagerServiceProviderTest.php @@ -2,13 +2,9 @@ namespace Alchemy\Tests\Phrasea\Core\Provider; -use Alchemy\Geonames\GeonamesServiceProvider; -use Alchemy\Phrasea\Application as PhraseaApplication; -use Alchemy\Phrasea\Core\Provider\ManipulatorServiceProvider; use Alchemy\Phrasea\Core\Provider\TokensServiceProvider; use Alchemy\Phrasea\Core\Provider\AuthenticationManagerServiceProvider; use Alchemy\Phrasea\Core\Provider\ConfigurationServiceProvider; -use Silex\Application; /** * @covers Alchemy\Phrasea\Core\Provider\AuthenticationManagerServiceProvider @@ -156,7 +152,7 @@ class AuthenticationManagerServiceProviderTest extends ServiceProviderTestCase self::$DI['app']['conf']->set(['authentication', 'auto-create'], ['templates' => [$template1->getId(), $template2->getId()]]); - $this->assertEquals([$template1->getLogin(), $template2->getLogin()], array_map(function($u) { + $this->assertEquals([$template1->getLogin(), $template2->getLogin()], array_map(function ($u) { return $u->getLogin(); }, self::$DI['app']['authentication.providers.account-creator']->getTemplates())); diff --git a/tests/classes/ACLTest.php b/tests/classes/ACLTest.php index 68f0d3f83f..54da9768da 100644 --- a/tests/classes/ACLTest.php +++ b/tests/classes/ACLTest.php @@ -1,8 +1,5 @@ createTranslatorMock(); - $app['EM'] = $app->share(function($app) { + $app['EM'] = $app->share(function ($app) { return $app['EM.test']; }); @@ -305,7 +305,7 @@ abstract class PhraseanetTestCase extends WebTestCase return $em; }); - $app['EM.prod'] = $app->share(function($app){ + $app['EM.prod'] = $app->share(function ($app) { try { $em = EntityManager::create($app['conf']->get(['main', 'database']), $app['EM.config'], $app['EM.events-manager']); } catch (\Exception $e) { diff --git a/tests/classes/media/subdefTest.php b/tests/classes/media/subdefTest.php index 42966441b3..9011bc2e5c 100644 --- a/tests/classes/media/subdefTest.php +++ b/tests/classes/media/subdefTest.php @@ -299,4 +299,4 @@ class media_subdefTest extends \PhraseanetTestCase $technical_datas = self::$objectNotPresent->readTechnicalDatas(self::$DI['app']['mediavorus']); $this->assertEquals([], $technical_datas); } -} \ No newline at end of file +}