diff --git a/lib/Alchemy/Phrasea/Application/Api.php b/lib/Alchemy/Phrasea/Application/Api.php index 2c772ef82d..ff4d8b2d6f 100644 --- a/lib/Alchemy/Phrasea/Application/Api.php +++ b/lib/Alchemy/Phrasea/Application/Api.php @@ -789,6 +789,7 @@ return call_user_func(function() { $code = \API_V1_result::ERROR_INTERNALSERVERERROR; $result = $app['api']->get_error_message($app['request'], $code, $e->getMessage()); + return $result->get_response(); }); //// diff --git a/lib/Alchemy/Phrasea/Application/ApiVersion.php b/lib/Alchemy/Phrasea/Application/ApiVersion.php index 2472b388c4..6addb702fd 100644 --- a/lib/Alchemy/Phrasea/Application/ApiVersion.php +++ b/lib/Alchemy/Phrasea/Application/ApiVersion.php @@ -11,9 +11,7 @@ namespace Alchemy\Phrasea\Application; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Exception; /** * diff --git a/lib/Alchemy/Phrasea/Application/Lightbox.php b/lib/Alchemy/Phrasea/Application/Lightbox.php index 2832dfa46c..ed7d061c70 100644 --- a/lib/Alchemy/Phrasea/Application/Lightbox.php +++ b/lib/Alchemy/Phrasea/Application/Lightbox.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Application; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Alchemy\Phrasea\Controller\Exception as ControllerException; /** diff --git a/lib/Alchemy/Phrasea/Application/Overview.php b/lib/Alchemy/Phrasea/Application/Overview.php index 7e89dfe7bb..15f021b142 100644 --- a/lib/Alchemy/Phrasea/Application/Overview.php +++ b/lib/Alchemy/Phrasea/Application/Overview.php @@ -11,10 +11,7 @@ namespace Alchemy\Phrasea\Application; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * diff --git a/lib/Alchemy/Phrasea/Application/Root.php b/lib/Alchemy/Phrasea/Application/Root.php index 57d05e1b98..4b47b35a74 100644 --- a/lib/Alchemy/Phrasea/Application/Root.php +++ b/lib/Alchemy/Phrasea/Application/Root.php @@ -11,10 +11,7 @@ namespace Alchemy\Phrasea\Application; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Alchemy\Phrasea\Controller\Root as Controller; /** diff --git a/lib/Alchemy/Phrasea/Application/Setup.php b/lib/Alchemy/Phrasea/Application/Setup.php index 0831773f24..ab2ef58046 100644 --- a/lib/Alchemy/Phrasea/Application/Setup.php +++ b/lib/Alchemy/Phrasea/Application/Setup.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Application; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Request; use Alchemy\Phrasea\Controller\Setup as Controller; use Alchemy\Phrasea\Controller\Utils as ControllerUtils; diff --git a/lib/Alchemy/Phrasea/Border/Attribute/Attribute.php b/lib/Alchemy/Phrasea/Border/Attribute/Attribute.php index ef260b9838..53cb21e248 100644 --- a/lib/Alchemy/Phrasea/Border/Attribute/Attribute.php +++ b/lib/Alchemy/Phrasea/Border/Attribute/Attribute.php @@ -43,7 +43,7 @@ interface Attribute /** * Build the current object with is string value * - * @throws \InvalidArgumentException + * @throws \InvalidArgumentException */ public static function loadFromString($string); } diff --git a/lib/Alchemy/Phrasea/Border/Attribute/Factory.php b/lib/Alchemy/Phrasea/Border/Attribute/Factory.php index d6e95a4862..487c0b7533 100644 --- a/lib/Alchemy/Phrasea/Border/Attribute/Factory.php +++ b/lib/Alchemy/Phrasea/Border/Attribute/Factory.php @@ -21,12 +21,12 @@ class Factory /** * Build a file package Attribute * - * @param string $name The name of the attribute, one of the + * @param string $name The name of the attribute, one of the * Attribute::NAME_* constants - * @param string $serialized The serialized value of the attribute + * @param string $serialized The serialized value of the attribute * (Attribute::asString result) - * @return Attribute The attribute - * @throws \InvalidArgumentException + * @return Attribute The attribute + * @throws \InvalidArgumentException */ public static function getFileAttribute($name, $serialized) { diff --git a/lib/Alchemy/Phrasea/Border/Attribute/MetaField.php b/lib/Alchemy/Phrasea/Border/Attribute/MetaField.php index 025fe5db7a..bb83c1c3f0 100644 --- a/lib/Alchemy/Phrasea/Border/Attribute/MetaField.php +++ b/lib/Alchemy/Phrasea/Border/Attribute/MetaField.php @@ -34,10 +34,10 @@ class MetaField implements Attribute /** * Constructor * - * @param \databox_field $databox_field The databox field - * @param type $value A scalar value + * @param \databox_field $databox_field The databox field + * @param type $value A scalar value * - * @throws \InvalidArgumentException When value is not scalar + * @throws \InvalidArgumentException When value is not scalar */ public function __construct(\databox_field $databox_field, $value) { diff --git a/lib/Alchemy/Phrasea/Border/Attribute/Metadata.php b/lib/Alchemy/Phrasea/Border/Attribute/Metadata.php index 5ff74d9638..23ca4dcbcd 100644 --- a/lib/Alchemy/Phrasea/Border/Attribute/Metadata.php +++ b/lib/Alchemy/Phrasea/Border/Attribute/Metadata.php @@ -26,7 +26,7 @@ class Metadata implements Attribute /** * Constructor * - * @param ExiftoolMeta $metadata The metadata + * @param ExiftoolMeta $metadata The metadata */ public function __construct(ExiftoolMeta $metadata) { diff --git a/lib/Alchemy/Phrasea/Border/Attribute/Story.php b/lib/Alchemy/Phrasea/Border/Attribute/Story.php index ad825f1955..6e1cf0eedb 100644 --- a/lib/Alchemy/Phrasea/Border/Attribute/Story.php +++ b/lib/Alchemy/Phrasea/Border/Attribute/Story.php @@ -24,7 +24,7 @@ class Story implements Attribute /** * Constructor * - * @param \record_adapter $story The destination story + * @param \record_adapter $story The destination story */ public function __construct(\record_adapter $story) { @@ -54,7 +54,7 @@ class Story implements Attribute /** * {@inheritdoc} * - * @return \record_adapter The story + * @return \record_adapter The story */ public function getValue() { diff --git a/lib/Alchemy/Phrasea/Border/Checker/Checker.php b/lib/Alchemy/Phrasea/Border/Checker/Checker.php index 001023457d..e7279335c1 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/Checker.php +++ b/lib/Alchemy/Phrasea/Border/Checker/Checker.php @@ -23,9 +23,9 @@ interface Checker /** * Checks constraints on the file * - * @param EntityManager $em The entity manager - * @param File $file The file package object - * @return Response A Response object + * @param EntityManager $em The entity manager + * @param File $file The file package object + * @return Response A Response object */ public function check(EntityManager $em, File $file); diff --git a/lib/Alchemy/Phrasea/Border/Checker/Filename.php b/lib/Alchemy/Phrasea/Border/Checker/Filename.php index 0e4df003e5..d993ee03f5 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/Filename.php +++ b/lib/Alchemy/Phrasea/Border/Checker/Filename.php @@ -24,7 +24,7 @@ class Filename implements Checker /** * Constructor * - * @param boolean $sensitive Toggle case-sensitive mode, default : false + * @param boolean $sensitive Toggle case-sensitive mode, default : false */ public function __construct($sensitive = false) { diff --git a/lib/Alchemy/Phrasea/Border/Checker/Response.php b/lib/Alchemy/Phrasea/Border/Checker/Response.php index 74ff5d4c5f..93610a3d1d 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/Response.php +++ b/lib/Alchemy/Phrasea/Border/Checker/Response.php @@ -22,8 +22,8 @@ class Response /** * Constructor * - * @param boolean $ok True if the response is OK - * @param Checker $checker The checker attachedto the response + * @param boolean $ok True if the response is OK + * @param Checker $checker The checker attachedto the response */ public function __construct($ok, Checker $checker) { diff --git a/lib/Alchemy/Phrasea/Border/File.php b/lib/Alchemy/Phrasea/Border/File.php index d5af161c61..ddf07d8e3d 100644 --- a/lib/Alchemy/Phrasea/Border/File.php +++ b/lib/Alchemy/Phrasea/Border/File.php @@ -46,9 +46,9 @@ class File /** * Constructor * - * @param Media $media The media - * @param \collection $collection The destination collection - * @param string $originalName The original name of the file + * @param Media $media The media + * @param \collection $collection The destination collection + * @param string $originalName The original name of the file * (if not provided, original name is * extracted from the pathfile) */ @@ -77,9 +77,9 @@ class File * @todo Check if an UUID is contained in the attributes, replace It if * necessary * - * @param boolean $generate if true, if no uuid found, a valid one is generated - * @param boolean $write if true, writes uuid in all available metadatas - * @return File + * @param boolean $generate if true, if no uuid found, a valid one is generated + * @param boolean $write if true, writes uuid in all available metadatas + * @return File */ public function getUUID($generate = false, $write = false) { @@ -253,8 +253,8 @@ class File /** * Adds an attribute to the file package * - * @param Attribute\Attribute $attribute The attribute - * @return File + * @param Attribute\Attribute $attribute The attribute + * @return File */ public function addAttribute(Attribute\Attribute $attribute) { @@ -266,9 +266,9 @@ class File /** * Build the File package object * - * @param string $pathfile The path to the file - * @param \collection $collection The destination collection - * @param string $originalName An optionnal original name (if + * @param string $pathfile The path to the file + * @param \collection $collection The destination collection + * @param string $originalName An optionnal original name (if * different from the $pathfile filename) * @throws \InvalidArgumentException * diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index d9bed71779..30ebed3704 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -42,7 +42,7 @@ class Manager /** * Constructor * - * @param \Doctrine\ORM\EntityManager $em Entity manager + * @param \Doctrine\ORM\EntityManager $em Entity manager */ public function __construct(EntityManager $em) { @@ -62,14 +62,14 @@ class Manager /** * Add a file to Phraseanet after having checked it * - * @param LazaretSession $session The current Lazaret Session - * @param File $file A File package object - * @param type $callable A callback to execute after process + * @param LazaretSession $session The current Lazaret Session + * @param File $file A File package object + * @param type $callable A callback to execute after process * (arguments are $element (LazaretFile or \record_adapter), * $visa (Visa) * and $code (self::RECORD_CREATED or self::LAZARET_CREATED)) - * @param type $forceBehavior Force a behavior, one of the self::FORCE_* constant - * @return int One of the self::RECORD_CREATED or self::LAZARET_CREATED constants + * @param type $forceBehavior Force a behavior, one of the self::FORCE_* constant + * @return int One of the self::RECORD_CREATED or self::LAZARET_CREATED constants */ public function process(LazaretSession $session, File $file, $callable = null, $forceBehavior = null) { @@ -106,8 +106,8 @@ class Manager /** * Check a File package object against the Checkers, and returns a Visa * - * @param File $file A File package object - * @return Visa The Visa + * @param File $file A File package object + * @return Visa The Visa */ public function getVisa(File $file) { @@ -123,8 +123,8 @@ class Manager /** * Registers a checker * - * @param Checker\Checker $checker The checker to register - * @return Manager + * @param Checker\Checker $checker The checker to register + * @return Manager */ public function registerChecker(Checker\Checker $checker) { @@ -136,8 +136,8 @@ class Manager /** * Registers an array of checkers * - * @param array $checkers Array of checkers - * @return Manager + * @param array $checkers Array of checkers + * @return Manager */ public function registerCheckers(array $checkers) { @@ -151,8 +151,8 @@ class Manager /** * Unregister a checker * - * @param Checker\Checker $checker The checker to unregister - * @return Manager + * @param Checker\Checker $checker The checker to unregister + * @return Manager */ public function unregisterChecker(Checker\Checker $checker) { @@ -181,8 +181,8 @@ class Manager /** * Find an available Lazaret filename and creates the empty file. * - * @param string $filename The desired filename - * @return string The available filename to use + * @param string $filename The desired filename + * @return string The available filename to use */ protected function bookLazaretPathfile($filename) { @@ -205,8 +205,8 @@ class Manager /** * Adds a record to Phraseanet * - * @param File $file The package file - * @return \record_adater + * @param File $file The package file + * @return \record_adater */ protected function createRecord(File $file) { @@ -373,10 +373,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 \Entities\LazaretFile */ protected function createLazaret(File $file, Visa $visa, LazaretSession $session, $forced) @@ -440,8 +440,8 @@ class Manager * Add technical Metadata attribute to a package file by reference to add it * to Phraseanet * - * @param File $file The file - * @return \Doctrine\ORM\EntityManager + * @param File $file The file + * @return \Doctrine\ORM\EntityManager */ protected function addMediaAttributes(File &$file) { diff --git a/lib/Alchemy/Phrasea/Border/Visa.php b/lib/Alchemy/Phrasea/Border/Visa.php index 9f9c0d0acc..421b9cc643 100644 --- a/lib/Alchemy/Phrasea/Border/Visa.php +++ b/lib/Alchemy/Phrasea/Border/Visa.php @@ -46,8 +46,8 @@ class Visa /** * Add a checker Response to the visa * - * @param Checker\Response $response A Checker Response - * @return Visa + * @param Checker\Response $response A Checker Response + * @return Visa */ public function addResponse(Checker\Response $response) { @@ -59,7 +59,7 @@ class Visa /** * Get all the responses generated by the Checkers * - * @return array An array of Checker\Response + * @return array An array of Checker\Response */ public function getResponses() { diff --git a/lib/Alchemy/Phrasea/Cache/Cache.php b/lib/Alchemy/Phrasea/Cache/Cache.php index 470f94ee3c..ea3a9ab500 100644 --- a/lib/Alchemy/Phrasea/Cache/Cache.php +++ b/lib/Alchemy/Phrasea/Cache/Cache.php @@ -35,7 +35,7 @@ interface Cache extends DoctrineCache /** * Get an entry from the cache. * - * @param string $key cache id The id of the cache entry to fetch. + * @param string $key cache id The id of the cache entry to fetch. * @return string The cached data. * @return FALSE, if no cache entry exists for the given id. * @ throws Alchemy\Phrasea\Cache\Exception if provided key does not exist @@ -45,7 +45,7 @@ interface Cache extends DoctrineCache /** * Delete multi cache entries * - * @param array $keys contains all keys to delete + * @param array $keys contains all keys to delete * @return Alchemy\Phrasea\Cache\Cache */ public function deleteMulti(array $keys); diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Description.php b/lib/Alchemy/Phrasea/Controller/Admin/Description.php index a97f94858e..2fc6ac1edc 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Description.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Description.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Admin; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpFoundation\RedirectResponse; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Fields.php b/lib/Alchemy/Phrasea/Controller/Admin/Fields.php index 867158574c..13ed8e44be 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Fields.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Fields.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Admin; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php b/lib/Alchemy/Phrasea/Controller/Admin/Publications.php index ccc69a6958..7427f12918 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Publications.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Publications.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Admin; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Root.php b/lib/Alchemy/Phrasea/Controller/Admin/Root.php index 59f56d2492..475fe000f9 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Root.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Root.php @@ -18,8 +18,6 @@ namespace Alchemy\Phrasea\Controller\Admin; */ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php b/lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php index 942626eb0d..a7d6b62d7b 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Subdefs.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Admin; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpFoundation\RedirectResponse; use Silex\Application; use Silex\ControllerProviderInterface; diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Users.php b/lib/Alchemy/Phrasea/Controller/Admin/Users.php index f6fcd0fceb..3c3bec82cd 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Users.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Users.php @@ -14,8 +14,6 @@ namespace Alchemy\Phrasea\Controller\Admin; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Bridge.php b/lib/Alchemy/Phrasea/Controller/Prod/Bridge.php index 04d5aa8517..ff5be28cef 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Bridge.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Bridge.php @@ -16,8 +16,6 @@ use Silex\ControllerProviderInterface; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Alchemy\Phrasea\Helper\Record as RecordHelper; /** diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php b/lib/Alchemy/Phrasea/Controller/Prod/Feed.php index cd3ad2961e..07e94526b0 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Feed.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Feed.php @@ -16,8 +16,6 @@ use Silex\ControllerProviderInterface; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Alchemy\Phrasea\Helper\Record as RecordHelper; /** diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Language.php b/lib/Alchemy/Phrasea/Controller/Prod/Language.php index 11851264b4..51de9c0a86 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Language.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Language.php @@ -14,11 +14,7 @@ namespace Alchemy\Phrasea\Controller\Prod; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Alchemy\Phrasea\Helper\Record as RecordHelper; /** * diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php b/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php index 9cdfc22256..ab26cb1823 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Lazaret.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Controller\Prod; -use Alchemy\Phrasea\Helper; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; @@ -32,8 +31,8 @@ class Lazaret implements ControllerProviderInterface /** * Connect the ControllerCollection to the Silex Application * - * @param Application $app A silex application - * @return \Silex\ControllerCollection + * @param Application $app A silex application + * @return \Silex\ControllerCollection */ public function connect(Application $app) { @@ -146,8 +145,8 @@ class Lazaret implements ControllerProviderInterface /** * List all elements in lazaret * - * @param Application $app A Silex application - * @param Request $request The current request + * @param Application $app A Silex application + * @param Request $request The current request * * @return Response */ @@ -172,23 +171,23 @@ class Lazaret implements ControllerProviderInterface /** * Get one lazaret Element * - * @param Application $app A Silex application - * @param Request $request The current request - * @param int $file_id A lazaret element id + * @param Application $app A Silex application + * @param Request $request The current request + * @param int $file_id A lazaret element id * * @return Response */ public function getElement(Application $app, Request $request, $file_id) { - + } /** * Add an element to phraseanet * - * @param Application $app A Silex application - * @param Request $request The current request - * @param int $file_id A lazaret element id + * @param Application $app A Silex application + * @param Request $request The current request + * @param int $file_id A lazaret element id * * @return Response */ @@ -200,9 +199,9 @@ class Lazaret implements ControllerProviderInterface /** * Delete a lazaret element * - * @param Application $app A Silex application where the controller is mounted on - * @param Request $request The current request - * @param int $file_id A lazaret element id + * @param Application $app A Silex application where the controller is mounted on + * @param Request $request The current request + * @param int $file_id A lazaret element id * * @return Response */ @@ -214,9 +213,9 @@ class Lazaret implements ControllerProviderInterface /** * Substitute a record element by a lazaret element * - * @param Application $app A Silex application where the controller is mounted on - * @param Request $request The current request - * @param int $file_id A lazaret element id + * @param Application $app A Silex application where the controller is mounted on + * @param Request $request The current request + * @param int $file_id A lazaret element id * * @return Response */ @@ -228,9 +227,9 @@ class Lazaret implements ControllerProviderInterface /** * Get the associated lazaret element thumbnail * - * @param Application $app A Silex application where the controller is mounted on - * @param Request $request The current request - * @param int $file_id A lazaret element id + * @param Application $app A Silex application where the controller is mounted on + * @param Request $request The current request + * @param int $file_id A lazaret element id * * @return Response */ @@ -242,8 +241,8 @@ class Lazaret implements ControllerProviderInterface /** * Prefix the method to call with the controller class name * - * @param string $method The method to call - * @return string + * @param string $method The method to call + * @return string */ private function call($method) { diff --git a/lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php b/lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php index 75ec05d1c6..b825cb7d50 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/MoveCollection.php @@ -15,7 +15,6 @@ use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Alchemy\Phrasea\Helper\Record as RecordHelper; /** diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Query.php b/lib/Alchemy/Phrasea/Controller/Prod/Query.php index 470b14ffff..1a2b043594 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Query.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Query.php @@ -120,8 +120,7 @@ class Query implements ControllerProviderInterface } if ($npages > 4) $string .= ">>"; - } - else { + } else { $start = $npages - 4; if (($start) > 0) $string .= "<<"; @@ -134,8 +133,7 @@ class Query implements ControllerProviderInterface $string .= "" . $i . ""; } } - } - else { + } else { $string .= "<<"; for ($i = ($page - 2); $i <= ($page + 2); $i ++ ) { diff --git a/lib/Alchemy/Phrasea/Controller/Prod/TOU.php b/lib/Alchemy/Phrasea/Controller/Prod/TOU.php index d9e6e0aac2..2d1af82acd 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/TOU.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/TOU.php @@ -16,9 +16,6 @@ use Silex\ControllerProviderInterface; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Alchemy\Phrasea\Helper\Record as RecordHelper; /** * diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php index d18430fae7..82daec296e 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Controller\Prod; -use Alchemy\Phrasea\RouteProcessor\Basket as BasketRoute; use Alchemy\Phrasea\Helper; use DataURI; use MediaVorus\MediaVorus; @@ -20,9 +19,6 @@ use Silex\ControllerProviderInterface; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php b/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php index 97c5c3bd55..b9dc23fcaa 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php @@ -16,9 +16,6 @@ use Silex\ControllerProviderInterface; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Alchemy\Phrasea\Helper\Record as RecordHelper; /** * diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Upload.php b/lib/Alchemy/Phrasea/Controller/Prod/Upload.php index e6240891b5..6340b1eb3e 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Upload.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Upload.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Controller\Prod; use Alchemy\Phrasea\Border; -use Alchemy\Phrasea\Helper; use MediaVorus\MediaVorus; use Silex\Application; use Silex\ControllerProviderInterface; @@ -35,8 +34,8 @@ class Upload implements ControllerProviderInterface /** * Connect the ControllerCollection to the Silex Application * - * @param Application $app A silex application - * @return \Silex\ControllerCollection + * @param Application $app A silex application + * @return \Silex\ControllerCollection */ public function connect(Application $app) { @@ -83,8 +82,8 @@ class Upload implements ControllerProviderInterface /** * Render the html upload form * - * @param Application $app A Silex application - * @param Request $request The current request + * @param Application $app A Silex application + * @param Request $request The current request * * @return Response */ @@ -115,8 +114,8 @@ class Upload implements ControllerProviderInterface /** * Upload processus * - * @param Application $app The Silex application - * @param Request $request The current request + * @param Application $app The Silex application + * @param Request $request The current request * * @return Response */ @@ -232,8 +231,8 @@ class Upload implements ControllerProviderInterface /** * Prefix the method to call with the controller class name * - * @param string $method The method to call - * @return string + * @param string $method The method to call + * @return string */ private function call($method) { diff --git a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php b/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php index 9e0fa7a3ad..188aa057dc 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php +++ b/lib/Alchemy/Phrasea/Controller/Root/RSSFeeds.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Root; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; @@ -68,8 +66,7 @@ class RSSFeeds implements ControllerProviderInterface $content->set_previous_page($feed->get_user_link($registry, $user, $format, ($page - 1))); if ($total > ($page * $perPage)) $content->set_next_page($feed->get_user_link($registry, $user, $format, ($page + 1))); - } - else { + } else { if ($page > 1) $content->set_previous_page($feed->get_homepage_link($registry, $format, ($page - 1))); if ($total > ($page * $perPage)) diff --git a/lib/Alchemy/Phrasea/Controller/Setup/Installer.php b/lib/Alchemy/Phrasea/Controller/Setup/Installer.php index d329784b7d..2222ee1067 100644 --- a/lib/Alchemy/Phrasea/Controller/Setup/Installer.php +++ b/lib/Alchemy/Phrasea/Controller/Setup/Installer.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Setup; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php b/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php index 6058f5c551..cf316b716a 100644 --- a/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php +++ b/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php @@ -11,10 +11,7 @@ namespace Alchemy\Phrasea\Controller\Setup; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php b/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php index 83523f2c07..b92ac368d9 100644 --- a/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php +++ b/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Utils; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Controller/Utils/PathFileTest.php b/lib/Alchemy/Phrasea/Controller/Utils/PathFileTest.php index 5ba8a257a1..2aa0d18dd9 100644 --- a/lib/Alchemy/Phrasea/Controller/Utils/PathFileTest.php +++ b/lib/Alchemy/Phrasea/Controller/Utils/PathFileTest.php @@ -13,8 +13,6 @@ namespace Alchemy\Phrasea\Controller\Utils; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Silex\Application; use Silex\ControllerProviderInterface; use Silex\ControllerCollection; diff --git a/lib/Alchemy/Phrasea/Core/Configuration.php b/lib/Alchemy/Phrasea/Core/Configuration.php index 7c4d4192c2..df99cc8864 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration.php +++ b/lib/Alchemy/Phrasea/Core/Configuration.php @@ -37,8 +37,8 @@ class Configuration /** * - * @param Configuration\ApplicationSpecification $specifications - * @param type $environment + * @param Configuration\ApplicationSpecification $specifications + * @param type $environment * @return \Alchemy\Phrasea\Core\Configuration */ public static function build($specifications = null, $environment = null) @@ -52,8 +52,8 @@ class Configuration /** * - * @param Configuration\Specification $specifications - * @param type $environment + * @param Configuration\Specification $specifications + * @param type $environment * @return \Alchemy\Phrasea\Core\Configuration */ public function __construct(Configuration\Specification $specifications, $environment = null) @@ -336,7 +336,7 @@ class Configuration /** * Return the selected service configuration * - * @param type $name + * @param type $name * @return ParameterBag */ public function getService($name) diff --git a/lib/Alchemy/Phrasea/Core/Service/Log/FirePHP.php b/lib/Alchemy/Phrasea/Core/Service/Log/FirePHP.php index 6c9277bdc2..bcda83a8e1 100644 --- a/lib/Alchemy/Phrasea/Core/Service/Log/FirePHP.php +++ b/lib/Alchemy/Phrasea/Core/Service/Log/FirePHP.php @@ -16,7 +16,6 @@ use Alchemy\Phrasea\Core, Alchemy\Phrasea\Core\Service\ServiceAbstract, Alchemy\Phrasea\Core\Service\ServiceInterface; use Monolog\Logger; -use Monolog\Handler\StreamHandler; use Monolog\Handler\FirePHPHandler; /** diff --git a/lib/Alchemy/Phrasea/Core/Service/Orm/Doctrine.php b/lib/Alchemy/Phrasea/Core/Service/Orm/Doctrine.php index 2fb66730ba..57a24f5265 100644 --- a/lib/Alchemy/Phrasea/Core/Service/Orm/Doctrine.php +++ b/lib/Alchemy/Phrasea/Core/Service/Orm/Doctrine.php @@ -16,7 +16,6 @@ use Alchemy\Phrasea\Core, Alchemy\Phrasea\Core\Service\ServiceAbstract, Alchemy\Phrasea\Core\Service\ServiceInterface; use Doctrine\DBAL\Types\Type; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; /** * diff --git a/lib/Alchemy/Phrasea/Core/Service/ServiceAbstract.php b/lib/Alchemy/Phrasea/Core/Service/ServiceAbstract.php index e6a2351e6c..8ea0f2496c 100644 --- a/lib/Alchemy/Phrasea/Core/Service/ServiceAbstract.php +++ b/lib/Alchemy/Phrasea/Core/Service/ServiceAbstract.php @@ -12,7 +12,6 @@ namespace Alchemy\Phrasea\Core\Service; use Alchemy\Phrasea\Core; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; /** * diff --git a/lib/Alchemy/Phrasea/Helper/Helper.php b/lib/Alchemy/Phrasea/Helper/Helper.php index 3ea702493e..547e1c1252 100644 --- a/lib/Alchemy/Phrasea/Helper/Helper.php +++ b/lib/Alchemy/Phrasea/Helper/Helper.php @@ -35,7 +35,7 @@ class Helper /** * - * @param Kernel $kernel + * @param Kernel $kernel * @return Helper */ public function __construct(Core $core, Request $Request) diff --git a/lib/Alchemy/Phrasea/Helper/Prod.php b/lib/Alchemy/Phrasea/Helper/Prod.php index 8f1b6b48ac..eba2311931 100644 --- a/lib/Alchemy/Phrasea/Helper/Prod.php +++ b/lib/Alchemy/Phrasea/Helper/Prod.php @@ -11,8 +11,6 @@ namespace Alchemy\Phrasea\Helper; -use Alchemy\Phrasea\Core; -use Symfony\Component\HttpFoundation\Request; /** * diff --git a/lib/Alchemy/Phrasea/Helper/Record/Bridge.php b/lib/Alchemy/Phrasea/Helper/Record/Bridge.php index a579ac98ad..65a6160865 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Bridge.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Bridge.php @@ -13,7 +13,6 @@ namespace Alchemy\Phrasea\Helper\Record; use Alchemy\Phrasea\Helper\Record\Helper as RecordHelper, Alchemy\Phrasea\Core; -use Symfony\Component\HttpFoundation\Request; /** * diff --git a/lib/Alchemy/Phrasea/Helper/Record/Edit.php b/lib/Alchemy/Phrasea/Helper/Record/Edit.php index 4c60b85d1b..966e32e697 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Edit.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Edit.php @@ -77,7 +77,7 @@ class Edit extends RecordHelper /** * - * @param \Alchemy\Phrasea\Core $core + * @param \Alchemy\Phrasea\Core $core * @return Edit */ public function __construct(Core $core, Request $Request) @@ -433,7 +433,7 @@ class Edit extends RecordHelper /** * Substitute Head file of groupings and save new Desc * - * @param http_request $request + * @param http_request $request * @return action_edit */ public function execute(Request $request) diff --git a/lib/Alchemy/Phrasea/Helper/Record/Feed.php b/lib/Alchemy/Phrasea/Helper/Record/Feed.php index 6762f2fa06..3b7d9872f3 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Feed.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Feed.php @@ -42,7 +42,7 @@ class Feed extends RecordHelper /** * - * @param \Alchemy\Phrasea\Core $core + * @param \Alchemy\Phrasea\Core $core * @return Feed */ public function __construct(Core $core, Request $Request) diff --git a/lib/Alchemy/Phrasea/Helper/Record/Helper.php b/lib/Alchemy/Phrasea/Helper/Record/Helper.php index 2168758304..d32be48f6f 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Helper.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Helper.php @@ -96,7 +96,7 @@ class Helper extends \Alchemy\Phrasea\Helper\Helper /** * - * @param \Alchemy\Phrasea\Core $core + * @param \Alchemy\Phrasea\Core $core * @return Helper */ public function __construct(Core $core, Request $Request) diff --git a/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php b/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php index 076606b92b..87751ab0ea 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php +++ b/lib/Alchemy/Phrasea/Helper/Record/MoveCollection.php @@ -41,7 +41,7 @@ class MoveCollection extends RecordHelper /** * - * @param \Alchemy\Phrasea\Core $core + * @param \Alchemy\Phrasea\Core $core * @return MoveCollection */ public function __construct(Core $core, Request $Request) @@ -91,7 +91,7 @@ class MoveCollection extends RecordHelper /** * - * @param http_request $request + * @param http_request $request * @return action_move */ public function execute(Request $request) diff --git a/lib/Alchemy/Phrasea/Helper/Record/Printer.php b/lib/Alchemy/Phrasea/Helper/Record/Printer.php index ecf69d063c..1818e6756c 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Printer.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Printer.php @@ -30,7 +30,7 @@ class Printer extends RecordHelper /** * - * @param \Alchemy\Phrasea\Core $core + * @param \Alchemy\Phrasea\Core $core * @return Printer */ public function __construct(Core $core, Request $Request) diff --git a/lib/Alchemy/Phrasea/Helper/Record/Push.php b/lib/Alchemy/Phrasea/Helper/Record/Push.php index 015587aceb..673937f271 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Push.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Push.php @@ -11,7 +11,6 @@ namespace Alchemy\Phrasea\Helper\Record; -use Alchemy\Phrasea\Core; use Alchemy\Phrasea\Helper\Record\Helper as RecordHelper, Symfony\Component\HttpFoundation\Request; diff --git a/lib/Alchemy/Phrasea/Helper/Record/Tools.php b/lib/Alchemy/Phrasea/Helper/Record/Tools.php index 8a7136b85a..4a68ad6c2e 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Tools.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Tools.php @@ -11,8 +11,6 @@ namespace Alchemy\Phrasea\Helper\Record; -use Alchemy\Phrasea\Core; -use Symfony\Component\HttpFoundation\Request; use Alchemy\Phrasea\Helper\Record\Helper as RecordHelper; /** diff --git a/lib/Alchemy/Phrasea/Helper/Record/Tooltip.php b/lib/Alchemy/Phrasea/Helper/Record/Tooltip.php index 9e48824449..f312ff9d3c 100644 --- a/lib/Alchemy/Phrasea/Helper/Record/Tooltip.php +++ b/lib/Alchemy/Phrasea/Helper/Record/Tooltip.php @@ -11,8 +11,6 @@ namespace Alchemy\Phrasea\Helper\Record; -use Alchemy\Phrasea\Core; -use Symfony\Component\HttpFoundation\Request; use Alchemy\Phrasea\Helper\Record\Helper as RecordHelper; /** diff --git a/lib/Alchemy/Phrasea/Helper/User/Edit.php b/lib/Alchemy/Phrasea/Helper/User/Edit.php index 2b32c1826c..3b24dfbbea 100644 --- a/lib/Alchemy/Phrasea/Helper/User/Edit.php +++ b/lib/Alchemy/Phrasea/Helper/User/Edit.php @@ -417,11 +417,9 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper if ($v === '1') { $create_sbas[\phrasea::sbasFromBas($base_id)] = \phrasea::sbasFromBas($base_id); $create[] = $base_id; - } - else + } else $delete[] = $base_id; - } - else { + } else { $create_sbas[\phrasea::sbasFromBas($base_id)] = \phrasea::sbasFromBas($base_id); $update[$base_id][$p] = $v; } diff --git a/lib/Alchemy/Phrasea/Helper/WorkZone.php b/lib/Alchemy/Phrasea/Helper/WorkZone.php index da2a97baba..7118af3973 100644 --- a/lib/Alchemy/Phrasea/Helper/WorkZone.php +++ b/lib/Alchemy/Phrasea/Helper/WorkZone.php @@ -11,8 +11,6 @@ namespace Alchemy\Phrasea\Helper; -use Alchemy\Phrasea\Core; -use Symfony\Component\HttpFoundation\Request; /** * diff --git a/lib/Alchemy/Phrasea/Loader/Autoloader.php b/lib/Alchemy/Phrasea/Loader/Autoloader.php index 9d521a6aa5..2b9a09f055 100644 --- a/lib/Alchemy/Phrasea/Loader/Autoloader.php +++ b/lib/Alchemy/Phrasea/Loader/Autoloader.php @@ -73,8 +73,8 @@ class Autoloader extends UniversalClassLoader /** * Check whether a class with $class name exists * foreach declared paths - * @param string $class - * @return mixed string|null + * @param string $class + * @return mixed string|null */ private function checkFile($classname) { diff --git a/lib/Alchemy/Phrasea/Loader/CacheAutoloader.php b/lib/Alchemy/Phrasea/Loader/CacheAutoloader.php index 0dbde4f24b..be8d5e9172 100644 --- a/lib/Alchemy/Phrasea/Loader/CacheAutoloader.php +++ b/lib/Alchemy/Phrasea/Loader/CacheAutoloader.php @@ -45,7 +45,7 @@ class CacheAutoloader extends Autoloader /** * Take a identifier cache key prefix - * @param string $prefix + * @param string $prefix * @throws \Exceptionwhen none of the op cache code are available */ public function __construct($prefix, $namespace = null) diff --git a/lib/Alchemy/Phrasea/Out/Module/PDF.php b/lib/Alchemy/Phrasea/Out/Module/PDF.php index d9785f754f..6ea1c936ff 100644 --- a/lib/Alchemy/Phrasea/Out/Module/PDF.php +++ b/lib/Alchemy/Phrasea/Out/Module/PDF.php @@ -401,8 +401,7 @@ class PDF rename($tmp_filename, $tmp_filename . '.png'); $miniConv[$RIGHT_IMG] = $tmp_filename . '.png'; $RIGHT_IMG = $tmp_filename . '.png'; - } - else + } else $RIGHT_IMG = $miniConv[$RIGHT_IMG]; $wmm = (int) $size[0] * 25.4 / 72; @@ -416,8 +415,7 @@ class PDF if ($hmm < 6) $tt = (6 - $hmm) / 2; $this->pdf->Image($RIGHT_IMG, 200 - 0.5 - $wmm, $ytmp + 0.5 + $tt); - } - else { + } else { $wmm = (int) $size[0] * 25.4 / 72; $hmm = (int) $size[1] * 25.4 / 72; if ($hmm > 6) { diff --git a/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php b/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php index ef82393056..01c51402bf 100644 --- a/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php +++ b/lib/Alchemy/Phrasea/Out/Tool/PhraseaPDF.php @@ -20,12 +20,12 @@ class PhraseaPDF extends \TCPDF { const FONT = 'freesans'; - function Header() + public function Header() { } - function Footer() + public function Footer() { $ml = $this->SetLeftMargin(0); $mr = $this->SetRightMargin(0); diff --git a/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php b/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php index a95c013617..77cffb6c7b 100644 --- a/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php +++ b/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/ControlProviderInterface.php @@ -41,13 +41,13 @@ interface ControlProviderInterface public function validate($id); /** - * @return string returns the value corresponding to an id + * @return string returns the value corresponding to an id * @throws \Exception if the $id is invalid */ public function getValue($id); /** - * @return mixed returns the actual ressource corresponding to an id + * @return mixed returns the actual ressource corresponding to an id * @throws \Exception if the $id is invalid */ public function getRessource($id); @@ -55,9 +55,9 @@ interface ControlProviderInterface /** * Find matching Term in the vocabulary repository * - * @param string $query A scalar quaery - * @param \User_Adapter $for_user The user doing the query - * @param \databox $on_databox The databox where vocabulary should be requested + * @param string $query A scalar quaery + * @param \User_Adapter $for_user The user doing the query + * @param \databox $on_databox The databox where vocabulary should be requested * * @return Doctrine\Common\Collections\ArrayCollection */ diff --git a/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/UserProvider.php b/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/UserProvider.php index 4665ce1cc6..04eba4225c 100644 --- a/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/UserProvider.php +++ b/lib/Alchemy/Phrasea/Vocabulary/ControlProvider/UserProvider.php @@ -42,9 +42,9 @@ class UserProvider implements ControlProviderInterface /** * - * @param string $query - * @param \User_Adapter $for_user - * @param \databox $on_databox + * @param string $query + * @param \User_Adapter $for_user + * @param \databox $on_databox * @return \Doctrine\Common\Collections\ArrayCollection */ public function find($query, \User_Adapter $for_user, \databox $on_databox = null) @@ -76,7 +76,7 @@ class UserProvider implements ControlProviderInterface /** * - * @param mixed $id + * @param mixed $id * @return boolean */ public function validate($id) @@ -96,7 +96,7 @@ class UserProvider implements ControlProviderInterface /** * - * @param mixed $id + * @param mixed $id * @return string */ public function getValue($id) @@ -110,7 +110,7 @@ class UserProvider implements ControlProviderInterface /** * - * @param mixed $id + * @param mixed $id * @return string */ public function getRessource($id) diff --git a/lib/Alchemy/Phrasea/Vocabulary/Controller.php b/lib/Alchemy/Phrasea/Vocabulary/Controller.php index d275aa32ea..98354d1ddc 100644 --- a/lib/Alchemy/Phrasea/Vocabulary/Controller.php +++ b/lib/Alchemy/Phrasea/Vocabulary/Controller.php @@ -33,8 +33,7 @@ class Controller { $classname = __NAMESPACE__ . '\\ControlProvider\\' . $type . 'Provider'; - if (!class_exists($classname)) - { + if (!class_exists($classname)) { throw new \Exception('Vocabulary type not found'); } diff --git a/lib/Alchemy/Phrasea/Vocabulary/Term.php b/lib/Alchemy/Phrasea/Vocabulary/Term.php index db90c53ac2..b49e182452 100644 --- a/lib/Alchemy/Phrasea/Vocabulary/Term.php +++ b/lib/Alchemy/Phrasea/Vocabulary/Term.php @@ -49,10 +49,10 @@ class Term /** * Construct a Term * - * @param string $value the scalar value of the Term - * @param string $context A string defining the context of the Term - * @param ControlProviderInterface $type A Vocabulary Controller - * @param mixed $id The id of the term in the Vocabulary Controller + * @param string $value the scalar value of the Term + * @param string $context A string defining the context of the Term + * @param ControlProviderInterface $type A Vocabulary Controller + * @param mixed $id The id of the term in the Vocabulary Controller * * @return \Alchemy\Phrasea\Vocabulary\ControlProvider\Term * @throws Exception diff --git a/lib/Doctrine/Entities/Basket.php b/lib/Doctrine/Entities/Basket.php index 6c83d08178..9023c929a5 100644 --- a/lib/Doctrine/Entities/Basket.php +++ b/lib/Doctrine/Entities/Basket.php @@ -425,4 +425,4 @@ class Basket return $totSize; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/BasketElement.php b/lib/Doctrine/Entities/BasketElement.php index 4f2016ae0b..c4b1f61285 100644 --- a/lib/Doctrine/Entities/BasketElement.php +++ b/lib/Doctrine/Entities/BasketElement.php @@ -234,7 +234,7 @@ class BasketElement /** * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return \Entities\ValidationData */ public function getUserValidationDatas(\User_Adapter $user) @@ -247,4 +247,4 @@ class BasketElement throw new \Exception('There is no such participant ' . $user->get_email()); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/LazaretAttribute.php b/lib/Doctrine/Entities/LazaretAttribute.php index 8025d8f151..8e0a6d1cb0 100644 --- a/lib/Doctrine/Entities/LazaretAttribute.php +++ b/lib/Doctrine/Entities/LazaretAttribute.php @@ -2,7 +2,6 @@ namespace Entities; -use Doctrine\ORM\Mapping as ORM; /** * Entities\LazaretAttribute @@ -53,12 +52,13 @@ class LazaretAttribute /** * Set name * - * @param string $name + * @param string $name * @return LazaretAttribute */ public function setName($name) { $this->name = $name; + return $this; } @@ -75,12 +75,13 @@ class LazaretAttribute /** * Set value * - * @param string $value + * @param string $value * @return LazaretAttribute */ public function setValue($value) { $this->value = $value; + return $this; } @@ -97,12 +98,13 @@ class LazaretAttribute /** * Set created * - * @param datetime $created + * @param datetime $created * @return LazaretAttribute */ public function setCreated($created) { $this->created = $created; + return $this; } @@ -119,12 +121,13 @@ class LazaretAttribute /** * Set updated * - * @param datetime $updated + * @param datetime $updated * @return LazaretAttribute */ public function setUpdated($updated) { $this->updated = $updated; + return $this; } @@ -141,12 +144,13 @@ class LazaretAttribute /** * Set lazaretFile * - * @param Entities\LazaretFile $lazaretFile + * @param Entities\LazaretFile $lazaretFile * @return LazaretAttribute */ public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null) { $this->lazaretFile = $lazaretFile; + return $this; } @@ -159,4 +163,4 @@ class LazaretAttribute { return $this->lazaretFile; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/LazaretCheck.php b/lib/Doctrine/Entities/LazaretCheck.php index 696e494dbc..d022631c6f 100644 --- a/lib/Doctrine/Entities/LazaretCheck.php +++ b/lib/Doctrine/Entities/LazaretCheck.php @@ -2,7 +2,6 @@ namespace Entities; -use Doctrine\ORM\Mapping as ORM; /** * Entities\LazaretCheck @@ -37,12 +36,13 @@ class LazaretCheck /** * Set lazaretFile * - * @param Entities\LazaretFile $lazaretFile + * @param Entities\LazaretFile $lazaretFile * @return LazaretCheck */ public function setLazaretFile(\Entities\LazaretFile $lazaretFile = null) { $this->lazaretFile = $lazaretFile; + return $this; } @@ -59,12 +59,13 @@ class LazaretCheck /** * Set checkClassname * - * @param string $checkClassname + * @param string $checkClassname * @return LazaretCheck */ public function setCheckClassname($checkClassname) { $this->checkClassname = $checkClassname; + return $this; } @@ -77,4 +78,4 @@ class LazaretCheck { return $this->checkClassname; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/LazaretFile.php b/lib/Doctrine/Entities/LazaretFile.php index ed86c1fa48..12e7ece8e3 100644 --- a/lib/Doctrine/Entities/LazaretFile.php +++ b/lib/Doctrine/Entities/LazaretFile.php @@ -2,7 +2,6 @@ namespace Entities; -use Doctrine\ORM\Mapping as ORM; /** * Entities\LazaretFile @@ -87,12 +86,13 @@ class LazaretFile /** * Set pathname * - * @param string $pathname + * @param string $pathname * @return LazaretFile */ public function setPathname($pathname) { $this->pathname = $pathname; + return $this; } @@ -109,12 +109,13 @@ class LazaretFile /** * Set base_id * - * @param integer $baseId + * @param integer $baseId * @return LazaretFile */ public function setBaseId($baseId) { $this->base_id = $baseId; + return $this; } @@ -131,12 +132,13 @@ class LazaretFile /** * Set uuid * - * @param string $uuid + * @param string $uuid * @return LazaretFile */ public function setUuid($uuid) { $this->uuid = $uuid; + return $this; } @@ -153,12 +155,13 @@ class LazaretFile /** * Set sha256 * - * @param string $sha256 + * @param string $sha256 * @return LazaretFile */ public function setSha256($sha256) { $this->sha256 = $sha256; + return $this; } @@ -175,12 +178,13 @@ class LazaretFile /** * Set created * - * @param datetime $created + * @param datetime $created * @return LazaretFile */ public function setCreated($created) { $this->created = $created; + return $this; } @@ -197,12 +201,13 @@ class LazaretFile /** * Set updated * - * @param datetime $updated + * @param datetime $updated * @return LazaretFile */ public function setUpdated($updated) { $this->updated = $updated; + return $this; } @@ -219,12 +224,13 @@ class LazaretFile /** * Add attributes * - * @param Entities\LazaretAttribute $attributes + * @param Entities\LazaretAttribute $attributes * @return LazaretFile */ public function addLazaretAttribute(\Entities\LazaretAttribute $attributes) { $this->attributes[] = $attributes; + return $this; } @@ -241,12 +247,13 @@ class LazaretFile /** * Set session * - * @param Entities\LazaretSession $session + * @param Entities\LazaretSession $session * @return LazaretFile */ public function setSession(\Entities\LazaretSession $session = null) { $this->session = $session; + return $this; } @@ -263,12 +270,13 @@ class LazaretFile /** * Set originalName * - * @param string $originalName + * @param string $originalName * @return LazaretFile */ public function setOriginalName($originalName) { $this->originalName = $originalName; + return $this; } @@ -285,12 +293,13 @@ class LazaretFile /** * Add checks * - * @param Entities\LazaretCheck $checks + * @param Entities\LazaretCheck $checks * @return LazaretFile */ public function addLazaretCheck(\Entities\LazaretCheck $checks) { $this->checks[] = $checks; + return $this; } @@ -307,12 +316,13 @@ class LazaretFile /** * Set forced * - * @param boolean $forced + * @param boolean $forced * @return LazaretFile */ public function setForced($forced) { $this->forced = $forced; + return $this; } diff --git a/lib/Doctrine/Entities/LazaretSession.php b/lib/Doctrine/Entities/LazaretSession.php index 57f03213bf..b1ca508c45 100644 --- a/lib/Doctrine/Entities/LazaretSession.php +++ b/lib/Doctrine/Entities/LazaretSession.php @@ -2,7 +2,6 @@ namespace Entities; -use Doctrine\ORM\Mapping as ORM; /** * Entities\LazaretSession @@ -52,12 +51,13 @@ class LazaretSession /** * Set usr_id * - * @param integer $usrId + * @param integer $usrId * @return LazaretSession */ public function setUsrId($usrId) { $this->usr_id = $usrId; + return $this; } @@ -70,10 +70,10 @@ class LazaretSession { $user = null; - try{ + try { $appbox = \appbox::get_instance(\bootstrap::getCore()); $user = \User_Adapter::getInstance($this->usr_id, $appbox); - }catch(\Exception $e){ + } catch (\Exception $e) { } @@ -83,12 +83,13 @@ class LazaretSession /** * Set created * - * @param datetime $created + * @param datetime $created * @return LazaretSession */ public function setCreated($created) { $this->created = $created; + return $this; } @@ -105,12 +106,13 @@ class LazaretSession /** * Set updated * - * @param datetime $updated + * @param datetime $updated * @return LazaretSession */ public function setUpdated($updated) { $this->updated = $updated; + return $this; } @@ -127,12 +129,13 @@ class LazaretSession /** * Add files * - * @param Entities\LazaretFile $files + * @param Entities\LazaretFile $files * @return LazaretSession */ public function addLazaretFiles(\Entities\LazaretFile $files) { $this->files[] = $files; + return $this; } @@ -149,12 +152,13 @@ class LazaretSession /** * Add files * - * @param Entities\LazaretFile $files + * @param Entities\LazaretFile $files * @return LazaretSession */ public function addLazaretFile(\Entities\LazaretFile $files) { $this->files[] = $files; + return $this; } } diff --git a/lib/Doctrine/Entities/StoryWZ.php b/lib/Doctrine/Entities/StoryWZ.php index addc379c5a..f74bf8a59c 100644 --- a/lib/Doctrine/Entities/StoryWZ.php +++ b/lib/Doctrine/Entities/StoryWZ.php @@ -161,4 +161,4 @@ class StoryWZ $this->setRecordId($record->get_record_id()); $this->setSbasId($record->get_sbas_id()); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/UsrList.php b/lib/Doctrine/Entities/UsrList.php index e61f5e4b56..13be7ed193 100644 --- a/lib/Doctrine/Entities/UsrList.php +++ b/lib/Doctrine/Entities/UsrList.php @@ -157,7 +157,7 @@ class UsrList /** * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return \Entities\UsrListOwner */ public function getOwner(\User_Adapter $user) @@ -194,7 +194,7 @@ class UsrList /** * Return true if one of the entry is related to the given user * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return boolean */ public function has(\User_Adapter $user) @@ -205,4 +205,4 @@ class UsrList } ); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/UsrListEntry.php b/lib/Doctrine/Entities/UsrListEntry.php index 0a6f1839a8..e4108e2bd2 100644 --- a/lib/Doctrine/Entities/UsrListEntry.php +++ b/lib/Doctrine/Entities/UsrListEntry.php @@ -142,4 +142,4 @@ class UsrListEntry { return $this->setUsrId($user->get_id()); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/UsrListOwner.php b/lib/Doctrine/Entities/UsrListOwner.php index 61826246a9..c23f138e39 100644 --- a/lib/Doctrine/Entities/UsrListOwner.php +++ b/lib/Doctrine/Entities/UsrListOwner.php @@ -174,4 +174,4 @@ class UsrListOwner { return \User_Adapter::getInstance($this->getUsrId(), \appbox::get_instance(\bootstrap::getCore())); } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/ValidationData.php b/lib/Doctrine/Entities/ValidationData.php index 48686d482d..77b19ea3d7 100644 --- a/lib/Doctrine/Entities/ValidationData.php +++ b/lib/Doctrine/Entities/ValidationData.php @@ -157,4 +157,4 @@ class ValidationData { return $this->basket_element; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/ValidationParticipant.php b/lib/Doctrine/Entities/ValidationParticipant.php index 3295e9c80c..95ce10f43a 100644 --- a/lib/Doctrine/Entities/ValidationParticipant.php +++ b/lib/Doctrine/Entities/ValidationParticipant.php @@ -150,7 +150,7 @@ class ValidationParticipant /** * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return ValidationParticipant */ public function setUser(\User_Adapter $user) @@ -271,4 +271,4 @@ class ValidationParticipant return true; } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Entities/ValidationSession.php b/lib/Doctrine/Entities/ValidationSession.php index 1647a9a8ec..69bf36ff5c 100644 --- a/lib/Doctrine/Entities/ValidationSession.php +++ b/lib/Doctrine/Entities/ValidationSession.php @@ -368,4 +368,4 @@ class ValidationSession } } } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Logger/MonologSQLLogger.php b/lib/Doctrine/Logger/MonologSQLLogger.php index 42f4f6b0af..26dadd9429 100644 --- a/lib/Doctrine/Logger/MonologSQLLogger.php +++ b/lib/Doctrine/Logger/MonologSQLLogger.php @@ -12,7 +12,6 @@ namespace Doctrine\Logger; use Monolog\Logger; -use Monolog\Handler\StreamHandler; /** * Log doctrine sql request with monolog @@ -39,7 +38,7 @@ class MonologSQLLogger implements \Doctrine\DBAL\Logging\SQLLogger * Tell which monolog user to use and which format to output * * @param \Monolog\Logger $logger A monolog logger instance - * @param type $type the output format + * @param type $type the output format */ public function __construct(\Monolog\Logger $logger, $type = self::YAML) { diff --git a/lib/Doctrine/Proxies/__CG__EntitiesBasket.php b/lib/Doctrine/Proxies/__CG__EntitiesBasket.php index a20ad5fd4c..0e30ba640a 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesBasket.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesBasket.php @@ -41,175 +41,203 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setName($name) { $this->__load(); + return parent::setName($name); } public function getName() { $this->__load(); + return parent::getName(); } public function setDescription($description) { $this->__load(); + return parent::setDescription($description); } public function getDescription() { $this->__load(); + return parent::getDescription(); } public function setUsrId($usrId) { $this->__load(); + return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); + return parent::getUsrId(); } public function setPusherId($pusherId) { $this->__load(); + return parent::setPusherId($pusherId); } public function getPusherId() { $this->__load(); + return parent::getPusherId(); } public function setArchived($archived) { $this->__load(); + return parent::setArchived($archived); } public function getArchived() { $this->__load(); + return parent::getArchived(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function addBasketElement(\Entities\BasketElement $elements) { $this->__load(); + return parent::addBasketElement($elements); } public function getElements() { $this->__load(); + return parent::getElements(); } public function getElementsByOrder($ordre) { $this->__load(); + return parent::getElementsByOrder($ordre); } public function setPusher(\User_Adapter $user) { $this->__load(); + return parent::setPusher($user); } public function getPusher() { $this->__load(); + return parent::getPusher(); } public function setOwner(\User_Adapter $user) { $this->__load(); + return parent::setOwner($user); } public function getOwner() { $this->__load(); + return parent::getOwner(); } public function setValidation(\Entities\ValidationSession $validation) { $this->__load(); + return parent::setValidation($validation); } public function getValidation() { $this->__load(); + return parent::getValidation(); } public function setIsRead($isRead) { $this->__load(); + return parent::setIsRead($isRead); } public function getIsRead() { $this->__load(); + return parent::getIsRead(); } public function hasRecord(\record_adapter $record) { $this->__load(); + return parent::hasRecord($record); } public function getSize() { $this->__load(); + return parent::getSize(); } @@ -233,6 +261,6 @@ class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php b/lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php index 275bc60924..c052a29116 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesBasketElement.php @@ -41,121 +41,140 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setRecordId($recordId) { $this->__load(); + return parent::setRecordId($recordId); } public function getRecordId() { $this->__load(); + return parent::getRecordId(); } public function setSbasId($sbasId) { $this->__load(); + return parent::setSbasId($sbasId); } public function getSbasId() { $this->__load(); + return parent::getSbasId(); } public function setOrd($ord) { $this->__load(); + return parent::setOrd($ord); } public function getOrd() { $this->__load(); + return parent::getOrd(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function setBasket(\Entities\Basket $basket) { $this->__load(); + return parent::setBasket($basket); } public function getBasket() { $this->__load(); + return parent::getBasket(); } public function getRecord() { $this->__load(); + return parent::getRecord(); } public function setRecord(\record_adapter $record) { $this->__load(); + return parent::setRecord($record); } public function setLastInBasket() { $this->__load(); + return parent::setLastInBasket(); } public function addValidationData(\Entities\ValidationData $validationDatas) { $this->__load(); + return parent::addValidationData($validationDatas); } public function getValidationDatas() { $this->__load(); + return parent::getValidationDatas(); } public function getUserValidationDatas(\User_Adapter $user) { $this->__load(); + return parent::getUserValidationDatas($user); } @@ -179,6 +198,6 @@ class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Pro } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php b/lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php index 858e18313f..fad1b9dc5d 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesLazaretAttribute.php @@ -41,73 +41,84 @@ class LazaretAttribute extends \Entities\LazaretAttribute implements \Doctrine\O return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setName($name) { $this->__load(); + return parent::setName($name); } public function getName() { $this->__load(); + return parent::getName(); } public function setValue($value) { $this->__load(); + return parent::setValue($value); } public function getValue() { $this->__load(); + return parent::getValue(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function setLazaretFile(\Entities\LazaretFile $lazaretFile = NULL) { $this->__load(); + return parent::setLazaretFile($lazaretFile); } public function getLazaretFile() { $this->__load(); + return parent::getLazaretFile(); } @@ -131,6 +142,6 @@ class LazaretAttribute extends \Entities\LazaretAttribute implements \Doctrine\O } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php b/lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php index fa7e104d57..ac60e6cd8b 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesLazaretCheck.php @@ -41,37 +41,42 @@ class LazaretCheck extends \Entities\LazaretCheck implements \Doctrine\ORM\Proxy return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setCheck($check) { $this->__load(); + return parent::setCheck($check); } public function getCheck() { $this->__load(); + return parent::getCheck(); } public function setLazaretFile(\Entities\LazaretFile $lazaretFile = NULL) { $this->__load(); + return parent::setLazaretFile($lazaretFile); } public function getLazaretFile() { $this->__load(); + return parent::getLazaretFile(); } @@ -95,6 +100,6 @@ class LazaretCheck extends \Entities\LazaretCheck implements \Doctrine\ORM\Proxy } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php b/lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php index c024c767d0..3fdeba15c8 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesLazaretFile.php @@ -41,145 +41,168 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setPathname($pathname) { $this->__load(); + return parent::setPathname($pathname); } public function getPathname() { $this->__load(); + return parent::getPathname(); } public function setBaseId($baseId) { $this->__load(); + return parent::setBaseId($baseId); } public function getBaseId() { $this->__load(); + return parent::getBaseId(); } public function setUuid($uuid) { $this->__load(); + return parent::setUuid($uuid); } public function getUuid() { $this->__load(); + return parent::getUuid(); } public function setSha256($sha256) { $this->__load(); + return parent::setSha256($sha256); } public function getSha256() { $this->__load(); + return parent::getSha256(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function addLazaretAttribute(\Entities\LazaretAttribute $attributes) { $this->__load(); + return parent::addLazaretAttribute($attributes); } public function getAttributes() { $this->__load(); + return parent::getAttributes(); } public function setSession(\Entities\LazaretSession $session = NULL) { $this->__load(); + return parent::setSession($session); } public function getSession() { $this->__load(); + return parent::getSession(); } public function setOriginalName($originalName) { $this->__load(); + return parent::setOriginalName($originalName); } public function getOriginalName() { $this->__load(); + return parent::getOriginalName(); } public function addLazaretCheck(\Entities\LazaretCheck $checks) { $this->__load(); + return parent::addLazaretCheck($checks); } public function getChecks() { $this->__load(); + return parent::getChecks(); } public function setForced($forced) { $this->__load(); + return parent::setForced($forced); } public function getForced() { $this->__load(); + return parent::getForced(); } @@ -203,6 +226,6 @@ class LazaretFile extends \Entities\LazaretFile implements \Doctrine\ORM\Proxy\P } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php b/lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php index eacb40db77..e387e7e3da 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesLazaretSession.php @@ -41,67 +41,77 @@ class LazaretSession extends \Entities\LazaretSession implements \Doctrine\ORM\P return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setUsrId($usrId) { $this->__load(); + return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); + return parent::getUsrId(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function addLazaretFiles(\Entities\LazaretFile $files) { $this->__load(); + return parent::addLazaretFiles($files); } public function getFiles() { $this->__load(); + return parent::getFiles(); } public function addLazaretFile(\Entities\LazaretFile $files) { $this->__load(); + return parent::addLazaretFile($files); } @@ -125,6 +135,6 @@ class LazaretSession extends \Entities\LazaretSession implements \Doctrine\ORM\P } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php b/lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php index ba73c42ca2..9df10fc776 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesStoryWZ.php @@ -41,85 +41,98 @@ class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setSbasId($sbasId) { $this->__load(); + return parent::setSbasId($sbasId); } public function getSbasId() { $this->__load(); + return parent::getSbasId(); } public function setRecordId($recordId) { $this->__load(); + return parent::setRecordId($recordId); } public function getRecordId() { $this->__load(); + return parent::getRecordId(); } public function setUsrId($usrId) { $this->__load(); + return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); + return parent::getUsrId(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUser(\User_Adapter $user) { $this->__load(); + return parent::setUser($user); } public function getUser() { $this->__load(); + return parent::getUser(); } public function getRecord() { $this->__load(); + return parent::getRecord(); } public function setRecord(\record_adapter $record) { $this->__load(); + return parent::setRecord($record); } @@ -143,6 +156,6 @@ class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUsrList.php b/lib/Doctrine/Proxies/__CG__EntitiesUsrList.php index d54062e0b8..d2cfeed061 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUsrList.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesUsrList.php @@ -41,91 +41,105 @@ class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setName($name) { $this->__load(); + return parent::setName($name); } public function getName() { $this->__load(); + return parent::getName(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function addUsrListOwner(\Entities\UsrListOwner $owners) { $this->__load(); + return parent::addUsrListOwner($owners); } public function getOwners() { $this->__load(); + return parent::getOwners(); } public function hasAccess(\User_Adapter $user) { $this->__load(); + return parent::hasAccess($user); } public function getOwner(\User_Adapter $user) { $this->__load(); + return parent::getOwner($user); } public function addUsrListEntry(\Entities\UsrListEntry $entry) { $this->__load(); + return parent::addUsrListEntry($entry); } public function getEntries() { $this->__load(); + return parent::getEntries(); } public function has(\User_Adapter $user) { $this->__load(); + return parent::has($user); } @@ -149,6 +163,6 @@ class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php b/lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php index 779318f62d..a48f27ee31 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesUsrListEntry.php @@ -41,73 +41,84 @@ class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setUsrId($usrId) { $this->__load(); + return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); + return parent::getUsrId(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function setList(\Entities\UsrList $list) { $this->__load(); + return parent::setList($list); } public function getList() { $this->__load(); + return parent::getList(); } public function getUser() { $this->__load(); + return parent::getUser(); } public function setUser(\User_Adapter $user) { $this->__load(); + return parent::setUser($user); } @@ -131,6 +142,6 @@ class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php b/lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php index a3ca49d4e9..526ba94b6f 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesUsrListOwner.php @@ -41,85 +41,98 @@ class UsrListOwner extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setUsrId($usrId) { $this->__load(); + return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); + return parent::getUsrId(); } public function setRole($role) { $this->__load(); + return parent::setRole($role); } public function getRole() { $this->__load(); + return parent::getRole(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function setList(\Entities\UsrList $list) { $this->__load(); + return parent::setList($list); } public function getList() { $this->__load(); + return parent::getList(); } public function setUser(\User_Adapter $user) { $this->__load(); + return parent::setUser($user); } public function getUser() { $this->__load(); + return parent::getUser(); } @@ -143,6 +156,6 @@ class UsrListOwner extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesValidationData.php b/lib/Doctrine/Proxies/__CG__EntitiesValidationData.php index cc6f315171..4d5e6ce074 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesValidationData.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesValidationData.php @@ -41,73 +41,84 @@ class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\P return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setAgreement($agreement) { $this->__load(); + return parent::setAgreement($agreement); } public function getAgreement() { $this->__load(); + return parent::getAgreement(); } public function setNote($note) { $this->__load(); + return parent::setNote($note); } public function getNote() { $this->__load(); + return parent::getNote(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function setParticipant(\Entities\ValidationParticipant $participant) { $this->__load(); + return parent::setParticipant($participant); } public function getParticipant() { $this->__load(); + return parent::getParticipant(); } public function setBasketElement(\Entities\BasketElement $basketElement) { $this->__load(); + return parent::setBasketElement($basketElement); } public function getBasketElement() { $this->__load(); + return parent::getBasketElement(); } @@ -131,6 +142,6 @@ class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\P } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php b/lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php index 71c354900a..48619a2161 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesValidationParticipant.php @@ -41,127 +41,147 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \ return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setUsrId($usrId) { $this->__load(); + return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); + return parent::getUsrId(); } public function addValidationData(\Entities\ValidationData $datas) { $this->__load(); + return parent::addValidationData($datas); } public function setSession(\Entities\ValidationSession $session) { $this->__load(); + return parent::setSession($session); } public function getSession() { $this->__load(); + return parent::getSession(); } public function setIsAware($isAware) { $this->__load(); + return parent::setIsAware($isAware); } public function getIsAware() { $this->__load(); + return parent::getIsAware(); } public function setUser(\User_Adapter $user) { $this->__load(); + return parent::setUser($user); } public function getUser() { $this->__load(); + return parent::getUser(); } public function setReminded($reminded) { $this->__load(); + return parent::setReminded($reminded); } public function getReminded() { $this->__load(); + return parent::getReminded(); } public function getDatas() { $this->__load(); + return parent::getDatas(); } public function setIsConfirmed($isConfirmed) { $this->__load(); + return parent::setIsConfirmed($isConfirmed); } public function getIsConfirmed() { $this->__load(); + return parent::getIsConfirmed(); } public function setCanAgree($canAgree) { $this->__load(); + return parent::setCanAgree($canAgree); } public function getCanAgree() { $this->__load(); + return parent::getCanAgree(); } public function setCanSeeOthers($canSeeOthers) { $this->__load(); + return parent::setCanSeeOthers($canSeeOthers); } public function getCanSeeOthers() { $this->__load(); + return parent::getCanSeeOthers(); } public function isReleasable() { $this->__load(); + return parent::isReleasable(); } @@ -185,6 +205,6 @@ class ValidationParticipant extends \Entities\ValidationParticipant implements \ } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php b/lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php index cfb393d42e..3d647e12c8 100644 --- a/lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php +++ b/lib/Doctrine/Proxies/__CG__EntitiesValidationSession.php @@ -41,169 +41,196 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine return $this->__isInitialized__; } - + public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); + return parent::getId(); } public function setName($name) { $this->__load(); + return parent::setName($name); } public function getName() { $this->__load(); + return parent::getName(); } public function setDescription($description) { $this->__load(); + return parent::setDescription($description); } public function getDescription() { $this->__load(); + return parent::getDescription(); } public function setArchived($archived) { $this->__load(); + return parent::setArchived($archived); } public function getArchived() { $this->__load(); + return parent::getArchived(); } public function setCreated($created) { $this->__load(); + return parent::setCreated($created); } public function getCreated() { $this->__load(); + return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); + return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); + return parent::getUpdated(); } public function setExpires($expires) { $this->__load(); + return parent::setExpires($expires); } public function getExpires() { $this->__load(); + return parent::getExpires(); } public function setReminded($reminded) { $this->__load(); + return parent::setReminded($reminded); } public function getReminded() { $this->__load(); + return parent::getReminded(); } public function setBasket(\Entities\Basket $basket) { $this->__load(); + return parent::setBasket($basket); } public function getBasket() { $this->__load(); + return parent::getBasket(); } public function addValidationParticipant(\Entities\ValidationParticipant $participants) { $this->__load(); + return parent::addValidationParticipant($participants); } public function getParticipants() { $this->__load(); + return parent::getParticipants(); } public function getParticipant(\User_Adapter $user) { $this->__load(); + return parent::getParticipant($user); } public function setInitiatorId($initiatorId) { $this->__load(); + return parent::setInitiatorId($initiatorId); } public function getInitiatorId() { $this->__load(); + return parent::getInitiatorId(); } public function isInitiator(\User_Adapter $user) { $this->__load(); + return parent::isInitiator($user); } public function setInitiator(\User_Adapter $user) { $this->__load(); + return parent::setInitiator($user); } public function getInitiator() { $this->__load(); + return parent::getInitiator(); } public function isFinished() { $this->__load(); + return parent::isFinished(); } public function getValidationString(\User_Adapter $user) { $this->__load(); + return parent::getValidationString($user); } @@ -227,6 +254,6 @@ class ValidationSession extends \Entities\ValidationSession implements \Doctrine } unset($this->_entityPersister, $this->_identifier); } - + } -} \ No newline at end of file +} diff --git a/lib/Doctrine/Repositories/BasketElementRepository.php b/lib/Doctrine/Repositories/BasketElementRepository.php index 3efd0fa296..6c1aaee9f4 100644 --- a/lib/Doctrine/Repositories/BasketElementRepository.php +++ b/lib/Doctrine/Repositories/BasketElementRepository.php @@ -3,7 +3,6 @@ namespace Repositories; use Doctrine\ORM\EntityRepository; -use Doctrine\ORM\UnitOfWork; use Entities; /** @@ -68,8 +67,8 @@ class BasketElementRepository extends EntityRepository /** * - * @param \record_adapter $record - * @param \User_Adapter $user + * @param \record_adapter $record + * @param \User_Adapter $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findReceivedElementsByRecord(\record_adapter $record, \User_Adapter $user) diff --git a/lib/Doctrine/Repositories/BasketRepository.php b/lib/Doctrine/Repositories/BasketRepository.php index 129a360c11..919505598f 100644 --- a/lib/Doctrine/Repositories/BasketRepository.php +++ b/lib/Doctrine/Repositories/BasketRepository.php @@ -29,7 +29,7 @@ class BasketRepository extends EntityRepository /** * Returns all basket for a given user that are not marked as archived * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findActiveByUser(\User_Adapter $user, $sort = null) @@ -55,7 +55,7 @@ class BasketRepository extends EntityRepository /** * Returns all unread basket for a given user that are not marked as archived * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findUnreadActiveByUser(\User_Adapter $user) @@ -90,7 +90,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_Adapter $user + * @param \User_Adapter $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findActiveValidationByUser(\User_Adapter $user, $sort = null) @@ -121,8 +121,8 @@ class BasketRepository extends EntityRepository * * @throws \Exception_NotFound * @throws \Exception_Forbidden - * @param type $basket_id - * @param \User_Adapter $user + * @param type $basket_id + * @param \User_Adapter $user * @return \Entities\Basket */ public function findUserBasket($basket_id, \User_Adapter $user, $requireOwner) @@ -271,8 +271,8 @@ class BasketRepository extends EntityRepository /** * Return all actives validation where current user is involved and user basket * - * @param \User_Adapter $user - * @param type $sort + * @param \User_Adapter $user + * @param type $sort * @return Array */ public function findActiveValidationAndBasketByUser(\User_Adapter $user, $sort = null) diff --git a/lib/Doctrine/Repositories/UsrListEntryRepository.php b/lib/Doctrine/Repositories/UsrListEntryRepository.php index 2f30b2a09f..668e71e1e9 100644 --- a/lib/Doctrine/Repositories/UsrListEntryRepository.php +++ b/lib/Doctrine/Repositories/UsrListEntryRepository.php @@ -17,7 +17,7 @@ class UsrListEntryRepository extends EntityRepository * Get all lists entries matching a given User * * @param \User_Adapter $user - * @param type $like + * @param type $like */ public function findUserList(\User_Adapter $user) { diff --git a/lib/Doctrine/Repositories/UsrListOwnerRepository.php b/lib/Doctrine/Repositories/UsrListOwnerRepository.php index 03356280ca..d51346bbf7 100644 --- a/lib/Doctrine/Repositories/UsrListOwnerRepository.php +++ b/lib/Doctrine/Repositories/UsrListOwnerRepository.php @@ -16,8 +16,8 @@ class UsrListOwnerRepository extends EntityRepository /** * * - * @param \Entities\UsrList $list - * @param type $owner_id + * @param \Entities\UsrList $list + * @param type $owner_id * @return \Entities\UsrList */ public function findByListAndOwner(\Entities\UsrList $list, $owner_id) @@ -39,8 +39,8 @@ class UsrListOwnerRepository extends EntityRepository /** * * - * @param \Entities\UsrList $list - * @param type $usr_id + * @param \Entities\UsrList $list + * @param type $usr_id * @return \Entities\UsrList */ public function findByListAndUsrId(\Entities\UsrList $list, $usr_id) diff --git a/lib/Doctrine/Repositories/UsrListRepository.php b/lib/Doctrine/Repositories/UsrListRepository.php index e4630859e1..8941ee85cf 100644 --- a/lib/Doctrine/Repositories/UsrListRepository.php +++ b/lib/Doctrine/Repositories/UsrListRepository.php @@ -16,7 +16,7 @@ class UsrListRepository extends EntityRepository /** * Get all lists readable for a given User * - * @param \User_Adapter $user + * @param \User_Adapter $user * @return \Doctrine\Common\Collections\ArrayCollection */ public function findUserLists(\User_Adapter $user) @@ -38,8 +38,8 @@ class UsrListRepository extends EntityRepository /** * - * @param \User_Adapter $user - * @param type $list_id + * @param \User_Adapter $user + * @param type $list_id * @return \Entities\UsrList */ public function findUserListByUserAndId(\User_Adapter $user, $list_id) @@ -61,8 +61,8 @@ class UsrListRepository extends EntityRepository /** * Search for a UsrList like '' with a given value, for a user * - * @param \User_Adapter $user - * @param type $name + * @param \User_Adapter $user + * @param type $name * @return \Doctrine\Common\Collections\ArrayCollection */ public function findUserListLike(\User_Adapter $user, $name) diff --git a/lib/classes/ACL.class.php b/lib/classes/ACL.class.php index bcee20e46a..e69de29bb2 100644 --- a/lib/classes/ACL.class.php +++ b/lib/classes/ACL.class.php @@ -1,1504 +0,0 @@ - false, - 'manageusers' => false, - 'order' => false, - 'report' => false, - 'push' => false, - 'addrecord' => false, - 'modifyrecord' => false, - 'changestatus' => false, - 'doctools' => false, - 'deleterecord' => false, - 'addtoalbum' => false, - 'coll_modify_struct' => false, - 'coll_manage' => false, - 'order_master' => false, - 'bas_modif_th' => false, - 'bas_modify_struct' => false, - 'bas_manage' => false, - 'bas_chupub' => false, - 'candwnldpreview' => true, - 'candwnldhd' => true - ); - - /** - * - * @var appbox - */ - protected $appbox; - - const CACHE_RIGHTS_BAS = 'rights_bas'; - const CACHE_LIMITS_BAS = 'limits_bas'; - const CACHE_RIGHTS_SBAS = 'rights_sbas'; - const CACHE_RIGHTS_RECORDS = 'rights_records'; - const CACHE_GLOBAL_RIGHTS = 'global_rights'; - const GRANT_ACTION_PUSH = 'push'; - const GRANT_ACTION_VALIDATE = 'validate'; - - /** - * Constructor - * - * @param User_Interface $user - * @return ACL - */ - public function __construct(User_Interface $user, appbox &$appbox) - { - $this->user = $user; - $this->appbox = $appbox; - - return $this; - } - - /** - * Check if a hd grant has been received for a record - * - * @param record_Interface $record - * @return boolean - */ - public function has_hd_grant(record_Interface $record) - { - - $this->load_hd_grant(); - - $key = $record->get_serialize_key(); - - if (array_key_exists($key, $this->_rights_records_document)) { - return true; - } - - return false; - } - - public function grant_hd_on(record_adapter $record, User_Adapter $pusher, $action) - { - $sql = 'REPLACE INTO records_rights - (id, usr_id, sbas_id, record_id, document, `case`, pusher_usr_id) - VALUES - (null, :usr_id, :sbas_id, :record_id, 1, :case, :pusher)'; - - $params = array( - ':usr_id' => $this->user->get_id() - , ':sbas_id' => $record->get_sbas_id() - , ':record_id' => $record->get_record_id() - , ':case' => $action - , ':pusher' => $pusher->get_id() - ); - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); - - $this->delete_data_from_cache(self::CACHE_RIGHTS_RECORDS); - - return $this; - } - - public function grant_preview_on(record_adapter $record, User_Adapter $pusher, $action) - { - $sql = 'REPLACE INTO records_rights - (id, usr_id, sbas_id, record_id, preview, `case`, pusher_usr_id) - VALUES - (null, :usr_id, :sbas_id, :record_id, 1, :case, :pusher)'; - - $params = array( - ':usr_id' => $this->user->get_id() - , ':sbas_id' => $record->get_sbas_id() - , ':record_id' => $record->get_record_id() - , ':case' => $action - , ':pusher' => $pusher->get_id() - ); - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); - - $this->delete_data_from_cache(self::CACHE_RIGHTS_RECORDS); - - return $this; - } - - /** - * Check if a hd grant has been received for a record - * - * @param record_Interface $record - * @return boolean - */ - public function has_preview_grant(record_Interface $record) - { - - $this->load_hd_grant(); - - $key = $record->get_serialize_key(); - - if (array_key_exists($key, $this->_rights_records_preview)) { - return true; - } - - return false; - } - - public function has_access_to_subdef(record_Interface $record, $subdef_name) - { - try { - $subdef_class = $record->get_databox()->get_subdef_structure() - ->get_subdef($record->get_type(), $subdef_name) - ->get_class(); - } catch (Exception $e) { - return false; - } - $granted = false; - - if ($subdef_class == databox_subdef::CLASS_THUMBNAIL) { - $granted = true; - } elseif ($subdef_class == databox_subdef::CLASS_PREVIEW && $this->has_right_on_base($record->get_base_id(), 'candwnldpreview')) { - $granted = true; - } elseif ($subdef_class == databox_subdef::CLASS_PREVIEW && $this->has_preview_grant($record)) { - $granted = true; - } elseif ($subdef_class == databox_subdef::CLASS_DOCUMENT && $this->has_right_on_base($record->get_base_id(), 'candwnldhd')) { - $granted = true; - } elseif ($subdef_class == databox_subdef::CLASS_DOCUMENT && $user->ACL()->has_hd_grant($record)) { - $granted = true; - } - - return $granted; - } - - /** - * Apply a template on user - * - * @param User_Interface $template_user - * @param array $base_ids - * @return ACL - */ - public function apply_model(User_Interface $template_user, Array $base_ids) - { - if (count($base_ids) == 0) { - return $this; - } - - $sbas_ids = array(); - - foreach ($base_ids as $base_id) { - $sbas_ids[] = phrasea::sbasFromBas($base_id); - } - - $sbas_ids = array_unique($sbas_ids); - - $sbas_rights = array('bas_manage', 'bas_modify_struct', 'bas_modif_th', 'bas_chupub'); - - $sbas_to_acces = array(); - $rights_to_give = array(); - - foreach ($template_user->ACL()->get_granted_sbas() as $databox) { - $sbas_id = $databox->get_sbas_id(); - - if ( ! in_array($sbas_id, $sbas_ids)) - continue; - - - if ( ! $this->has_access_to_sbas($sbas_id)) { - $sbas_to_acces[] = $sbas_id; - } - - foreach ($sbas_rights as $right) { - if ($template_user->ACL()->has_right_on_sbas($sbas_id, $right)) { - $rights_to_give[$sbas_id][$right] = '1'; - } - } - } - - $this->give_access_to_sbas($sbas_to_acces); - - foreach ($rights_to_give as $sbas_id => $rights) { - $this->update_rights_to_sbas($sbas_id, $rights); - } - - $bas_rights = array('canputinalbum', 'candwnldhd' - , 'candwnldpreview', 'cancmd' - , 'canadmin', 'actif', 'canreport', 'canpush' - , 'canaddrecord', 'canmodifrecord', 'candeleterecord' - , 'chgstatus', 'imgtools' - , 'manage', 'modify_struct' - , 'nowatermark', 'order_master' - ); - - $bas_to_acces = $masks_to_give = $rights_to_give = array(); - - /** - * map masks (and+xor) of template to masks to apply to user on base - * (and_and, and_or, xor_and, xor_or) - */ - $sbmap = array( - '00' => array('aa' => '1', 'ao' => '0', 'xa' => '1', 'xo' => '0'), - '01' => array('aa' => '1', 'ao' => '0', 'xa' => '1', 'xo' => '0'), - '10' => array('aa' => '1', 'ao' => '1', 'xa' => '0', 'xo' => '0'), - '11' => array('aa' => '1', 'ao' => '1', 'xa' => '1', 'xo' => '1') - ); - - foreach ($template_user->ACL()->get_granted_base() as $collection) { - $base_id = $collection->get_base_id(); - - if ( ! in_array($base_id, $base_ids)) - continue; - - if ( ! $this->has_access_to_base($base_id)) { - $bas_to_acces[] = $base_id; - } - - foreach ($bas_rights as $right) { - if ($template_user->ACL()->has_right_on_base($base_id, $right)) { - $rights_to_give[$base_id][$right] = '1'; - } - } - - $mask_and = $template_user->ACL()->get_mask_and($base_id); - $mask_xor = $template_user->ACL()->get_mask_xor($base_id); - - $mask_and = ctype_digit($mask_and) ? $mask_and : '0'; - $mask_xor = ctype_digit($mask_xor) ? $mask_xor : '0'; - - - /** - * apply sb is substractive - */ - $mand = substr( - str_repeat('0', 64) - . databox_status::dec2bin($mask_and) - , -64 - ); - $mxor = substr( - str_repeat('0', 64) - . databox_status::dec2bin($mask_xor) - , -64 - ); - $m = array('aa' => '', 'ao' => '', 'xa' => '', 'xo' => ''); - for ($i = 0; $i < 64; $i ++ ) { - $ax = $mand[$i] . $mxor[$i]; - - foreach ($m as $k => $v) { - $m[$k] .= $sbmap[$ax][$k]; - } - } - - $masks_to_give[$base_id] = array( - 'aa' => $m['aa'] - , 'ao' => $m['ao'] - , 'xa' => $m['xa'] - , 'xo' => $m['xo'] - ); - } - - $this->give_access_to_base($bas_to_acces); - - foreach ($masks_to_give as $base_id => $mask) { - $this->set_masks_on_base($base_id, $mask['aa'], $mask['ao'], $mask['xa'], $mask['xo']); - } - - foreach ($rights_to_give as $base_id => $rights) { - $this->update_rights_to_base($base_id, $rights); - } - - $this->user->set_last_template($template_user); - - return $this; - } - - /** - * - * @return boolean - */ - public function is_phantom() - { - return count($this->get_granted_base()) === 0; - } - - /** - * - * @param int $base_id - * @param string $right - * @return boolean - */ - public function has_right_on_base($base_id, $right) - { - $this->load_rights_bas(); - - if ( ! $this->has_access_to_base($base_id)) { - return false; - } - - if ($this->is_limited($base_id)) { - return false; - } - - if ( ! isset($this->_rights_bas[$base_id][$right])) - throw new Exception('right ' . $right . ' does not exists'); - - return ($this->_rights_bas[$base_id][$right] === true); - } - - /** - * - * @param $option - * @return - */ - public function get_cache_key($option = null) - { - return '_ACL_' . $this->user->get_id() . ($option ? '_' . $option : ''); - } - - /** - * - * @param $option - * @return - */ - public function delete_data_from_cache($option = null) - { - switch ($option) { - case self::CACHE_GLOBAL_RIGHTS: - $this->_global_rights = null; - break; - case self::CACHE_RIGHTS_BAS: - case self::CACHE_LIMITS_BAS: - $this->_rights_bas = null; - $this->_limited = null; - break; - case self::CACHE_RIGHTS_RECORDS: - $this->_rights_records_document = null; - $this->_rights_records_preview = null; - break; - case self::CACHE_RIGHTS_SBAS: - $this->_rights_sbas = null; - break; - default: - break; - } - - return $this->appbox->delete_data_from_cache($this->get_cache_key($option)); - } - - /** - * - * @param $option - * @return - */ - public function get_data_from_cache($option = null) - { - return $this->appbox->get_data_from_cache($this->get_cache_key($option)); - } - - /** - * - * @param $value - * @param $option - * @param $duration - * @return - */ - public function set_data_to_cache($value, $option = null, $duration = 0) - { - return $this->appbox->set_data_to_cache($value, $this->get_cache_key($option), $duration); - } - - /** - * Return true if user is restricted in download on the collection - * - * @param int $base_id - * @return boolean - */ - public function is_restricted_download($base_id) - { - $this->load_rights_bas(); - - if ( ! $this->has_access_to_base($base_id)) { - return false; - } - - return $this->_rights_bas[$base_id]['restrict_dwnld']; - } - - /** - * Return the number of remaining downloads on the collection - * - * @param int $base_id - * @return int - */ - public function remaining_download($base_id) - { - $this->load_rights_bas(); - - if ( ! $this->has_access_to_base($base_id)) { - return false; - } - - return (int) $this->_rights_bas[$base_id]['remain_dwnld']; - } - - /** - * Remove n download from the remainings - * - * @param int $base_id - * @param int $n - * @return ACL - */ - public function remove_remaining($base_id, $n = 1) - { - $this->load_rights_bas(); - - if ( ! $this->has_access_to_base($base_id)) { - return false; - } - - $this->_rights_bas[$base_id]['remain_dwnld'] = - $this->_rights_bas[$base_id]['remain_dwnld'] - (int) $n; - $v = $this->_rights_bas[$base_id]['remain_dwnld']; - $this->_rights_bas[$base_id]['remain_dwnld'] = - $this->_rights_bas[$base_id]['remain_dwnld'] < 0 ? 0 : $v; - - return $this; - } - - /** - * Check if the user has the right, at least on one collection - * - * @param string $right - * @return boolean - */ - public function has_right($right) - { - $this->load_global_rights(); - - if ( ! isset($this->_global_rights[$right])) - throw new Exception('This right does not exists'); - - return $this->_global_rights[$right]; - } - - /** - * Check if the user has the required right on a database - * - * @param $sbas_id - * @param $right - * @return - */ - public function has_right_on_sbas($sbas_id, $right) - { - $this->load_rights_sbas(); - - if ( ! isset($this->_rights_sbas[$sbas_id])) { - return false; - } - - if ( ! isset($this->_rights_sbas[$sbas_id][$right])) - throw new Exception('This right does not exists'); - - if ($this->_rights_sbas[$sbas_id][$right] === true) { - return true; - } - - return false; - } - - /** - * Retrieve mask AND for user on specified base_id - * - * @param int $base_id - * @return string - */ - public function get_mask_and($base_id) - { - $this->load_rights_bas(); - if ( ! $this->has_access_to_base($base_id)) { - return false; - } - - return $this->_rights_bas[$base_id]['mask_and']; - } - - /** - * Retrieve mask XOR for user on specified base_id - * - * @param int $base_id - * @return string - */ - public function get_mask_xor($base_id) - { - $this->load_rights_bas(); - if ( ! $this->has_access_to_base($base_id)) { - return false; - } - - return $this->_rights_bas[$base_id]['mask_xor']; - } - - /** - * Return true if access to base_id is granted - * - * @param int $base_id - * @return boolean - */ - public function has_access_to_base($base_id) - { - $this->load_rights_bas(); - - return (isset($this->_rights_bas[$base_id]) && - $this->_rights_bas[$base_id]['actif'] === true); - } - - /** - * Return true if access to sbas_id is granted - * - * @param int $sbas_id - * @return boolean - */ - public function has_access_to_sbas($sbas_id) - { - $this->load_rights_sbas(); - - return (isset($this->_rights_sbas[$sbas_id])); - } - - /** - * Return an array of base_id which are granted, with - * optionnal filter by rights - * - * @param Array $rights - * @return Array - */ - public function get_granted_base(Array $rights = array(), array $sbas_ids = null) - { - $this->load_rights_bas(); - $ret = array(); - - foreach ($this->appbox->get_databoxes() as $databox) { - if ($sbas_ids && ! in_array($databox->get_sbas_id(), $sbas_ids)) { - continue; - } - - foreach ($databox->get_collections() as $collection) { - $continue = false; - - if ( ! array_key_exists($collection->get_base_id(), $this->_rights_bas)) - continue; - - $base_id = $collection->get_base_id(); - $datas = $this->_rights_bas[$base_id]; - - foreach ($rights as $right) { - if ( ! $this->has_right_on_base($base_id, $right)) { - $continue = true; - break; - } - } - if ($continue || $this->is_limited($base_id)) - continue; - - try { - $ret[$base_id] = collection::get_from_base_id($base_id); - } catch (Exception $e) { - - } - } - } - - return $ret; - } - - /** - * Return an array of sbas_id which are granted, with - * optionnal filter by rights - * - * @param Array $rights - * @return Array - */ - public function get_granted_sbas($rights = array()) - { - if (is_string($rights)) - $rights = array($rights); - - assert(is_array($rights)); - - $this->load_rights_sbas(); - - $ret = array(); - - foreach ($this->_rights_sbas as $sbas_id => $datas) { - $continue = false; - - foreach ($rights as $right) { - if ( ! $this->has_right_on_sbas($sbas_id, $right)) { - $continue = true; - break; - } - } - if ($continue) - continue; - - try { - $ret[$sbas_id] = databox::get_instance((int) $sbas_id); - } catch (Exception $e) { - - } - } - - return $ret; - } - - /** - * Load if needed the elements which have a HD grant - * - * @return Array - */ - protected function load_hd_grant() - { - - if ($this->_rights_records_preview) { - return $this; - } - - try { - $tmp_rights = $this->get_data_from_cache(self::CACHE_RIGHTS_RECORDS); - $this->_rights_records_preview = $tmp_rights['preview']; - $this->_rights_records_document = $tmp_rights['document']; - - return $this; - } catch (Exception $e) { - - } - $sql = 'SELECT sbas_id, record_id, preview, document - FROM records_rights WHERE usr_id = :usr_id'; - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->user->get_id())); - $rs = $stmt->fetchAll(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - unset($stmt); - - $this->_rights_records_preview = array(); - $this->_rights_records_document = array(); - - foreach ($rs as $row) { - $currentid = $row["sbas_id"] . "_" . $row["record_id"]; - if ($row['document'] == '1') - $this->_rights_records_document[$currentid] = $currentid; - $this->_rights_records_preview[$currentid] = $currentid; - } - - $datas = array( - 'preview' => $this->_rights_records_preview - , 'document' => $this->_rights_records_document - ); - - $this->set_data_to_cache($datas, self::CACHE_RIGHTS_RECORDS); - - return $this; - } - - /** - * Loads rights of specified user for all sbas - * - * @return ACL - */ - protected function load_rights_sbas() - { - - if ($this->_rights_sbas && $this->_global_rights) { - return $this; - } - - try { - $this->_rights_sbas = $this->get_data_from_cache(self::CACHE_RIGHTS_SBAS); - $this->_global_rights = $this->get_data_from_cache(self::CACHE_GLOBAL_RIGHTS); - - return $this; - } catch (Exception $e) { - - } - - $sql = 'SELECT sbasusr.* FROM sbasusr, sbas - WHERE usr_id= :usr_id - AND sbas.sbas_id = sbasusr.sbas_id'; - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->user->get_id())); - $rs = $stmt->fetchAll(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - - $this->_rights_sbas = array(); - - $this->_global_rights['bas_modif_th'] = false; - $this->_global_rights['bas_modify_struct'] = false; - $this->_global_rights['bas_manage'] = false; - $this->_global_rights['bas_chupub'] = false; - - foreach ($rs as $row) { - - if ($row['bas_modif_th'] == '1') - $this->_global_rights['bas_modif_th'] = true; - if ($row['bas_modify_struct'] == '1') - $this->_global_rights['bas_modify_struct'] = true; - if ($row['bas_manage'] == '1') - $this->_global_rights['bas_manage'] = true; - if ($row['bas_chupub'] == '1') - $this->_global_rights['bas_chupub'] = true; - - $this->_rights_sbas[$row['sbas_id']]['bas_modify_struct'] = ($row['bas_modify_struct'] == '1'); - $this->_rights_sbas[$row['sbas_id']]['bas_manage'] = ($row['bas_manage'] == '1'); - $this->_rights_sbas[$row['sbas_id']]['bas_chupub'] = ($row['bas_chupub'] == '1'); - $this->_rights_sbas[$row['sbas_id']]['bas_modif_th'] = ($row['bas_modif_th'] == '1'); - } - $this->set_data_to_cache($this->_rights_sbas, self::CACHE_RIGHTS_SBAS); - $this->set_data_to_cache($this->_global_rights, self::CACHE_GLOBAL_RIGHTS); - - return $this; - } - - /** - * Loads rights of specified user for all bas - * - * @return ACL - */ - protected function load_rights_bas() - { - if ($this->_rights_bas && $this->_global_rights && is_array($this->_limited)) { - return $this; - } - - try { - $this->_rights_bas = $this->get_data_from_cache(self::CACHE_RIGHTS_BAS); - $this->_global_rights = $this->get_data_from_cache(self::CACHE_GLOBAL_RIGHTS); - $this->_limited = $this->get_data_from_cache(self::CACHE_LIMITS_BAS); - - return $this; - } catch (Exception $e) { - - } - - $sql = 'SELECT u.* FROM basusr u, bas b, sbas s - WHERE usr_id= :usr_id - AND b.base_id = u.base_id - AND b.sbas_id = s.sbas_id - AND s.sbas_id = b.sbas_id '; - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->user->get_id())); - $rs = $stmt->fetchAll(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - - $this->_rights_bas = $this->_limited = array(); - - - $this->_global_rights['manageusers'] = false; - $this->_global_rights['coll_manage'] = false; - $this->_global_rights['coll_modify_struct'] = false; - $this->_global_rights['order'] = false; - $this->_global_rights['push'] = false; - $this->_global_rights['addrecord'] = false; - $this->_global_rights['modifyrecord'] = false; - $this->_global_rights['changestatus'] = false; - $this->_global_rights['doctools'] = false; - $this->_global_rights['deleterecord'] = false; - $this->_global_rights['addtoalbum'] = false; - $this->_global_rights['report'] = false; - $this->_global_rights['candwnldpreview'] = false; - $this->_global_rights['candwnldhd'] = false; - $this->_global_rights['order_master'] = false; - - - foreach ($rs as $row) { - $this->_rights_bas[$row['base_id']]['actif'] = ($row['actif'] == '1'); - - if ($row['canadmin'] == '1') - $this->_global_rights['manageusers'] = true; - if ($row['manage'] == '1') - $this->_global_rights['coll_manage'] = true; - if ($row['modify_struct'] == '1') - $this->_global_rights['coll_modify_struct'] = true; - if ($row['cancmd'] == '1') - $this->_global_rights['order'] = true; - if ($row['canpush'] == '1') - $this->_global_rights['push'] = true; - if ($row['canaddrecord'] == '1') - $this->_global_rights['addrecord'] = true; - if ($row['canmodifrecord'] == '1') - $this->_global_rights['modifyrecord'] = true; - if ($row['chgstatus'] == '1') - $this->_global_rights['changestatus'] = true; - if ($row['imgtools'] == '1') - $this->_global_rights['doctools'] = true; - if ($row['candeleterecord'] == '1') - $this->_global_rights['deleterecord'] = true; - if ($row['canputinalbum'] == '1') - $this->_global_rights['addtoalbum'] = true; - if ($row['canreport'] == '1') - $this->_global_rights['report'] = true; - if ($row['candwnldpreview'] == '1') - $this->_global_rights['candwnldpreview'] = true; - if ($row['candwnldhd'] == '1') - $this->_global_rights['candwnldhd'] = true; - if ($row['order_master'] == '1') - $this->_global_rights['order_master'] = true; - - $row['limited_from'] = $row['limited_from'] == '0000-00-00 00:00:00' ? '' : trim($row['limited_from']); - $row['limited_to'] = $row['limited_to'] == '0000-00-00 00:00:00' ? '' : trim($row['limited_to']); - - if ($row['time_limited'] == '1' - && ($row['limited_from'] !== '' || $row['limited_to'] !== '')) { - $this->_limited[$row['base_id']] = array( - 'dmin' => $row['limited_from'] ? new DateTime($row['limited_from']) : null - , 'dmax' => $row['limited_to'] ? new DateTime($row['limited_to']) : null - ); - } - - $this->_rights_bas[$row['base_id']]['imgtools'] - = $row['imgtools'] == '1'; - - $this->_rights_bas[$row['base_id']]['chgstatus'] - = $row['chgstatus'] == '1'; - $this->_rights_bas[$row['base_id']]['cancmd'] - = $row['cancmd'] == '1'; - $this->_rights_bas[$row['base_id']]['canaddrecord'] - = $row['canaddrecord'] == '1'; - $this->_rights_bas[$row['base_id']]['canpush'] - = $row['canpush'] == '1'; - $this->_rights_bas[$row['base_id']]['candeleterecord'] - = $row['candeleterecord'] == '1'; - $this->_rights_bas[$row['base_id']]['canadmin'] - = $row['canadmin'] == '1'; - $this->_rights_bas[$row['base_id']]['chgstatus'] - = $row['chgstatus'] == '1'; - $this->_rights_bas[$row['base_id']]['candwnldpreview'] - = $row['candwnldpreview'] == '1'; - $this->_rights_bas[$row['base_id']]['candwnldhd'] - = $row['candwnldhd'] == '1'; - $this->_rights_bas[$row['base_id']]['nowatermark'] - = $row['nowatermark'] == '1'; - $this->_rights_bas[$row['base_id']]['restrict_dwnld'] - = $row['restrict_dwnld'] == '1'; - $this->_rights_bas[$row['base_id']]['remain_dwnld'] - = (int) $row['remain_dwnld']; - $this->_rights_bas[$row['base_id']]['canmodifrecord'] - = $row['canmodifrecord'] == '1'; - $this->_rights_bas[$row['base_id']]['canputinalbum'] - = $row['canputinalbum'] == '1'; - $this->_rights_bas[$row['base_id']]['canreport'] - = $row['canreport'] == '1'; - $this->_rights_bas[$row['base_id']]['mask_and'] - = $row['mask_and']; - $this->_rights_bas[$row['base_id']]['mask_xor'] - = $row['mask_xor']; - $this->_rights_bas[$row['base_id']]['modify_struct'] - = $row['modify_struct'] == '1'; - $this->_rights_bas[$row['base_id']]['manage'] - = $row['manage'] == '1'; - $this->_rights_bas[$row['base_id']]['order_master'] - = $row['order_master'] == '1'; - } - - $this->set_data_to_cache($this->_global_rights, self::CACHE_GLOBAL_RIGHTS); - $this->set_data_to_cache($this->_rights_bas, self::CACHE_RIGHTS_BAS); - $this->set_data_to_cache($this->_limited, self::CACHE_LIMITS_BAS); - - return $this; - } - - /** - * Loads global rights for user - * - * @return ACL - */ - protected function load_global_rights() - { - $this->load_rights_bas(); - $this->load_rights_sbas(); - $this->_global_rights['taskmanager'] = $this->user->is_admin(); - - return $this; - } - - /** - * Return whether or not the acces to the specified module is OK - * - * @param String $module_name - * @return boolean - */ - public function has_access_to_module($module_name) - { - switch ($module_name) { - case 'admin': - return ( - ($this->has_right('bas_modify_struct') || - $this->has_right('coll_modify_struct') || - $this->has_right('bas_manage') || - $this->has_right('coll_manage') || - $this->has_right('manageusers') || - $this->user->is_admin()) ); - break; - case 'thesaurus': - return ($this->has_right('bas_modif_th') === true ); - break; - case 'upload': - return ($this->has_right('addrecord') === true); - break; - case 'report': - return ($this->has_right('report') === true); - break; - default: - break; - } - - return true; - } - - /** - * - * @param array $base_ids - * @return ACL - */ - public function revoke_access_from_bases(Array $base_ids) - { - $sql_del = 'DELETE FROM basusr WHERE base_id = :base_id AND usr_id = :usr_id'; - $stmt_del = $this->appbox->get_connection()->prepare($sql_del); - - $usr_id = $this->user->get_id(); - - foreach ($base_ids as $base_id) { - if ( ! $stmt_del->execute(array(':base_id' => $base_id, ':usr_id' => $usr_id))) { - throw new Exception('Error while deleteing some rights'); - } - } - $this->delete_data_from_cache(self::CACHE_RIGHTS_BAS); - - return $this; - } - - /** - * - * @param array $base_ids - * @return ACL - */ - public function give_access_to_base(Array $base_ids) - { - $sql_ins = 'INSERT INTO basusr (id, base_id, usr_id, actif) - VALUES (null, :base_id, :usr_id, "1")'; - $stmt_ins = $this->appbox->get_connection()->prepare($sql_ins); - $usr_id = $this->user->get_id(); - $to_update = array(); - $this->load_rights_bas(); - - foreach ($base_ids as $base_id) { - if ( ! isset($this->_rights_bas[$base_id])) { - $stmt_ins->execute(array(':base_id' => $base_id, ':usr_id' => $usr_id)); - } elseif ($this->_rights_bas[$base_id]['actif'] === false) { - $to_update[] = $base_id; - } - } - $stmt_ins->closeCursor(); - - $sql_upd = 'UPDATE basusr SET actif="1" - WHERE usr_id = :usr_id AND base_id = :base_id'; - $stmt_upd = $this->appbox->get_connection()->prepare($sql_upd); - foreach ($to_update as $base_id) { - $stmt_upd->execute(array(':usr_id' => $usr_id, ':base_id' => $base_id)); - } - $stmt_upd->closeCursor(); - - $this->delete_data_from_cache(self::CACHE_RIGHTS_BAS); - $this->inject_rights(); - - return $this; - } - - /** - * - * @param array $sbas_ids - * @return ACL - */ - public function give_access_to_sbas(Array $sbas_ids) - { - $sql_ins = 'INSERT INTO sbasusr (sbasusr_id, sbas_id, usr_id) VALUES (null, :sbas_id, :usr_id)'; - $stmt_ins = $this->appbox->get_connection()->prepare($sql_ins); - - $usr_id = $this->user->get_id(); - - foreach ($sbas_ids as $sbas_id) { - if ( ! $this->has_access_to_sbas($sbas_id)) - $stmt_ins->execute(array(':sbas_id' => $sbas_id, ':usr_id' => $usr_id)); - } - $this->delete_data_from_cache(self::CACHE_RIGHTS_SBAS); - - return $this; - } - - /** - * @todo Create special toggle 'actif' / not a right like others - * => nested loops when updating right to actif on an inactif account - * - * @param $base_id - * @param $rights - * @return ACL - */ - public function update_rights_to_base($base_id, $rights) - { - - if ( ! $this->has_access_to_base($base_id) && ( ! isset($rights['actif']) || $rights['actif'] == '1')) { - $this->give_access_to_base(array($base_id)); - } - - $sql_up = "UPDATE basusr SET "; - - $sql_args = $params = array(); - foreach ($rights as $right => $v) { - $sql_args[] = " " . $right . " = :" . $right; - switch ($right) { - default: - $params[':' . $right] = $v ? '1' : '0'; - break; - case 'mask_and': - case 'mask_xor': - $params[':' . $right] = $v; - break; - } - } - - if (count($sql_args) == 0) { - return $this; - } - - $usr_id = $this->user->get_id(); - - $sql_up .= implode(', ', $sql_args) . ' WHERE base_id = :base_id - AND usr_id = :usr_id'; - - $params = array_merge( - $params - , array(':base_id' => $base_id, ':usr_id' => $usr_id) - ); - - $stmt_up = $this->appbox->get_connection()->prepare($sql_up); - $stmt_up->execute($params); - $stmt_up->closeCursor(); - - $this->delete_data_from_cache(self::CACHE_RIGHTS_BAS); - - return $this; - } - - /** - * - * @return ACL - */ - public function revoke_unused_sbas_rights() - { - $sql = 'DELETE FROM sbasusr - WHERE usr_id = :usr_id_1 - AND sbas_id NOT IN - (SELECT distinct sbas_id FROM basusr bu, bas b WHERE usr_id = :usr_id_2 AND b.base_id = bu.base_id)'; - - $usr_id = $this->user->get_id(); - $params = array(':usr_id_1' => $usr_id, ':usr_id_2' => $usr_id); - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); - -// $sql = 'DELETE FROM sbasusr -// WHERE sbas_id NOT IN -// (SELECT distinct sbas_id FROM sbas)'; -// -// $stmt = $this->appbox->get_connection()->prepare($sql); -// $stmt->execute(); -// $stmt->closeCursor(); - - $this->delete_data_from_cache(self::CACHE_RIGHTS_SBAS); - - return $this; - } - - /** - * - * @param $sbas_id - * @param $rights - * @return ACL - */ - public function update_rights_to_sbas($sbas_id, $rights) - { - if ( ! $this->has_access_to_sbas($sbas_id)) - $this->give_access_to_sbas(array($sbas_id)); - - $sql_up = "UPDATE sbasusr SET "; - - $sql_args = array(); - $usr_id = $this->user->get_id(); - $params = array(':sbas_id' => $sbas_id, ':usr_id' => $usr_id); - - foreach ($rights as $right => $v) { - $sql_args[] = " " . $right . " = :" . $right; - $params[':' . $right] = $v ? '1' : '0'; - } - - if (count($sql_args) == 0) { - return $this; - } - - $sql_up .= implode(', ', $sql_args) . ' - WHERE sbas_id = :sbas_id AND usr_id = :usr_id'; - - $stmt_up = $this->appbox->get_connection()->prepare($sql_up); - - if ( ! $stmt_up->execute($params)) { - throw new Exception('Error while updating some rights'); - } - $this->delete_data_from_cache(self::CACHE_RIGHTS_SBAS); - - return $this; - } - - /** - * - * @param $base_id - * @return ACL - */ - public function remove_quotas_on_base($base_id) - { - $sql = 'UPDATE basusr - SET remain_dwnld = 0, restrict_dwnld = 0, month_dwnld_max = 0 - WHERE usr_id = :usr_id AND base_id = :base_id '; - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->user->get_id(), ':base_id' => $base_id)); - $stmt->closeCursor(); - - unset($stmt); - $this->delete_data_from_cache(self::CACHE_RIGHTS_BAS); - - return $this; - } - - public function update_download_restrictions() - { - $sql = 'UPDATE basusr SET remain_dwnld = month_dwnld_max - WHERE actif = 1 - AND usr_id = :usr_id - AND MONTH(lastconn) != MONTH(NOW()) AND restrict_dwnld = 1'; - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->user->get_id())); - $stmt->closeCursor(); - - - $sql = "UPDATE basusr SET lastconn=now() - WHERE usr_id = :usr_id AND actif = 1"; - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':usr_id' => $this->user->get_id())); - $stmt->closeCursor(); - - unset($stmt); - $this->delete_data_from_cache(self::CACHE_RIGHTS_BAS); - - return $this; - } - - /** - * - * @param $base_id - * @param $droits - * @param $restes - * @return ACL - */ - public function set_quotas_on_base($base_id, $droits, $restes) - { - $sql = 'UPDATE basusr - SET remain_dwnld = :restes, restrict_dwnld = 1, month_dwnld_max = :droits - WHERE usr_id = :usr_id AND base_id = :base_id '; - - $params = array( - ':usr_id' => $this->user->get_id(), - ':base_id' => $base_id, - ':restes' => $restes, - ':droits' => $droits - ); - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); - - unset($stmt); - $this->delete_data_from_cache(self::CACHE_RIGHTS_BAS); - - return $this; - } - - public function duplicate_right_from_bas($base_id_from, $base_id_dest) - { - $sql = 'SELECT * FROM basusr - WHERE base_id = :base_from AND usr_id = :usr_id'; - - $params = array( - ':base_from' => $base_id_from, - ':usr_id' => $this->user->get_id() - ); - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute($params); - $row = $stmt->fetch(PDO::FETCH_ASSOC); - $stmt->closeCursor(); - - if ( ! $row) { - return $this; - } - - $this->give_access_to_base(array($base_id_dest)); - - $rights = array(); - if ($row['canputinalbum']) - $rights['canputinalbum'] = true; - if ($row['candwnldhd']) - $rights['candwnldhd'] = true; - if ($row['candwnldpreview']) - $rights['candwnldpreview'] = true; - if ($row['cancmd']) - $rights['cancmd'] = true; - if ($row['canadmin']) - $rights['canadmin'] = true; - if ($row['canreport']) - $rights['canreport'] = true; - if ($row['canpush']) - $rights['canpush'] = true; - if ($row['nowatermark']) - $rights['nowatermark'] = true; - if ($row['canaddrecord']) - $rights['canaddrecord'] = true; - if ($row['canmodifrecord']) - $rights['canmodifrecord'] = true; - if ($row['candeleterecord']) - $rights['candeleterecord'] = true; - if ($row['chgstatus']) - $rights['chgstatus'] = true; - if ($row['imgtools']) - $rights['imgtools'] = true; - if ($row['manage']) - $rights['manage'] = true; - if ($row['modify_struct']) - $rights['modify_struct'] = true; - - $this->update_rights_to_base($base_id_dest, $rights); - - return $this; - } - - public function inject_rights() - { - $this->update_download_restrictions(); - - foreach ($this->get_granted_sbas() as $databox) { - $this->inject_rights_sbas($databox); - } - - return $this; - } - - protected function inject_rights_sbas(databox $databox) - { - $this->delete_injected_rights_sbas($databox); - - $sql = "INSERT INTO collusr - (site, usr_id, coll_id, mask_and, mask_xor, ord) - VALUES (:site_id, :usr_id, :coll_id, :mask_and, :mask_xor, :ord)"; - $stmt = $databox->get_connection()->prepare($sql); - $iord = 0; - - foreach ($this->get_granted_base(array(), array($databox->get_sbas_id())) as $collection) { - $stmt->execute(array( - ':site_id' => $this->appbox->get_registry()->get('GV_sit'), - ':usr_id' => $this->user->get_id(), - ':coll_id' => $collection->get_coll_id(), - ':mask_and' => $this->get_mask_and($collection->get_base_id()), - ':mask_xor' => $this->get_mask_xor($collection->get_base_id()), - ':ord' => $iord ++ - )); - } - - $stmt->closeCursor(); - - return $this; - } - - public function delete_injected_rights() - { - foreach ($this->get_granted_sbas() as $databox) { - $this->delete_injected_rights_sbas($databox); - } - - return $this; - } - - public function delete_injected_rights_sbas(databox $databox) - { - $sql = 'DELETE FROM collusr WHERE usr_id = :usr_id AND site = :site'; - $params = array( - ':usr_id' => $this->user->get_id() - , ':site' => $this->appbox->get_registry()->get('GV_sit') - ); - $stmt = $databox->get_connection()->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); - - return $this; - } - - public function set_masks_on_base($base_id, $and_and, $and_or, $xor_and, $xor_or) - { - $vhex = array(); - $datas = array( - 'and_and' => $and_and, - 'and_or' => $and_or, - 'xor_and' => $xor_and, - 'xor_or' => $xor_or - ); - - foreach ($datas as $name => $f) { - $vhex[$name] = "0x"; - while (strlen($datas[$name]) < 64) - $datas[$name] = "0" . $datas[$name]; - } - foreach ($datas as $name => $f) { - while (strlen($datas[$name]) > 0) { - $valtmp = substr($datas[$name], 0, 4); - $datas[$name] = substr($datas[$name], 4); - $vhex[$name] .= dechex(bindec($valtmp)); - } - } - - $sql = "UPDATE basusr - SET mask_and=((mask_and & " . $vhex['and_and'] . ") | " . $vhex['and_or'] . ") - ,mask_xor=((mask_xor & " . $vhex['xor_and'] . ") | " . $vhex['xor_or'] . ") - WHERE usr_id = :usr_id and base_id = :base_id"; - - $stmt = $this->appbox->get_connection()->prepare($sql); - $stmt->execute(array(':base_id' => $base_id, ':usr_id' => $this->user->get_id())); - $stmt->closeCursor(); - - unset($stmt); - - return $this; - } - - public function is_limited($base_id) - { - $this->load_rights_bas(); - - $datetime = new DateTime(); - - if ( ! isset($this->_limited[$base_id])) { - return false; - } - - $lim_min = $this->_limited[$base_id]['dmin'] && $this->_limited[$base_id]['dmin'] > $datetime; - - $lim_max = $this->_limited[$base_id]['dmax'] && $this->_limited[$base_id]['dmax'] < $datetime; - - return $lim_max || $lim_min; - } - - public function get_limits($base_id) - { - $this->load_rights_bas(); - if ( ! isset($this->_limited[$base_id])) { - return null; - } - - return ($this->_limited[$base_id]); - } - - public function set_limits($base_id, $limit, DateTime $limit_from = null, DateTime $limit_to = null) - { - if ($limit) { - $sql = 'UPDATE basusr - SET time_limited = 1 - , limited_from = :limited_from - , limited_to = :limited_to - WHERE base_id = :base_id AND usr_id = :usr_id'; - } else { - $sql = 'UPDATE basusr - SET time_limited = 0 - , limited_from = :limited_from - , limited_to = :limited_to - WHERE base_id = :base_id AND usr_id = :usr_id'; - } - - $params = array( - ':usr_id' => $this->user->get_id() - , ':base_id' => $base_id - , 'limited_from' => ($limit_from ? $limit_from->format(DATE_ISO8601) : null) - , 'limited_to' => ($limit_to ? $limit_to->format(DATE_ISO8601) : null) - ); - - $stmt = $this->appbox->get_connection()->prepare($sql); - - $stmt->execute($params); - - $stmt->closeCursor(); - - $this->delete_data_from_cache(self::CACHE_LIMITS_BAS); - - return $this; - } -} - diff --git a/lib/classes/API/OAuth2/Account.class.php b/lib/classes/API/OAuth2/Account.class.php index a9de9f3322..97df04a1a5 100644 --- a/lib/classes/API/OAuth2/Account.class.php +++ b/lib/classes/API/OAuth2/Account.class.php @@ -78,8 +78,8 @@ class API_OAuth2_Account /** * Constructor * - * @param appbox $appbox - * @param int $account_id + * @param appbox $appbox + * @param int $account_id * @return API_OAuth2_Account */ public function __construct(appbox &$appbox, $account_id) @@ -144,7 +144,7 @@ class API_OAuth2_Account /** * - * @param boolean $boolean + * @param boolean $boolean * @return API_OAuth2_Account */ public function set_revoked($boolean) @@ -177,7 +177,7 @@ class API_OAuth2_Account /** * - * @return API_OAuth2_Token + * @return API_OAuth2_Token */ public function get_token() { @@ -230,9 +230,9 @@ class API_OAuth2_Account /** * - * @param appbox $appbox - * @param User_Adapter $user - * @param API_OAuth2_Application $application + * @param appbox $appbox + * @param User_Adapter $user + * @param API_OAuth2_Application $application * @return API_OAuth2_Account */ public static function create(appbox &$appbox, User_Adapter $user, API_OAuth2_Application $application) @@ -261,9 +261,9 @@ class API_OAuth2_Account /** * - * @param appbox $appbox - * @param API_OAuth2_Application $application - * @param User_Adapter $user + * @param appbox $appbox + * @param API_OAuth2_Application $application + * @param User_Adapter $user * @return API_OAuth2_Account */ public static function load_with_user(appbox &$appbox, API_OAuth2_Application $application, User_Adapter $user) diff --git a/lib/classes/API/OAuth2/Adapter.class.php b/lib/classes/API/OAuth2/Adapter.class.php index 8f0e0da19e..4d419230d3 100644 --- a/lib/classes/API/OAuth2/Adapter.class.php +++ b/lib/classes/API/OAuth2/Adapter.class.php @@ -83,7 +83,7 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param appbox $appbox + * @param appbox $appbox * @return API_OAuth2_Adapter */ public function __construct(appbox $appbox) @@ -115,7 +115,7 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param array $params + * @param array $params * @return API_OAuth2_Adapter */ public function setParams(array $params) @@ -170,8 +170,8 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param string $secret - * @param string $nonce + * @param string $secret + * @param string $nonce * @return string */ protected static function crypt_secret($secret, $nonce) @@ -185,8 +185,8 @@ class API_OAuth2_Adapter extends OAuth2 * * Implements OAuth2::checkClientCredentials(). * - * @param string $client_id - * @param string $client_secret + * @param string $client_id + * @param string $client_secret * @return boolean */ protected function checkClientCredentials($client_id, $client_secret = NULL) @@ -212,7 +212,7 @@ class API_OAuth2_Adapter extends OAuth2 * * Implements OAuth2::getRedirectUri(). * - * @param string $client_id + * @param string $client_id * @return string */ protected function getRedirectUri($client_id) @@ -226,7 +226,7 @@ class API_OAuth2_Adapter extends OAuth2 * * Implements OAuth2::getAccessToken(). * - * @param string $oauth_token + * @param string $oauth_token * @return array */ protected function getAccessToken($oauth_token) @@ -258,10 +258,10 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param type $oauth_token - * @param type $account_id - * @param type $expires - * @param string $scope + * @param type $oauth_token + * @param type $account_id + * @param type $expires + * @param string $scope * @return API_OAuth2_Adapter */ protected function setAccessToken($oauth_token, $account_id, $expires, $scope = NULL) @@ -326,11 +326,11 @@ class API_OAuth2_Adapter extends OAuth2 * * Overrides OAuth2::setAuthCode(). * - * @param string $code - * @param int $account_id - * @param string $redirect_uri - * @param string $expires - * @param string $scope + * @param string $code + * @param int $account_id + * @param string $redirect_uri + * @param string $expires + * @param string $scope * @return API_OAuth2_Adapter */ protected function setAuthCode($code, $account_id, $redirect_uri, $expires, $scope = NULL) @@ -386,7 +386,7 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param Symfony\Component\HttpFoundation\Request $request + * @param Symfony\Component\HttpFoundation\Request $request * @return array */ public function getAuthorizationRequestParameters(Symfony\Component\HttpFoundation\Request $request) @@ -477,8 +477,7 @@ class API_OAuth2_Adapter extends OAuth2 ), $redirect_uri); if ($compare !== 0) $this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_REDIRECT_URI_MISMATCH, NULL, NULL, $input["state"]); - } - elseif ($redirect_uri) { + } elseif ($redirect_uri) { /** * They did not provide a uri from input, so use the stored one */ @@ -524,7 +523,7 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param usr_id $usr_id + * @param usr_id $usr_id * @return API_OAuth2_Account */ public function updateAccount($usr_id) @@ -544,7 +543,7 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param int $usr_id + * @param int $usr_id * @return API_OAuth2_Account */ private function createAccount($usr_id) @@ -556,8 +555,8 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param $is_authorized - * @param array $params + * @param $is_authorized + * @param array $params * @return string */ public function finishNativeClientAuthorization($is_authorized, $params = array()) @@ -587,7 +586,7 @@ class API_OAuth2_Adapter extends OAuth2 /** * - * @param $redirect_uri + * @param $redirect_uri * @return */ public function isNativeApp($redirect_uri) diff --git a/lib/classes/API/OAuth2/Application.class.php b/lib/classes/API/OAuth2/Application.class.php index 69cf66de67..ea09d36da1 100644 --- a/lib/classes/API/OAuth2/Application.class.php +++ b/lib/classes/API/OAuth2/Application.class.php @@ -126,8 +126,8 @@ class API_OAuth2_Application /** * - * @param appbox $appbox - * @param int $application_id + * @param appbox $appbox + * @param int $application_id * @return API_OAuth2_Application */ public function __construct(appbox &$appbox, $application_id) @@ -202,7 +202,7 @@ class API_OAuth2_Application /** * - * @param string $type + * @param string $type * @return API_OAuth2_Application */ public function set_type($type) @@ -241,7 +241,7 @@ class API_OAuth2_Application /** * - * @param string $name + * @param string $name * @return API_OAuth2_Application */ public function set_name($name) @@ -274,7 +274,7 @@ class API_OAuth2_Application /** * - * @param string $description + * @param string $description * @return API_OAuth2_Application */ public function set_description($description) @@ -308,7 +308,7 @@ class API_OAuth2_Application /** * - * @param string $website + * @param string $website * @return API_OAuth2_Application */ public function set_website($website) @@ -342,7 +342,7 @@ class API_OAuth2_Application /** * - * @param boolean $activated + * @param boolean $activated * @return API_OAuth2_Application */ public function set_activated($activated) @@ -376,7 +376,7 @@ class API_OAuth2_Application /** * - * @param boolean $grant + * @param boolean $grant * @return API_OAuth2_Application */ public function set_grant_password($grant) @@ -428,7 +428,7 @@ class API_OAuth2_Application /** * - * @param int $client_id + * @param int $client_id * @return API_OAuth2_Application */ public function set_client_id($client_id) @@ -462,7 +462,7 @@ class API_OAuth2_Application /** * - * @param string $client_secret + * @param string $client_secret * @return API_OAuth2_Application */ public function set_client_secret($client_secret) @@ -496,7 +496,7 @@ class API_OAuth2_Application /** * - * @param string $redirect_uri + * @param string $redirect_uri * @return API_OAuth2_Application */ public function set_redirect_uri($redirect_uri) @@ -520,7 +520,7 @@ class API_OAuth2_Application /** * - * @param User_Adapter $user + * @param User_Adapter $user * @return API_OAuth2_Account */ public function get_user_account(user_adapter $user) @@ -589,9 +589,9 @@ class API_OAuth2_Application /** * - * @param appbox $appbox - * @param User_Adapter $user - * @param type $name + * @param appbox $appbox + * @param User_Adapter $user + * @param type $name * @return API_OAuth2_Application */ public static function create(appbox &$appbox, User_Adapter $user = null, $name) @@ -637,8 +637,8 @@ class API_OAuth2_Application /** * - * @param appbox $appbox - * @param type $client_id + * @param appbox $appbox + * @param type $client_id * @return API_OAuth2_Application */ public static function load_from_client_id(appbox &$appbox, $client_id) @@ -659,8 +659,8 @@ class API_OAuth2_Application /** * - * @param appbox $appbox - * @param User_Adapter $user + * @param appbox $appbox + * @param User_Adapter $user * @return array */ public static function load_dev_app_by_user(appbox &$appbox, User_Adapter $user) @@ -684,8 +684,8 @@ class API_OAuth2_Application /** * - * @param appbox $appbox - * @param user_adapter $user + * @param appbox $appbox + * @param user_adapter $user * @return API_OAuth2_Application */ public static function load_app_by_user(appbox $appbox, user_adapter $user) diff --git a/lib/classes/API/OAuth2/AuthCode.class.php b/lib/classes/API/OAuth2/AuthCode.class.php index 75744abde2..673c1cfbba 100644 --- a/lib/classes/API/OAuth2/AuthCode.class.php +++ b/lib/classes/API/OAuth2/AuthCode.class.php @@ -133,8 +133,8 @@ class API_OAuth2_AuthCode /** * - * @param appbox $appbox - * @param API_OAuth2_Account $account + * @param appbox $appbox + * @param API_OAuth2_Account $account * @return array */ public static function load_codes_by_account(appbox &$appbox, API_OAuth2_Account $account) @@ -160,10 +160,10 @@ class API_OAuth2_AuthCode /** * - * @param appbox $appbox - * @param API_OAuth2_Account $account - * @param type $code - * @param int $expires + * @param appbox $appbox + * @param API_OAuth2_Account $account + * @param type $code + * @param int $expires * @return API_OAuth2_AuthCode */ public static function create(appbox &$appbox, API_OAuth2_Account $account, $code, $expires) diff --git a/lib/classes/API/OAuth2/Exception/Exception.class.php b/lib/classes/API/OAuth2/Exception/Exception.class.php index 3440cb9687..52ddf06a30 100644 --- a/lib/classes/API/OAuth2/Exception/Exception.class.php +++ b/lib/classes/API/OAuth2/Exception/Exception.class.php @@ -54,11 +54,11 @@ class API_OAuth2_Exception_Exception extends Exception implements API_OAuth2_Exc /** * - * @param int $http_code - * @param string $error - * @param string $error_description - * @param string $scope - * @param string $error_uri + * @param int $http_code + * @param string $error + * @param string $error_description + * @param string $scope + * @param string $error_uri * @return API_OAuth2_Exception_Exception */ public function __construct($http_code, $error, $error_description = null, $scope = null, $error_uri = null) @@ -83,7 +83,7 @@ class API_OAuth2_Exception_Exception extends Exception implements API_OAuth2_Exc /** * - * @param int $http_code + * @param int $http_code * @return API_OAuth2_Exception_Exception */ public function setHttp_code($http_code) @@ -104,7 +104,7 @@ class API_OAuth2_Exception_Exception extends Exception implements API_OAuth2_Exc /** * - * @param string $scope + * @param string $scope * @return API_OAuth2_Exception_Exception */ public function setError($error) @@ -125,7 +125,7 @@ class API_OAuth2_Exception_Exception extends Exception implements API_OAuth2_Exc /** * - * @param string $scope + * @param string $scope * @return API_OAuth2_Exception_Exception */ public function setError_description($error_description) @@ -146,7 +146,7 @@ class API_OAuth2_Exception_Exception extends Exception implements API_OAuth2_Exc /** * - * @param string $scope + * @param string $scope * @return API_OAuth2_Exception_Exception */ public function setError_uri($error_uri) @@ -167,7 +167,7 @@ class API_OAuth2_Exception_Exception extends Exception implements API_OAuth2_Exc /** * - * @param string $scope + * @param string $scope * @return API_OAuth2_Exception_Exception */ public function setScope($scope) diff --git a/lib/classes/API/OAuth2/Exception/Redirect.class.php b/lib/classes/API/OAuth2/Exception/Redirect.class.php index 3c9dcf263c..9d27faf710 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect.class.php @@ -42,11 +42,11 @@ class API_OAuth2_Exception_Redirect extends API_OAuth2_Exception_Exception /** * - * @param string $redirect_uri - * @param string $error - * @param string $error_description - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $error + * @param string $error_description + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect */ public function __construct($redirect_uri, $error, $error_description = null, $state = null, $error_uri = null) @@ -69,7 +69,7 @@ class API_OAuth2_Exception_Redirect extends API_OAuth2_Exception_Exception /** * - * @param string $redirect_uri + * @param string $redirect_uri * @return API_OAuth2_Exception_Redirect */ public function setState($state) @@ -90,7 +90,7 @@ class API_OAuth2_Exception_Redirect extends API_OAuth2_Exception_Exception /** * - * @param string $redirect_uri + * @param string $redirect_uri * @return API_OAuth2_Exception_Redirect */ public function setRedirect_uri($redirect_uri) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/AccessDenied.class.php b/lib/classes/API/OAuth2/Exception/Redirect/AccessDenied.class.php index f88896c141..c00ebef5d6 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/AccessDenied.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/AccessDenied.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_Redirect_AccessDenied extends API_OAuth2_Exception_Re /** * - * @param string $redirect_uri - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_AccessDenied */ public function __construct($redirect_uri, $state = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/InvalidClient.class.php b/lib/classes/API/OAuth2/Exception/Redirect/InvalidClient.class.php index e0bce570cc..ccf86d2e2a 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/InvalidClient.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/InvalidClient.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_Redirect_InvalidClient extends API_OAuth2_Exception_R /** * - * @param string $redirect_uri - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_InvalidClient */ public function __construct($redirect_uri, $state = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/InvalidRequest.class.php b/lib/classes/API/OAuth2/Exception/Redirect/InvalidRequest.class.php index 3b40f738e7..f7eb59d7a8 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/InvalidRequest.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/InvalidRequest.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_Redirect_InvalidRequest extends API_OAuth2_Exception_ /** * - * @param string $redirect_uri - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_InvalidRequest */ public function __construct($redirect_uri, $state = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/InvalidScope.class.php b/lib/classes/API/OAuth2/Exception/Redirect/InvalidScope.class.php index 89f9b0a358..08410813ae 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/InvalidScope.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/InvalidScope.class.php @@ -42,10 +42,10 @@ class API_OAuth2_Exception_Redirect_InvalidScope extends API_OAuth2_Exception_Re /** * - * @param string $redirect_uri - * @param string $scope - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $scope + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_InvalidScope */ public function __construct($redirect_uri, $scope, $state = null, $error_uri = null) @@ -67,7 +67,7 @@ class API_OAuth2_Exception_Redirect_InvalidScope extends API_OAuth2_Exception_Re /** * - * @param string $scope + * @param string $scope * @return API_OAuth2_Exception_Redirect_InvalidScope */ public function setScope($scope) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/ServerError.class.php b/lib/classes/API/OAuth2/Exception/Redirect/ServerError.class.php index ae6fc5ee7b..49cda85d1c 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/ServerError.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/ServerError.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_Redirect_ServerError extends API_OAuth2_Exception_Red /** * - * @param string $redirect_uri - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_ServerError */ public function __construct($redirect_uri, $state = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/TemporaryUnavailable.class.php b/lib/classes/API/OAuth2/Exception/Redirect/TemporaryUnavailable.class.php index 07112e19b1..a3aa731531 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/TemporaryUnavailable.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/TemporaryUnavailable.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_Redirect_Unauthorized extends API_OAuth2_Exception_Re /** * - * @param string $redirect_uri - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_Unauthorized */ public function __construct($redirect_uri, $state = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/UnauthorizedClient.class.php b/lib/classes/API/OAuth2/Exception/Redirect/UnauthorizedClient.class.php index 5f474b7e58..b0ae7f68fd 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/UnauthorizedClient.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/UnauthorizedClient.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_Redirect_UnauthorizedClient extends API_OAuth2_Except /** * - * @param string $redirect_uri - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_UnauthorizedClient */ public function __construct($redirect_uri, $state = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/Redirect/UnsupportedResponseType.class.php b/lib/classes/API/OAuth2/Exception/Redirect/UnsupportedResponseType.class.php index 0bc72fa2f2..b235170432 100644 --- a/lib/classes/API/OAuth2/Exception/Redirect/UnsupportedResponseType.class.php +++ b/lib/classes/API/OAuth2/Exception/Redirect/UnsupportedResponseType.class.php @@ -42,10 +42,10 @@ class API_OAuth2_Exception_Redirect_UnsupportedResponseType extends API_OAuth2_E /** * - * @param string $redirect_uri - * @param string $method - * @param string $state - * @param string $error_uri + * @param string $redirect_uri + * @param string $method + * @param string $state + * @param string $error_uri * @return API_OAuth2_Exception_Redirect_UnsupportedResponseType */ public function __construct($redirect_uri, $method, $state = null, $error_uri = null) @@ -67,7 +67,7 @@ class API_OAuth2_Exception_Redirect_UnsupportedResponseType extends API_OAuth2_E /** * - * @param string $method + * @param string $method * @return API_OAuth2_Exception_Redirect_UnsupportedResponseType */ public function setMethod($method) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate.class.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate.class.php index 0afe4afa2f..52b6035cec 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate.class.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate.class.php @@ -36,12 +36,12 @@ class API_OAuth2_Exception_WWWAuthenticate extends API_OAuth2_Exception_Exceptio /** * - * @param int $http_code - * @param string $realm - * @param string $error - * @param string $error_description - * @param string $error_uri - * @param string $scope + * @param int $http_code + * @param string $realm + * @param string $error + * @param string $error_description + * @param string $error_uri + * @param string $scope * @return API_OAuth2_Exception_WWWAuthenticate */ public function __construct($http_code, $realm, $error, $error_description = null, $error_uri = null, $scope = null) @@ -65,7 +65,7 @@ class API_OAuth2_Exception_WWWAuthenticate extends API_OAuth2_Exception_Exceptio /** * - * @param string $realm + * @param string $realm * @return API_OAuth2_Exception_WWWAuthenticate */ public function setRealm($realm) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/ExpiredToken.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/ExpiredToken.php index 1d8c428f08..19c1f4fc36 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/ExpiredToken.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/ExpiredToken.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_WWWAuthenticate_ExpiredToken extends API_OAuth2_Excep /** * - * @param string $realm - * @param string $scope - * @param string $error_uri + * @param string $realm + * @param string $scope + * @param string $error_uri * @return API_OAuth2_Exception_WWWAuthenticate_ExpiredToken */ public function __construct($realm, $scope = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InsufficientScope.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InsufficientScope.php index 2932a19e2d..a2f34915c4 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InsufficientScope.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InsufficientScope.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_WWWAuthenticate_InsufficientScope extends API_OAuth2_ /** * - * @param string $realm - * @param string $scope - * @param string $error_uri + * @param string $realm + * @param string $scope + * @param string $error_uri * @return API_OAuth2_Exception_WWWAuthenticate_InsufficientScope */ public function __construct($realm, $scope = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidClient.class.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidClient.class.php index 0be30a8377..2694e56182 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidClient.class.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidClient.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_WWWAuthenticate_InvalidClient extends API_OAuth2_Exce /** * - * @param string $realm - * @param string $scope - * @param string $error_uri + * @param string $realm + * @param string $scope + * @param string $error_uri * @return API_OAuth2_Exception_WWWAuthenticate_InvalidClient */ public function __construct($realm, $scope = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidRequest.class.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidRequest.class.php index 0624b428ce..a4046c4f37 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidRequest.class.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidRequest.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_WWWAuthenticate_InvalidRequest extends API_OAuth2_Exc /** * - * @param string $realm - * @param string $scope - * @param string $error_uri + * @param string $realm + * @param string $scope + * @param string $error_uri * @return API_OAuth2_Exception_WWWAuthenticate_InvalidRequest */ public function __construct($realm, $scope = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidToken.class.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidToken.class.php index 202dfc03f6..93d51e34e0 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidToken.class.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/InvalidToken.class.php @@ -36,9 +36,9 @@ class API_OAuth2_Exception_WWWAuthenticate_InvalidToken extends API_OAuth2_Excep /** * - * @param string $realm - * @param string $scope - * @param string $error_uri + * @param string $realm + * @param string $scope + * @param string $error_uri * @return API_OAuth2_Exception_WWWAuthenticate_InvalidToken */ public function __construct($realm, $scope = null, $error_uri = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/BadRequest.class.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/BadRequest.class.php index c4d7bfa13b..7d34129dea 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/BadRequest.class.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/BadRequest.class.php @@ -30,11 +30,11 @@ class API_OAuth2_Exception_WWWAuthenticate_Type_BadRequest extends API_OAuth2_Ex /** * - * @param string $realm - * @param string $error - * @param string $error_description - * @param string $error_uri - * @param string $scope + * @param string $realm + * @param string $error + * @param string $error_description + * @param string $error_uri + * @param string $scope * @return API_OAuth2_Exception_WWWAuthenticate_Type_BadRequest */ public function __construct($realm, $error, $error_description = null, $error_uri = null, $scope = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Forbidden.class.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Forbidden.class.php index c8d9dcc164..b13246e866 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Forbidden.class.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Forbidden.class.php @@ -25,11 +25,11 @@ class API_OAuth2_Exception_WWWAuthenticate_Type_Forbidden extends API_OAuth2_Exc /** * - * @param string $realm - * @param string $error - * @param string $error_description - * @param string $error_uri - * @param string $scope + * @param string $realm + * @param string $error + * @param string $error_description + * @param string $error_uri + * @param string $scope * @return API_OAuth2_Exception_WWWAuthenticate_Type_Forbidden */ public function __construct($realm, $error, $error_description = null, $error_uri = null, $scope = null) diff --git a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Unauthorized.php b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Unauthorized.php index 70d37d4371..721ebd9c50 100644 --- a/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Unauthorized.php +++ b/lib/classes/API/OAuth2/Exception/WWWAuthenticate/Type/Unauthorized.php @@ -30,11 +30,11 @@ class API_OAuth2_Exception_WWWAuthenticate_Type_Unauthorized extends API_OAuth2_ /** * - * @param string $realm - * @param string $error - * @param string $error_description - * @param string $error_uri - * @param string $scope + * @param string $realm + * @param string $error + * @param string $error_description + * @param string $error_uri + * @param string $scope * @return API_OAuth2_Exception_WWWAuthenticate_Type_Unauthorized */ public function __construct($realm, $error, $error_description = null, $error_uri = null, $scope = null) diff --git a/lib/classes/API/OAuth2/Form/DevAppDesktop.class.php b/lib/classes/API/OAuth2/Form/DevAppDesktop.class.php index 7bd891566e..ff885412f4 100644 --- a/lib/classes/API/OAuth2/Form/DevAppDesktop.class.php +++ b/lib/classes/API/OAuth2/Form/DevAppDesktop.class.php @@ -60,7 +60,7 @@ class API_OAuth2_Form_DevAppDesktop /** * - * @param Request $request + * @param Request $request * @return API_OAuth2_Form_DevApp */ public function __construct(Request $request) @@ -139,10 +139,10 @@ class API_OAuth2_Form_DevAppDesktop /** * - * @param ClassMetadata $metadata + * @param ClassMetadata $metadata * @return API_OAuth2_Form_DevApp */ - static public function loadValidatorMetadata(ClassMetadata $metadata) + public static function loadValidatorMetadata(ClassMetadata $metadata) { $blank = array('message' => _('Cette valeur ne peut être vide')); $url = array('message' => _('Url non valide')); diff --git a/lib/classes/API/OAuth2/Form/DevAppInternet.class.php b/lib/classes/API/OAuth2/Form/DevAppInternet.class.php index 8124a2f400..82e2bfb912 100644 --- a/lib/classes/API/OAuth2/Form/DevAppInternet.class.php +++ b/lib/classes/API/OAuth2/Form/DevAppInternet.class.php @@ -56,7 +56,7 @@ class API_OAuth2_Form_DevAppInternet /** * - * @param Request $request + * @param Request $request * @return API_OAuth2_Form_DevApp */ public function __construct(Request $request) @@ -142,10 +142,10 @@ class API_OAuth2_Form_DevAppInternet /** * - * @param ClassMetadata $metadata + * @param ClassMetadata $metadata * @return API_OAuth2_Form_DevApp */ - static public function loadValidatorMetadata(ClassMetadata $metadata) + public static function loadValidatorMetadata(ClassMetadata $metadata) { $blank = array('message' => _('Cette valeur ne peut être vide')); $url = array('message' => _('Url non valide')); diff --git a/lib/classes/API/OAuth2/RefreshToken.class.php b/lib/classes/API/OAuth2/RefreshToken.class.php index 9a7e23683e..ddc368035b 100644 --- a/lib/classes/API/OAuth2/RefreshToken.class.php +++ b/lib/classes/API/OAuth2/RefreshToken.class.php @@ -93,8 +93,8 @@ class API_OAuth2_RefreshToken /** * - * @param appbox $appbox - * @param API_OAuth2_Account $account + * @param appbox $appbox + * @param API_OAuth2_Account $account * @return array */ public static function load_by_account(appbox &$appbox, API_OAuth2_Account $account) @@ -118,11 +118,11 @@ class API_OAuth2_RefreshToken /** * - * @param appbox $appbox - * @param API_OAuth2_Account $account - * @param int $expires - * @param type $refresh_token - * @param type $scope + * @param appbox $appbox + * @param API_OAuth2_Account $account + * @param int $expires + * @param type $refresh_token + * @param type $scope * @return API_OAuth2_RefreshToken */ public static function create(appbox &$appbox, API_OAuth2_Account $account, $expires, $refresh_token, $scope) diff --git a/lib/classes/API/OAuth2/Token.class.php b/lib/classes/API/OAuth2/Token.class.php index 2376f42c82..142ca62c3f 100644 --- a/lib/classes/API/OAuth2/Token.class.php +++ b/lib/classes/API/OAuth2/Token.class.php @@ -59,8 +59,8 @@ class API_OAuth2_Token /** * - * @param appbox $appbox - * @param API_OAuth2_Account $account + * @param appbox $appbox + * @param API_OAuth2_Account $account * @return API_OAuth2_Token */ public function __construct(appbox &$appbox, API_OAuth2_Account &$account) @@ -99,7 +99,7 @@ class API_OAuth2_Token /** * - * @param string $oauth_token + * @param string $oauth_token * @return API_OAuth2_Token */ public function set_value($oauth_token) @@ -132,7 +132,7 @@ class API_OAuth2_Token /** * - * @param int $session_id + * @param int $session_id * @return API_OAuth2_Token */ public function set_session_id($session_id) @@ -165,7 +165,7 @@ class API_OAuth2_Token /** * - * @param int $expires + * @param int $expires * @return API_OAuth2_Token */ public function set_expires($expires) @@ -266,8 +266,8 @@ class API_OAuth2_Token /** * - * @param appbox $appbox - * @param type $oauth_token + * @param appbox $appbox + * @param type $oauth_token * @return API_OAuth2_Token */ public static function load_by_oauth_token(appbox &$appbox, $oauth_token) @@ -293,9 +293,9 @@ class API_OAuth2_Token /** * - * @param appbox $appbox - * @param API_OAuth2_Account $account - * @param string $scope + * @param appbox $appbox + * @param API_OAuth2_Account $account + * @param string $scope * @return API_OAuth2_Token */ public static function create(appbox &$appbox, API_OAuth2_Account &$account, $scope = null) diff --git a/lib/classes/API/V1/Log.class.php b/lib/classes/API/V1/Log.class.php index 1c1db4519d..b0050aae31 100644 --- a/lib/classes/API/V1/Log.class.php +++ b/lib/classes/API/V1/Log.class.php @@ -6,7 +6,6 @@ */ use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; class API_V1_Log { @@ -83,8 +82,8 @@ class API_V1_Log /** * - * @param appbox $appbox - * @param Request $request + * @param appbox $appbox + * @param Request $request * @param API_OAuth2_Account $account */ public function __construct(appbox &$appbox, $log_id) diff --git a/lib/classes/API/V1/adapter.class.php b/lib/classes/API/V1/adapter.class.php index f5ba1cf4f8..d7b6de281d 100644 --- a/lib/classes/API/V1/adapter.class.php +++ b/lib/classes/API/V1/adapter.class.php @@ -43,8 +43,8 @@ class API_V1_adapter extends API_V1_Abstract /** * API constructor * - * @param string $auth_token Authentification Token - * @param appbox $appbox Appbox object + * @param string $auth_token Authentification Token + * @param appbox $appbox Appbox object * @return API_V1_adapter */ public function __construct($auth_token, appbox &$appbox, Alchemy\Phrasea\Core $core) @@ -57,8 +57,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve http status error code according to the message - * @param Request $request - * @param string $error + * @param Request $request + * @param string $error * @return API_V1_result ` */ public function get_error_message(Request $request, $error, $message) @@ -71,8 +71,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve http status error message according to the http status error code - * @param Request $request - * @param int $code + * @param Request $request + * @param int $code * @return API_V1_result */ public function get_error_code(Request $request, $code) @@ -96,7 +96,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Get a list of phraseanet tasks * - * @param \Silex\Application $app The API silex application + * @param \Silex\Application $app The API silex application * @return \API_V1_result */ public function get_task_list(Application $app) @@ -126,8 +126,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Get informations about an identified task * - * @param \Silex\Application $app The API silex application - * @param type $task_id + * @param \Silex\Application $app The API silex application + * @param type $task_id * @return \API_V1_result */ public function get_task(Application $app, $taskId) @@ -162,8 +162,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Start a specified task * - * @param \Silex\Application $app The API silex application - * @param type $task_id The task id + * @param \Silex\Application $app The API silex application + * @param type $task_id The task id * @return \API_V1_result */ public function start_task(Application $app, $taskId) @@ -194,8 +194,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Stop a specified task * - * @param \Silex\Application $app The API silex application - * @param type $task_id The task id + * @param \Silex\Application $app The API silex application + * @param type $task_id The task id * @return \API_V1_result */ public function stop_task(Application $app, $taskId) @@ -228,8 +228,8 @@ class API_V1_adapter extends API_V1_Abstract * - name * - autostart * - * @param \Silex\Application $app Silex application - * @param type $task_id the task id + * @param \Silex\Application $app Silex application + * @param type $task_id the task id * @return \API_V1_result * @throws \Exception_InvalidArgument */ @@ -280,7 +280,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Get Information the cache system used by the instance * - * @param \Silex\Application $app the silex application + * @param \Silex\Application $app the silex application * @return array */ protected function get_cache_info(Application $app) @@ -314,7 +314,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Provide information about phraseanet configuration * - * @param \Silex\Application $app the silex application + * @param \Silex\Application $app the silex application * @return array */ protected function get_config_info(Application $app) @@ -339,7 +339,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Provide phraseanet global values - * @param \Silex\Application $app the silex application + * @param \Silex\Application $app the silex application * @return array */ protected function get_gv_info(Application $app) @@ -511,7 +511,7 @@ class API_V1_adapter extends API_V1_Abstract * - global values informations * - configuration informations * - * @param \Silex\Application $app the silex application + * @param \Silex\Application $app the silex application * @return \API_V1_result */ public function get_phraseanet_monitor(Application $app) @@ -530,8 +530,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the databoxes * - * @param Request $request - * @param string $response_type + * @param Request $request + * @param string $response_type * @return API_V1_result */ public function get_databoxes(Request $request) @@ -546,9 +546,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the collections of a databox * - * @param Request $request - * @param int $databox_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param string $response_type * @return API_V1_result */ public function get_databox_collections(Request $request, $databox_id) @@ -569,9 +569,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the status of a databox * - * @param Request $request - * @param int $databox_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param string $response_type * @return API_V1_result */ public function get_databox_status(Request $request, $databox_id) @@ -593,9 +593,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the metadatas of a databox * - * @param Request $request - * @param int $databox_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param string $response_type * @return API_V1_result */ public function get_databox_metadatas(Request $request, $databox_id) @@ -618,9 +618,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the terms of use of a databox * - * @param Request $request - * @param int $databox_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param string $response_type * @return API_V1_result */ public function get_databox_terms(Request $request, $databox_id) @@ -792,9 +792,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the results of a records search * - * @param Request $request - * @param int $databox_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param string $response_type * @return API_V1_result */ public function search_records(Request $request) @@ -924,10 +924,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the baskets where the record is in * - * @param Request $request - * @param int $databox_id - * @param int $record_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param int $record_id + * @param string $response_type * @return API_V1_result */ public function get_record_related(Request $request, $databox_id, $record_id) @@ -952,10 +952,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the record metadatas * - * @param Request $request - * @param int $databox_id - * @param int $record_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param int $record_id + * @param string $response_type * @return API_V1_result */ public function get_record_metadatas(Request $request, $databox_id, $record_id) @@ -976,10 +976,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the record status * - * @param Request $request - * @param int $databox_id - * @param int $record_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param int $record_id + * @param string $response_type * @return API_V1_result */ public function get_record_status(Request $request, $databox_id, $record_id) @@ -1006,10 +1006,10 @@ class API_V1_adapter extends API_V1_Abstract /** * Get an API_V1_result containing the record embed files * - * @param Request $request - * @param int $databox_id - * @param int $record_id - * @param string $response_type + * @param Request $request + * @param int $databox_id + * @param int $record_id + * @param string $response_type * @return API_V1_result */ public function get_record_embed(Request $request, $databox_id, $record_id) @@ -1106,9 +1106,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Move a record to another collection * - * @param Request $request - * @param int $databox_id - * @param int $record_id + * @param Request $request + * @param int $databox_id + * @param int $record_id * @return API_V1_result */ public function set_record_collection(Request $request, $databox_id, $record_id) @@ -1132,9 +1132,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Return detailed informations about one record * - * @param Request $request - * @param int $databox_id - * @param int $record_id + * @param Request $request + * @param int $databox_id + * @param int $record_id * @return API_V1_result */ public function get_record(Request $request, $databox_id, $record_id) @@ -1157,8 +1157,8 @@ class API_V1_adapter extends API_V1_Abstract * @todo * * @param Request $request - * @param int $databox_id - * @param int $record_id + * @param int $databox_id + * @param int $record_id */ public function add_record_tobasket(Request $request, $databox_id, $record_id) { @@ -1168,7 +1168,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Return the baskets list of the authenticated user * - * @param Request $request + * @param Request $request * @return API_V1_result */ public function search_baskets(Request $request) @@ -1185,7 +1185,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Return a baskets list * - * @param int $usr_id + * @param int $usr_id * @return array */ protected function list_baskets($usr_id) @@ -1207,7 +1207,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Create a new basket * - * @param Request $request + * @param Request $request * @return API_V1_result */ public function create_basket(Request $request) @@ -1240,8 +1240,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Delete a basket * - * @param Request $request - * @param int $basket_id + * @param Request $request + * @param int $basket_id * @return array */ public function delete_basket(Request $request, $basket_id) @@ -1264,8 +1264,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve a basket * - * @param Request $request - * @param int $basket_id + * @param Request $request + * @param int $basket_id * @return API_V1_result */ public function get_basket(Request $request, $basket_id) @@ -1293,7 +1293,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve elements of one basket * - * @param \Entities\Basket $Basket + * @param \Entities\Basket $Basket * @return type */ protected function list_basket_content(\Entities\Basket $Basket) @@ -1312,7 +1312,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about a basket element * - * @param \Entities\BasketElement $basket_element + * @param \Entities\BasketElement $basket_element * @return type */ protected function list_basket_element(\Entities\BasketElement $basket_element) @@ -1357,8 +1357,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Change the name of one basket * - * @param Request $request - * @param int $basket_id + * @param Request $request + * @param int $basket_id * @return API_V1_result */ public function set_basket_title(Request $request, $basket_id) @@ -1393,8 +1393,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Change the description of one basket * - * @param Request $request - * @param type $basket_id + * @param Request $request + * @param type $basket_id * @return API_V1_result */ public function set_basket_description(Request $request, $basket_id) @@ -1429,8 +1429,8 @@ class API_V1_adapter extends API_V1_Abstract /** * List all avalaible feeds * - * @param Request $request - * @param User_Adapter $user + * @param Request $request + * @param User_Adapter $user * @return API_V1_result */ public function search_publications(Request $request, User_Adapter &$user) @@ -1453,7 +1453,7 @@ class API_V1_adapter extends API_V1_Abstract * @todo * * @param Request $request - * @param int $publication_id + * @param int $publication_id */ public function remove_publications(Request $request, $publication_id) { @@ -1463,9 +1463,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve one feed * - * @param Request $request - * @param int $publication_id - * @param User_Adapter $user + * @param Request $request + * @param int $publication_id + * @param User_Adapter $user * @return API_V1_result */ public function get_publication(Request $request, $publication_id, User_Adapter &$user) @@ -1494,8 +1494,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about one feed * - * @param Feed_Adapter $feed - * @param type $user + * @param Feed_Adapter $feed + * @param type $user * @return array */ protected function list_publication(Feed_Adapter $feed, $user) @@ -1516,9 +1516,9 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve all entries of one feed * - * @param Feed_Adapter $feed - * @param int $offset_start - * @param int $how_many + * @param Feed_Adapter $feed + * @param int $offset_start + * @param int $how_many * @return array */ protected function list_publications_entries(Feed_Adapter $feed, $offset_start = 0, $how_many = 5) @@ -1540,7 +1540,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled information about one feed entry * - * @param Feed_Entry_Adapter $entry + * @param Feed_Entry_Adapter $entry * @return array */ protected function list_publication_entry(Feed_Entry_Adapter $entry) @@ -1564,7 +1564,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about one feed entry item * - * @param Feed_Entry_Item $item + * @param Feed_Entry_Item $item * @return array */ protected function list_publication_entry_item(Feed_Entry_Item $item) @@ -1589,7 +1589,7 @@ class API_V1_adapter extends API_V1_Abstract /** * @todo * @param Request $request - * @param int $usr_id + * @param int $usr_id */ public function get_user_acces(Request $request, $usr_id) { @@ -1608,7 +1608,7 @@ class API_V1_adapter extends API_V1_Abstract /** * @retrieve detailled informations about one suddef * - * @param media_subdef $media + * @param media_subdef $media * @return array */ protected function list_embedable_media(media_subdef &$media, registryInterface &$registry) @@ -1633,8 +1633,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled information about one permalink * - * @param media_Permalink_Adapter $permalink - * @param registryInterface $registry + * @param media_Permalink_Adapter $permalink + * @param registryInterface $registry * @return type */ protected function list_permalink(media_Permalink_Adapter &$permalink, registryInterface &$registry) @@ -1653,8 +1653,8 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled information about one status * - * @param databox $databox - * @param string $status + * @param databox $databox + * @param string $status * @return array */ protected function list_record_status(databox $databox, $status) @@ -1671,7 +1671,7 @@ class API_V1_adapter extends API_V1_Abstract /** * List all field about a specified caption * - * @param caption_record $caption + * @param caption_record $caption * @return array */ protected function list_record_caption(caption_record $caption) @@ -1689,7 +1689,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve information about a caption field * - * @param caption_field $field + * @param caption_field $field * @return array */ protected function list_record_caption_field(caption_Field_Value $value, caption_field $field) @@ -1698,6 +1698,7 @@ class API_V1_adapter extends API_V1_Abstract * @todo ajouter une option pour avoir les values serialisées * dans un cas multi */ + return array( 'meta_id' => $value->getId(), 'meta_structure_id' => $field->get_meta_struct_id(), @@ -1709,7 +1710,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retirve information about one basket * - * @param \Entities\Basket $basket + * @param \Entities\Basket $basket * @return array */ protected function list_basket(\Entities\Basket $basket) @@ -1765,7 +1766,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about one record * - * @param record_adapter $record + * @param record_adapter $record * @return array */ protected function list_record(record_adapter $record) @@ -1807,7 +1808,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve CGU's for the specified databox * - * @param databox $databox + * @param databox $databox * @return array */ protected function list_databox_terms(databox $databox) @@ -1822,7 +1823,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about one databox - * @param databox $databox + * @param databox $databox * @return array */ protected function list_databox(databox $databox) @@ -1839,7 +1840,7 @@ class API_V1_adapter extends API_V1_Abstract /** * List all available collections for a specified databox * - * @param databox $databox + * @param databox $databox * @return array */ protected function list_databox_collections(databox $databox) @@ -1856,7 +1857,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve detailled informations about one collection * - * @param collection $collection + * @param collection $collection * @return array */ protected function list_collection(collection $collection) @@ -1874,7 +1875,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retrieve informations for a list of status * - * @param array $status + * @param array $status * @return array */ protected function list_databox_status(array $status) @@ -1898,7 +1899,7 @@ class API_V1_adapter extends API_V1_Abstract /** * List all metadatas field using a databox meta structure * - * @param databox_descriptionStructure $meta_struct + * @param databox_descriptionStructure $meta_struct * @return array */ protected function list_databox_metadatas_fields(databox_descriptionStructure $meta_struct) @@ -1914,7 +1915,7 @@ class API_V1_adapter extends API_V1_Abstract /** * Retirve informations about one databox metadata field * - * @param databox_field $databox_field + * @param databox_field $databox_field * @return array */ protected function list_databox_metadata_field_properties(databox_field $databox_field) diff --git a/lib/classes/API/V1/result.class.php b/lib/classes/API/V1/result.class.php index b7da890ab6..ed19d07606 100644 --- a/lib/classes/API/V1/result.class.php +++ b/lib/classes/API/V1/result.class.php @@ -97,9 +97,9 @@ class API_V1_result /** * API v1 Result constructor * - * @param Request $request - * @param API_V1_adapter $api - * @param string $response_type One of the API_V1_result 'FORMAT_*' constants + * @param Request $request + * @param API_V1_adapter $api + * @param string $response_type One of the API_V1_result 'FORMAT_*' constants * @return API_V1_result */ public function __construct(Request $request, API_V1_adapter $api) @@ -147,7 +147,7 @@ class API_V1_result * If no datas provided (aka empty array), a stdClass if set, * so the serialized datas will be objects * - * @param array $datas + * @param array $datas * @return API_V1_result */ public function set_datas(array $datas) @@ -237,7 +237,7 @@ class API_V1_result * Set the API_V1_result http_code, error_type, error_message and error_details * with the appropriate datas * - * @param string $const + * @param string $const * @return API_V1_result */ public function set_error_message($const, $message) @@ -287,7 +287,7 @@ class API_V1_result * Set the API_V1_result http_code, error_message and error_details * with the appropriate datas * - * @param string $const + * @param string $const * @return API_V1_result */ public function set_error_code($code) diff --git a/lib/classes/Bridge/Account.class.php b/lib/classes/Bridge/Account.class.php index 44f5393d3a..548cb43c5a 100644 --- a/lib/classes/Bridge/Account.class.php +++ b/lib/classes/Bridge/Account.class.php @@ -73,9 +73,9 @@ class Bridge_Account /** * - * @param appbox $appbox - * @param Bridge_Api $api - * @param int $id + * @param appbox $appbox + * @param Bridge_Api $api + * @param int $id * @return Bridge_Account */ public function __construct(appbox &$appbox, Bridge_Api &$api, $id) @@ -183,7 +183,7 @@ class Bridge_Account /** * - * @param string $name + * @param string $name * @return Bridge_Account */ public function set_name($name) @@ -231,8 +231,8 @@ class Bridge_Account /** * - * @param appbox $appbox - * @param int $account_id + * @param appbox $appbox + * @param int $account_id * @return Bridge_Account */ public static function load_account(appbox &$appbox, $account_id) @@ -255,10 +255,10 @@ class Bridge_Account /** * - * @param appbox $appbox - * @param Bridge_Api $api - * @param User_Adapter $user - * @param string $distant_id + * @param appbox $appbox + * @param Bridge_Api $api + * @param User_Adapter $user + * @param string $distant_id * @return Bridge_Account */ public static function load_account_from_distant_id(appbox $appbox, Bridge_Api $api, User_Adapter $user, $distant_id) @@ -285,9 +285,9 @@ class Bridge_Account /** * - * @param appbox $appbox - * @param Bridge_Api $api - * @param int $quantity + * @param appbox $appbox + * @param Bridge_Api $api + * @param int $quantity * @return Bridge_Account */ public static function get_accounts_by_api(appbox &$appbox, Bridge_Api &$api, $quantity = 50) @@ -311,8 +311,8 @@ class Bridge_Account /** * - * @param appbox $appbox - * @param user_adapter $user + * @param appbox $appbox + * @param user_adapter $user * @return Bridge_Account */ public static function get_accounts_by_user(appbox &$appbox, user_adapter &$user) @@ -345,11 +345,11 @@ class Bridge_Account /** * - * @param appbox $appbox - * @param Bridge_Api $api - * @param User_Adapter $user - * @param string $dist_id - * @param string $name + * @param appbox $appbox + * @param Bridge_Api $api + * @param User_Adapter $user + * @param string $dist_id + * @param string $name * @return Bridge_Account */ public static function create(appbox &$appbox, Bridge_Api &$api, User_Adapter &$user, $dist_id, $name) diff --git a/lib/classes/Bridge/AccountSettings.class.php b/lib/classes/Bridge/AccountSettings.class.php index a75ef73831..e60902804f 100644 --- a/lib/classes/Bridge/AccountSettings.class.php +++ b/lib/classes/Bridge/AccountSettings.class.php @@ -31,8 +31,8 @@ class Bridge_AccountSettings /** * - * @param appbox $appbox - * @param Bridge_Account $account + * @param appbox $appbox + * @param Bridge_Account $account * @return Bridge_AccountSettings */ public function __construct(appbox &$appbox, Bridge_Account &$account) @@ -45,8 +45,8 @@ class Bridge_AccountSettings /** * - * @param string $key - * @param mixed $default_value + * @param string $key + * @param mixed $default_value * @return mixed */ public function get($key, $default_value = null) @@ -66,8 +66,8 @@ class Bridge_AccountSettings /** * - * @param string $key - * @param string $value + * @param string $key + * @param string $value * @return string */ public function set($key, $value) @@ -90,7 +90,7 @@ class Bridge_AccountSettings /** * - * @param string $key + * @param string $key * @return string */ public function delete($key) diff --git a/lib/classes/Bridge/Api.class.php b/lib/classes/Bridge/Api.class.php index 4db9357a6f..2d3e362686 100644 --- a/lib/classes/Bridge/Api.class.php +++ b/lib/classes/Bridge/Api.class.php @@ -57,8 +57,8 @@ class Bridge_Api /** * - * @param appbox $appbox - * @param int $id + * @param appbox $appbox + * @param int $id * @return Bridge_Api */ public function __construct(appbox &$appbox, $id) @@ -164,9 +164,9 @@ class Bridge_Api /** * - * @param string $type - * @param int $offset_start - * @param int $quantity + * @param string $type + * @param int $offset_start + * @param int $quantity * @return array */ public function list_elements($type, $offset_start = 0, $quantity = 10) @@ -180,9 +180,9 @@ class Bridge_Api /** * - * @param string $type - * @param int $offset_start - * @param int $quantity + * @param string $type + * @param int $offset_start + * @param int $quantity * @return array */ public function list_containers($type, $offset_start = 0, $quantity = 10) @@ -196,9 +196,9 @@ class Bridge_Api /** * - * @param string $object - * @param string $object_id - * @param Request $request + * @param string $object + * @param string $object_id + * @param Request $request * @return Bridge_Api_Interface */ public function update_element($object, $object_id, Array $datas) @@ -212,8 +212,8 @@ class Bridge_Api /** * - * @param string $container_type - * @param Request $request + * @param string $container_type + * @param Request $request * @return Bridge_Api_ContainerInterface */ public function create_container($container_type, Request $request) @@ -227,10 +227,10 @@ class Bridge_Api /** * - * @param string $element_type - * @param string $element_id - * @param string $destination - * @param string $container_id + * @param string $element_type + * @param string $element_id + * @param string $destination + * @param string $container_id * @return Bridge_Api_ContainerInterface */ public function add_element_to_container($element_type, $element_id, $destination, $container_id) @@ -244,8 +244,8 @@ class Bridge_Api /** * - * @param string $object - * @param string $object_id + * @param string $object + * @param string $object_id * @return Void */ public function delete_object($object, $object_id) @@ -272,8 +272,8 @@ class Bridge_Api /** * - * @param type $element_id - * @param type $type + * @param type $element_id + * @param type $type * @return Bridge_Api_ElementInterface */ public function get_element_from_id($element_id, $type) @@ -287,8 +287,8 @@ class Bridge_Api /** * - * @param int $element_id - * @param string $type + * @param int $element_id + * @param string $type * @return Bridge_Api_ContainerInterface */ public function get_container_from_id($element_id, $type) @@ -315,7 +315,7 @@ class Bridge_Api /** * - * @param string $element_id + * @param string $element_id * @return string */ public function get_element_status(Bridge_Element $element) @@ -329,7 +329,7 @@ class Bridge_Api /** * - * @param string $status + * @param string $status * @return string */ public function map_connector_to_element_status($status) @@ -343,7 +343,7 @@ class Bridge_Api /** * - * @param string $connector_status + * @param string $connector_status * @return string */ public function get_error_message_from_status($connector_status) @@ -357,9 +357,9 @@ class Bridge_Api /** * - * @param record_adapter $record - * @param array $options specific option, regarding the connector - * @return string The distant_id of the created element + * @param record_adapter $record + * @param array $options specific option, regarding the connector + * @return string The distant_id of the created element */ public function upload(record_adapter &$record, array $options = array()) { @@ -418,7 +418,7 @@ class Bridge_Api /** * - * @param Closure $action + * @param Closure $action * @return mixed */ protected function execute_action(Closure $action) @@ -454,8 +454,8 @@ class Bridge_Api /** * - * @param registryInterface $registry - * @param string $api_name + * @param registryInterface $registry + * @param string $api_name * @return string */ public static function generate_callback_url(registryInterface $registry, $api_name) @@ -469,8 +469,8 @@ class Bridge_Api /** * - * @param registryInterface $registry - * @param string $api_name + * @param registryInterface $registry + * @param string $api_name * @return string */ public static function generate_login_url(registryInterface $registry, $api_name) @@ -484,8 +484,8 @@ class Bridge_Api /** * - * @param registryInterface $registry - * @param string $name + * @param registryInterface $registry + * @param string $name * @return Bridge_Api_Interface */ public static function get_connector_by_name(registryInterface $registry, $name) @@ -505,8 +505,8 @@ class Bridge_Api /** * - * @param appbox $appbox - * @param string $name + * @param appbox $appbox + * @param string $name * @return Bridge_Api */ public static function get_by_api_name(appbox $appbox, $name) @@ -527,7 +527,7 @@ class Bridge_Api /** * - * @param appbox $appbox + * @param appbox $appbox * @return Bridge_Api */ public static function get_availables(appbox &$appbox) @@ -553,8 +553,8 @@ class Bridge_Api /** * - * @param appbox $appbox - * @param string $name + * @param appbox $appbox + * @param string $name * @return Bridge_Api */ public static function create(appbox &$appbox, $name) diff --git a/lib/classes/Bridge/Api/Abstract.class.php b/lib/classes/Bridge/Api/Abstract.class.php index b8624f3950..47c9e1cefd 100644 --- a/lib/classes/Bridge/Api/Abstract.class.php +++ b/lib/classes/Bridge/Api/Abstract.class.php @@ -31,8 +31,8 @@ abstract class Bridge_Api_Abstract /** * - * @param registryInterface $registry - * @param Bridge_Api_Auth_Interface $auth + * @param registryInterface $registry + * @param Bridge_Api_Auth_Interface $auth * @return Bridge_Api_Abstract */ public function __construct(registryInterface $registry, Bridge_Api_Auth_Interface $auth) @@ -47,7 +47,7 @@ abstract class Bridge_Api_Abstract /** * - * @param Bridge_AccountSettings $settings + * @param Bridge_AccountSettings $settings * @return Bridge_Api_Abstract */ public function set_auth_settings(Bridge_AccountSettings &$settings) @@ -117,7 +117,7 @@ abstract class Bridge_Api_Abstract /** * - * @param string $locale + * @param string $locale * @return Bridge_Api_Abstract */ public function set_locale($locale) @@ -138,7 +138,7 @@ abstract class Bridge_Api_Abstract /** * - * @param type $object_id + * @param type $object_id * @return boolean */ public function is_valid_object_id($object_id) @@ -151,7 +151,7 @@ abstract class Bridge_Api_Abstract * This allows use to change the exception object. * For instance, you can set it to a Bridge_Exception_ActionAuthNeedReconnect * - * @param Exception $e + * @param Exception $e * @return Void */ public function handle_exception(Exception &$e) diff --git a/lib/classes/Bridge/Api/AbstractCollection.class.php b/lib/classes/Bridge/Api/AbstractCollection.class.php index f2287f6496..9951f19d8a 100644 --- a/lib/classes/Bridge/Api/AbstractCollection.class.php +++ b/lib/classes/Bridge/Api/AbstractCollection.class.php @@ -74,7 +74,7 @@ abstract class Bridge_Api_AbstractCollection /** * - * @param int $items_per_page + * @param int $items_per_page * @return Bridge_Api_AbstractCollection */ public function set_items_per_page($items_per_page) @@ -95,7 +95,7 @@ abstract class Bridge_Api_AbstractCollection /** * - * @param int $current_page + * @param int $current_page * @return Bridge_Api_AbstractCollection */ public function set_current_page($current_page) @@ -117,7 +117,7 @@ abstract class Bridge_Api_AbstractCollection /** * - * @param int $total_page + * @param int $total_page * @return Bridge_Api_AbstractCollection */ public function set_total_page($total_page) diff --git a/lib/classes/Bridge/Api/Auth/Abstract.class.php b/lib/classes/Bridge/Api/Auth/Abstract.class.php index 8c66023de7..ed792a9a84 100644 --- a/lib/classes/Bridge/Api/Auth/Abstract.class.php +++ b/lib/classes/Bridge/Api/Auth/Abstract.class.php @@ -25,7 +25,7 @@ class Bridge_Api_Auth_Abstract /** * - * @param Bridge_AccountSettings $settings + * @param Bridge_AccountSettings $settings * @return Bridge_Api_Auth_Abstract */ public function set_settings(Bridge_AccountSettings $settings) diff --git a/lib/classes/Bridge/Api/Auth/Flickr.class.php b/lib/classes/Bridge/Api/Auth/Flickr.class.php index d5591f27b8..dba5f54eea 100644 --- a/lib/classes/Bridge/Api/Auth/Flickr.class.php +++ b/lib/classes/Bridge/Api/Auth/Flickr.class.php @@ -68,7 +68,7 @@ class Bridge_Api_Auth_Flickr extends Bridge_Api_Auth_Abstract implements Bridge_ /** * - * @param string $param + * @param string $param * @return Array */ public function connect($param) @@ -124,7 +124,7 @@ class Bridge_Api_Auth_Flickr extends Bridge_Api_Auth_Abstract implements Bridge_ /** * - * @param array $parameters + * @param array $parameters * @return Bridge_Api_Auth_Flickr */ public function set_parameters(Array $parameters) diff --git a/lib/classes/Bridge/Api/Auth/OAuth2.class.php b/lib/classes/Bridge/Api/Auth/OAuth2.class.php index b0a49dbf60..cc75bd3e16 100644 --- a/lib/classes/Bridge/Api/Auth/OAuth2.class.php +++ b/lib/classes/Bridge/Api/Auth/OAuth2.class.php @@ -70,7 +70,7 @@ class Bridge_Api_Auth_OAuth2 extends Bridge_Api_Auth_Abstract implements Bridge_ /** * - * @param string $request_token + * @param string $request_token * @return Array */ public function connect($request_token) @@ -148,7 +148,7 @@ class Bridge_Api_Auth_OAuth2 extends Bridge_Api_Auth_Abstract implements Bridge_ /** * - * @param array $parameters + * @param array $parameters * @return Bridge_Api_Auth_OAuth2 */ public function set_parameters(Array $parameters) diff --git a/lib/classes/Bridge/Api/Auth/Youtube.class.php b/lib/classes/Bridge/Api/Auth/Youtube.class.php index 10d50cd0dd..3d40c0715a 100644 --- a/lib/classes/Bridge/Api/Auth/Youtube.class.php +++ b/lib/classes/Bridge/Api/Auth/Youtube.class.php @@ -19,7 +19,7 @@ class Bridge_Api_Auth_Youtube extends Bridge_Api_Auth_OAuth2 /** * Implements OAuth2.0 youtube specifications - * @param array $supp_parameters + * @param array $supp_parameters * @return string */ public function get_auth_url(array $supp_parameters = array()) diff --git a/lib/classes/Bridge/Api/ContainerCollection.class.php b/lib/classes/Bridge/Api/ContainerCollection.class.php index 9aba100e2a..66ee7065d0 100644 --- a/lib/classes/Bridge/Api/ContainerCollection.class.php +++ b/lib/classes/Bridge/Api/ContainerCollection.class.php @@ -20,7 +20,7 @@ class Bridge_Api_ContainerCollection extends Bridge_Api_AbstractCollection /** * - * @param Bridge_Api_ContainerInterface $container + * @param Bridge_Api_ContainerInterface $container * @return Bridge_Api_ContainerCollection */ public function add_element(Bridge_Api_ContainerInterface $container) diff --git a/lib/classes/Bridge/Api/Dailymotion.class.php b/lib/classes/Bridge/Api/Dailymotion.class.php index fac7231f97..85eb5f21d1 100644 --- a/lib/classes/Bridge/Api/Dailymotion.class.php +++ b/lib/classes/Bridge/Api/Dailymotion.class.php @@ -197,7 +197,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $type + * @param string $type * @return string */ public function get_object_class_from_type($type) @@ -219,9 +219,9 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I * @todo Pagination system * * @see http://www.dailymotion.com/doc/api/advanced-api.html - * @param string $object - * @param int $offset_start - * @param int $quantity + * @param string $object + * @param int $offset_start + * @param int $quantity * @return Bridge_Api_ElementCollection */ public function list_elements($object, $offset_start = 0, $quantity = 10) @@ -275,9 +275,9 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * @Todo recupérer la thumbnail d'une playlist * - * @param string $object - * @param int $offset_start - * @param int $quantity + * @param string $object + * @param int $offset_start + * @param int $quantity * @return Bridge_Api_ContainerCollection */ public function list_containers($object, $offset_start = 0, $quantity = 10) @@ -335,9 +335,9 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * * @see http://www.dailymotion.com/doc/api/obj-video.html - * @param string $object - * @param string $object_id - * @param Request $request + * @param string $object + * @param string $object_id + * @param Request $request * @return Bridge_Api_Dailymotion */ public function update_element($object, $object_id, Array $datas) @@ -374,8 +374,8 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * * @see http://www.dailymotion.com/doc/api/obj-playlist.html - * @param string $container_type - * @param Request $request + * @param string $container_type + * @param Request $request * @return Bridge_Api_Dailymotion_Container */ public function create_container($container_type, Request $request) @@ -395,10 +395,10 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * @see http://www.dailymotion.com/doc/api/obj-playlist.html - * @param type $element_type - * @param type $element_id - * @param type $destination - * @param type $container_id + * @param type $element_type + * @param type $element_id + * @param type $destination + * @param type $container_id * @return Bridge_Api_Dailymotion_Container */ public function add_element_to_container($element_type, $element_id, $destination, $container_id) @@ -435,8 +435,8 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $object - * @param string $object_id + * @param string $object + * @param string $object_id * @return Void */ public function delete_object($object, $object_id) @@ -470,7 +470,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $element_id + * @param string $element_id * @return Array */ public function get_element_status(Bridge_Element $element) @@ -486,7 +486,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $status + * @param string $status * @return string */ public function map_connector_to_element_status($status) @@ -512,7 +512,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $connector_status + * @param string $connector_status * @return string */ public function get_error_message_from_status($connector_status) @@ -543,7 +543,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I * Set The exception to Bridge_Exception_ActionAuthNeedReconnect * if exception is instance of Zend_Gdata_App_HttpException and Http code 401 * - * @param Exception $e + * @param Exception $e * @return Void */ public function handle_exception(Exception &$e) @@ -559,8 +559,8 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param record_adapter $record - * @param array $options + * @param record_adapter $record + * @param array $options * @return string */ public function upload(record_adapter &$record, array $options = array()) @@ -581,8 +581,8 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $object - * @param string $element_id + * @param string $object + * @param string $element_id * @return Bridge_Api_Dailymotion_Element */ public function get_element_from_id($element_id, $object) @@ -619,8 +619,8 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $object - * @param string $element_id + * @param string $object + * @param string $element_id * @return Bridge_Api_Dailymotion_Container */ public function get_container_from_id($object, $element_id) @@ -637,6 +637,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * @todo Retieve thumb */ + return new Bridge_Api_Dailymotion_Container($entry, $object, ''); break; default: @@ -722,7 +723,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * @Override get_auth_url - * @param type $supp_params + * @param type $supp_params * @return type */ public function get_auth_url($supp_params = array()) @@ -734,7 +735,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $id + * @param string $id * @return Bridge_Api_ElementCollection */ protected function list_containers_content($object, $id, Array $fields = array(), $iteration = 0) @@ -766,9 +767,9 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param string $id - * @param string $playlistname - * @param string $username + * @param string $id + * @param string $playlistname + * @param string $username * @return string */ protected function get_url_playlist($id, $playlistname, $username) @@ -780,8 +781,8 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I * @todo implement in bridge_api°interface * * Check if data uploaded via the current connector is conform - * @param Request $request - * @param record_adapter $record + * @param Request $request + * @param record_adapter $record * @return array */ public function check_upload_constraints(Array $datas, record_adapter $record) @@ -798,8 +799,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I if ( ! isset($datas[$name]) || trim($datas[$name]) === '') { if ($required) $errors[$name . '_' . $key] = _("Ce champ est obligatoire"); - } - else { + } else { if ($length != 0 && mb_strlen($datas[$name]) > $length) $errors[$name . '_' . $key] = sprintf(_("Ce champ est trop long %s caracteres max"), $length); if ($length_min != 0 && mb_strlen($datas[$name]) < $length_min) @@ -825,8 +825,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I if ( ! isset($datas[$name]) || trim($datas[$name]) === '') { if ($required) $errors[$name] = _("Ce champ est obligatoire"); - } - else { + } else { if ($length != 0 && mb_strlen($datas[$name]) > $length) $errors[$name] = sprintf(_("Ce champ est trop long %s caracteres max"), $length); if ($length_min != 0 && mb_strlen($datas[$name]) < $length_min) @@ -841,7 +840,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * Returns dats needed for an uploaded record - * @param record_adapter $record + * @param record_adapter $record * @return array */ public function get_upload_datas(Request $request, record_adapter $record) @@ -860,7 +859,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * Returns datas needed for an uploaded record - * @param record_adapter $record + * @param record_adapter $record * @return array */ public function get_update_datas(Request $request) @@ -889,7 +888,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I /** * - * @param record_adapter $record + * @param record_adapter $record * @return array */ private function check_record_constraints(record_adapter $record) diff --git a/lib/classes/Bridge/Api/Dailymotion/Container.class.php b/lib/classes/Bridge/Api/Dailymotion/Container.class.php index 1e45077b7d..b1c99081ce 100644 --- a/lib/classes/Bridge/Api/Dailymotion/Container.class.php +++ b/lib/classes/Bridge/Api/Dailymotion/Container.class.php @@ -32,9 +32,9 @@ class Bridge_Api_Dailymotion_Container implements Bridge_Api_ContainerInterface /** * - * @param array $entry - * @param type $type - * @param type $thumbnail + * @param array $entry + * @param type $type + * @param type $thumbnail * @return Bridge_Api_Dailymotion_Container */ public function __construct(Array $entry, $type, $thumbnail = '', $url = '') @@ -85,8 +85,8 @@ class Bridge_Api_Dailymotion_Container implements Bridge_Api_ContainerInterface /** * - * @param type $width - * @param type $height + * @param type $width + * @param type $height * @return string */ public function get_thumbnail($width = 120, $height = 90) diff --git a/lib/classes/Bridge/Api/Dailymotion/Element.class.php b/lib/classes/Bridge/Api/Dailymotion/Element.class.php index c27ca92a04..6664542d71 100644 --- a/lib/classes/Bridge/Api/Dailymotion/Element.class.php +++ b/lib/classes/Bridge/Api/Dailymotion/Element.class.php @@ -26,8 +26,8 @@ class Bridge_Api_Dailymotion_Element implements Bridge_Api_ElementInterface /** * - * @param array $entry - * @param type $type + * @param array $entry + * @param type $type * @return Bridge_Api_Dailymotion_Element */ public function __construct(Array $entry, $type) diff --git a/lib/classes/Bridge/Api/ElementCollection.class.php b/lib/classes/Bridge/Api/ElementCollection.class.php index 13c954403e..4394192aab 100644 --- a/lib/classes/Bridge/Api/ElementCollection.class.php +++ b/lib/classes/Bridge/Api/ElementCollection.class.php @@ -20,7 +20,7 @@ class Bridge_Api_ElementCollection extends Bridge_Api_AbstractCollection /** * - * @param Bridge_Api_ElementInterface $element + * @param Bridge_Api_ElementInterface $element * @return Bridge_Api_ElementCollection */ public function add_element(Bridge_Api_ElementInterface $element) diff --git a/lib/classes/Bridge/Api/Flickr.class.php b/lib/classes/Bridge/Api/Flickr.class.php index 30b461ac59..ece4c3e6b4 100644 --- a/lib/classes/Bridge/Api/Flickr.class.php +++ b/lib/classes/Bridge/Api/Flickr.class.php @@ -161,8 +161,8 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param type $element_id - * @param type $object + * @param type $element_id + * @param type $object * @return type */ public function get_element_from_id($element_id, $object) @@ -189,8 +189,8 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param type $object - * @param type $element_id + * @param type $object + * @param type $element_id * @return type */ public function get_container_from_id($object, $element_id) @@ -261,9 +261,9 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param string $object - * @param string $object_id - * @param Request $request + * @param string $object + * @param string $object_id + * @param Request $request * @return Void */ public function update_element($object, $object_id, Array $datas) @@ -298,8 +298,8 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param string $container_type - * @param Request $request + * @param string $container_type + * @param Request $request * @return Bridge_Api_Flickr_Container */ public function create_container($container_type, Request $request) @@ -337,10 +337,10 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param string $element_type - * @param string $element_id - * @param string $destination - * @param string $container_id + * @param string $element_type + * @param string $element_id + * @param string $destination + * @param string $container_id * @return Void */ public function add_element_to_container($element_type, $element_id, $destination, $container_id) @@ -376,8 +376,8 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param string $object - * @param string $object_id + * @param string $object + * @param string $object_id * @return Void */ public function delete_object($object, $object_id) @@ -409,9 +409,9 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param string $type - * @param int $offset_start - * @param int $quantity + * @param string $type + * @param int $offset_start + * @param int $quantity * @return Bridge_Api_ElementCollection */ public function list_elements($type, $offset_start = 0, $quantity = 10) @@ -507,9 +507,9 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param record_adapter $record - * @param array $options - * @return string The new distant Id + * @param record_adapter $record + * @param array $options + * @return string The new distant Id */ public function upload(record_adapter &$record, Array $options = array()) { @@ -576,7 +576,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param string $type + * @param string $type * @return string */ public function get_object_class_from_type($type) @@ -691,8 +691,8 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * Not implmented - * @param array $datas - * @param record_adapter $record + * @param array $datas + * @param record_adapter $record * @return array */ public function check_upload_constraints(array $datas, record_adapter $record) @@ -707,8 +707,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf if ( ! isset($datas[$name]) || trim($datas[$name]) === '') { if ($required) $errors[$name . '_' . $key] = _("Ce champ est obligatoire"); - } - elseif ($length !== 0) { + } elseif ($length !== 0) { if (mb_strlen($datas[$name]) > $length) $errors[$name . '_' . $key] = sprintf(_("Ce champ est trop long %s caracteres max"), $length); } @@ -730,8 +729,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf if ( ! isset($datas[$name]) || trim($datas[$name]) === '') { if ($required) $errors[$name] = _("Ce champ est obligatoire"); - } - elseif ($length !== 0) { + } elseif ($length !== 0) { if (mb_strlen($datas[$name]) > $length) $errors[$name] = sprintf(_("Ce champ est trop long %s caracteres max"), $length); } @@ -744,7 +742,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * Returns datas needed for an uploaded record - * @param record_adapter $record + * @param record_adapter $record * @return array */ public function get_update_datas(Request $request) @@ -759,7 +757,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * Returns datas needed for an uploaded record - * @param record_adapter $record + * @param record_adapter $record * @return array */ public function get_upload_datas(Request $request, record_adapter $record) @@ -812,7 +810,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf /** * - * @param record_adapter $record + * @param record_adapter $record * @return array */ private function check_record_constraints(record_adapter $record) diff --git a/lib/classes/Bridge/Api/Flickr/Container.class.php b/lib/classes/Bridge/Api/Flickr/Container.class.php index 6e98838cac..787b40e3c7 100644 --- a/lib/classes/Bridge/Api/Flickr/Container.class.php +++ b/lib/classes/Bridge/Api/Flickr/Container.class.php @@ -43,10 +43,10 @@ class Bridge_Api_Flickr_Container implements Bridge_Api_ContainerInterface /** * - * @param SimpleXMLElement $entry - * @param string $user_id - * @param string $type - * @param string $thumbnail + * @param SimpleXMLElement $entry + * @param string $user_id + * @param string $type + * @param string $thumbnail * @return Bridge_Api_Flickr_Container */ public function __construct(SimpleXMLElement $entry, $user_id, $type, $thumbnail) diff --git a/lib/classes/Bridge/Api/Flickr/Element.class.php b/lib/classes/Bridge/Api/Flickr/Element.class.php index f71f65f906..13815948d8 100644 --- a/lib/classes/Bridge/Api/Flickr/Element.class.php +++ b/lib/classes/Bridge/Api/Flickr/Element.class.php @@ -33,9 +33,9 @@ class Bridge_Api_Flickr_Element implements Bridge_Api_ElementInterface /** * - * @param SimpleXMLElement $entry - * @param string $user_id - * @param string $type + * @param SimpleXMLElement $entry + * @param string $user_id + * @param string $type * @return Bridge_Api_Flickr_Element */ public function __construct(SimpleXMLElement $entry, $user_id, $type, $entry_from_list = true) @@ -107,9 +107,9 @@ class Bridge_Api_Flickr_Element implements Bridge_Api_ElementInterface /** * - * @param type $entry - * @param type $size - * @param type $extension + * @param type $entry + * @param type $size + * @param type $extension * @return string */ private function generate_thumb_url($entry, $size = '', $extension = '') diff --git a/lib/classes/Bridge/Api/Interface.class.php b/lib/classes/Bridge/Api/Interface.class.php index eaa5f63ae6..e76dc03fe9 100644 --- a/lib/classes/Bridge/Api/Interface.class.php +++ b/lib/classes/Bridge/Api/Interface.class.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -use \Symfony\Component\HttpFoundation; /** * diff --git a/lib/classes/Bridge/Api/Youtube.class.php b/lib/classes/Bridge/Api/Youtube.class.php index 80dd57f411..78b318bc0c 100644 --- a/lib/classes/Bridge/Api/Youtube.class.php +++ b/lib/classes/Bridge/Api/Youtube.class.php @@ -181,7 +181,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $type + * @param string $type * @return string */ public function get_object_class_from_type($type) @@ -201,9 +201,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param int $offset_start - * @param int $quantity + * @param string $object + * @param int $offset_start + * @param int $quantity * @return Bridge_Api_ElementCollection */ public function list_elements($object, $offset_start = 0, $quantity = 10) @@ -238,9 +238,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param int $offset_start - * @param int $quantity + * @param string $object + * @param int $offset_start + * @param int $quantity * @return Bridge_Api_ContainerCollection */ public function list_containers($object, $offset_start = 0, $quantity = 10) @@ -290,9 +290,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param string $object_id - * @param Request $request + * @param string $object + * @param string $object_id + * @param Request $request * @return Bridge_Api_Youtube */ public function update_element($object, $object_id, Array $datas) @@ -336,8 +336,8 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $container_type - * @param Request $request + * @param string $container_type + * @param Request $request * @return Bridge_Api_Youtube_Container */ public function create_container($container_type, Request $request) @@ -366,10 +366,10 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param type $element_type - * @param type $element_id - * @param type $destination - * @param type $container_id + * @param type $element_type + * @param type $element_id + * @param type $destination + * @param type $container_id * @return Bridge_Api_Youtube_Container */ public function add_element_to_container($element_type, $element_id, $destination, $container_id) @@ -401,8 +401,8 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param string $object_id + * @param string $object + * @param string $object_id * @return Void */ public function delete_object($object, $object_id) @@ -435,7 +435,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $element_id + * @param string $element_id * @return string */ public function get_element_status(Bridge_Element $element) @@ -455,7 +455,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $status + * @param string $status * @return string */ public function map_connector_to_element_status($status) @@ -487,7 +487,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $connector_status + * @param string $connector_status * @return string */ public function get_error_message_from_status($connector_status) @@ -522,7 +522,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter * Set The exception to Bridge_Exception_ActionAuthNeedReconnect * if exception is instance of Zend_Gdata_App_HttpException and Http code 401 * - * @param Exception $e + * @param Exception $e * @return Void */ public function handle_exception(Exception &$e) @@ -622,7 +622,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $string + * @param string $string * @return Array */ protected function parse_xml_error($string) @@ -652,9 +652,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param record_adapter $record - * @param array $options - * @return string The new distant Id + * @param record_adapter $record + * @param array $options + * @return string The new distant Id */ public function upload(record_adapter &$record, array $options = array()) { @@ -698,8 +698,8 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param string $element_id + * @param string $object + * @param string $element_id * @return Bridge_Api_Youtube_Element */ public function get_element_from_id($element_id, $object) @@ -741,8 +741,8 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param string $element_id + * @param string $object + * @param string $element_id * @return Bridge_Api_Youtube_Container */ public function get_container_from_id($object, $element_id) @@ -759,9 +759,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $object - * @param int $offset_start - * @param int $quantity + * @param string $object + * @param int $offset_start + * @param int $quantity * @return string */ protected function get_user_object_list_feed($object, $offset_start, $quantity) @@ -865,7 +865,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param string $element_id + * @param string $element_id * @return Zend_Gdata_YouTube_PlaylistListFeed */ protected function get_PlaylistEntry_from_Id($element_id) @@ -903,8 +903,8 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * * Check if data uploaded via the current connector is conform - * @param Request $request - * @param record_adapter $record + * @param Request $request + * @param record_adapter $record * @return array */ public function check_upload_constraints(Array $datas, record_adapter $record) @@ -921,12 +921,10 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter if ( ! isset($datas[$name])) { if ($required) $errors[$name . '_' . $key] = _("Ce champ est obligatoire"); - } - elseif (trim($datas[$name]) === '') { + } elseif (trim($datas[$name]) === '') { if ( ! $empty) $errors[$name . '_' . $key] = _("Ce champ est obligatoire"); - } - elseif ($length !== 0) { + } elseif ($length !== 0) { if (mb_strlen($datas[$name]) > $length) $errors[$name . '_' . $key] = sprintf(_("Ce champ est trop long %s caracteres max"), $length); } @@ -949,12 +947,10 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter if ( ! isset($datas[$name])) { if ($required) $errors[$name] = _("Ce champ est obligatoire"); - } - elseif (trim($datas[$name]) === '') { + } elseif (trim($datas[$name]) === '') { if ( ! $empty) $errors[$name] = _("Ce champ est obligatoire"); - } - elseif ($length !== 0) { + } elseif ($length !== 0) { if (mb_strlen($datas[$name]) > $length) $errors[$name] = sprintf(_("Ce champ est trop long %s caracteres max"), $length); } @@ -967,7 +963,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * Returns datas needed for an uploaded record - * @param record_adapter $record + * @param record_adapter $record * @return array */ public function get_update_datas(Request $request) @@ -985,7 +981,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * Returns datas needed for an uploaded record - * @param record_adapter $record + * @param record_adapter $record * @return array */ public function get_upload_datas(Request $request, record_adapter $record) @@ -1015,7 +1011,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter /** * - * @param record_adapter $record + * @param record_adapter $record * @return array */ private function check_record_constraints(record_adapter $record) diff --git a/lib/classes/Bridge/Api/Youtube/Element.class.php b/lib/classes/Bridge/Api/Youtube/Element.class.php index e335dac448..d28159be11 100644 --- a/lib/classes/Bridge/Api/Youtube/Element.class.php +++ b/lib/classes/Bridge/Api/Youtube/Element.class.php @@ -31,8 +31,8 @@ class Bridge_Api_Youtube_Element implements Bridge_Api_ElementInterface /** * - * @param Zend_Gdata_App_Entry $entry - * @param string $type + * @param Zend_Gdata_App_Entry $entry + * @param string $type * @return Bridge_Api_Youtube_Element */ public function __construct(Zend_Gdata_App_Entry $entry, $type) diff --git a/lib/classes/Bridge/Element.class.php b/lib/classes/Bridge/Element.class.php index 2632e66af3..81ab9faebc 100644 --- a/lib/classes/Bridge/Element.class.php +++ b/lib/classes/Bridge/Element.class.php @@ -109,9 +109,9 @@ class Bridge_Element /** * - * @param appbox $appbox - * @param Bridge_Account $account - * @param int $id + * @param appbox $appbox + * @param Bridge_Account $account + * @param int $id * @return Bridge_Element */ public function __construct(appbox &$appbox, Bridge_Account &$account, $id) @@ -184,7 +184,7 @@ class Bridge_Element /** * - * @param string $dist_id + * @param string $dist_id * @return Bridge_Element */ public function set_dist_id($dist_id) @@ -219,7 +219,7 @@ class Bridge_Element /** * - * @param string $status + * @param string $status * @return Bridge_Element */ public function set_status($status) @@ -254,7 +254,7 @@ class Bridge_Element /** * - * @param string $status + * @param string $status * @return Bridge_Element */ public function set_connector_status($status) @@ -316,7 +316,7 @@ class Bridge_Element /** * - * @param string $title + * @param string $title * @return Bridge_Element */ public function set_title($title) @@ -352,7 +352,7 @@ class Bridge_Element /** * - * @param array $datas + * @param array $datas * @return Bridge_Element */ public function set_datas(Array $datas) @@ -448,9 +448,9 @@ class Bridge_Element /** * - * @param appbox $appbox - * @param Bridge_Account $account - * @param int $quantity + * @param appbox $appbox + * @param Bridge_Account $account + * @param int $quantity * @return Bridge_Element */ public static function get_elements_by_account(appbox $appbox, Bridge_Account $account, $offset_start = 0, $quantity = 50) @@ -475,13 +475,13 @@ class Bridge_Element /** * - * @param appbox $appbox - * @param Bridge_Account $account - * @param record_adapter $record - * @param string $title - * @param string $status - * @param string $type - * @param array $datas + * @param appbox $appbox + * @param Bridge_Account $account + * @param record_adapter $record + * @param string $title + * @param string $status + * @param string $type + * @param array $datas * @return Bridge_Element */ public static function create(appbox &$appbox, Bridge_Account &$account, record_adapter &$record, $title, $status, $type, Array $datas = array()) diff --git a/lib/classes/Browser.class.php b/lib/classes/Browser.class.php index ba69df0b79..0af38b46ed 100644 --- a/lib/classes/Browser.class.php +++ b/lib/classes/Browser.class.php @@ -24,7 +24,7 @@ * Typical Usage: * * $browser = Browser::getInstance(); - * if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) { + * if ( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) { * echo 'You have FireFox version 2 or greater'; * } * @@ -245,10 +245,10 @@ class Browser /** * Check to see if the specific browser is valid - * @param string $browserName - * @return True if the browser is the specified browser + * @param string $browserName + * @return True if the browser is the specified browser */ - function isBrowser($browserName) + public function isBrowser($browserName) { return( 0 == strcasecmp($this->_browser_name, trim($browserName))); } @@ -644,7 +644,7 @@ class Browser $this->_browser_name = self::BROWSER_W3CVALIDATOR; return true; - } else if (stripos($this->_agent, 'W3C_Validator') !== false) { + } elseif (stripos($this->_agent, 'W3C_Validator') !== false) { // Some of the Validator versions do not delineate w/ a slash - add it back in $ua = str_replace("W3C_Validator ", "W3C_Validator/", $this->_agent); $aresult = explode('/', stristr($ua, 'W3C_Validator')); @@ -752,11 +752,11 @@ class Browser $this->setMobile(true); return true; - } else if (stripos($this->_agent, 'opera') !== false) { + } elseif (stripos($this->_agent, 'opera') !== false) { $resultant = stristr($this->_agent, 'opera'); if (preg_match('/Version\/([0-9]{2}.*)$/', $resultant, $matches)) { $this->setVersion($matches[1]); - } else if (preg_match('/\//', $resultant)) { + } elseif (preg_match('/\//', $resultant)) { $aresult = explode('/', str_replace("(", " ", $resultant)); $aversion = explode(' ', $aresult[1]); $this->setVersion($aversion[0]); @@ -943,7 +943,7 @@ class Browser $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR); return true; - } else if (stripos($this->_agent, 'Firefox') === false && preg_match('/Netscape6?\/([^ ]*)/i', $this->_agent, $matches)) { + } elseif (stripos($this->_agent, 'Firefox') === false && preg_match('/Netscape6?\/([^ ]*)/i', $this->_agent, $matches)) { $this->setVersion($matches[1]); $this->setBrowser(self::BROWSER_NETSCAPE_NAVIGATOR); @@ -1018,7 +1018,7 @@ class Browser $this->setBrowser(self::BROWSER_FIREFOX); return true; - } else if (preg_match("/Firefox$/i", $this->_agent, $matches)) { + } elseif (preg_match("/Firefox$/i", $this->_agent, $matches)) { $this->setVersion(""); $this->setBrowser(self::BROWSER_FIREFOX); @@ -1060,13 +1060,13 @@ class Browser $this->setBrowser(self::BROWSER_MOZILLA); return true; - } else if (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9]\.[0-9]/i', $this->_agent) && stripos($this->_agent, 'netscape') === false) { + } elseif (stripos($this->_agent, 'mozilla') !== false && preg_match('/rv:[0-9]\.[0-9]/i', $this->_agent) && stripos($this->_agent, 'netscape') === false) { $aversion = explode('', stristr($this->_agent, 'rv:')); $this->setVersion(str_replace('rv:', '', $aversion[0])); $this->setBrowser(self::BROWSER_MOZILLA); return true; - } else if (stripos($this->_agent, 'mozilla') !== false && preg_match('/mozilla\/([^ ]*)/i', $this->_agent, $matches) && stripos($this->_agent, 'netscape') === false) { + } elseif (stripos($this->_agent, 'mozilla') !== false && preg_match('/mozilla\/([^ ]*)/i', $this->_agent, $matches) && stripos($this->_agent, 'netscape') === false) { $this->setVersion($matches[1]); $this->setBrowser(self::BROWSER_MOZILLA); @@ -1234,11 +1234,11 @@ class Browser { if (stripos($this->_agent, 'windows') !== false) { $this->_platform = self::PLATFORM_WINDOWS; - } else if (stripos($this->_agent, 'iPad') !== false) { + } elseif (stripos($this->_agent, 'iPad') !== false) { $this->_platform = self::PLATFORM_IPAD; - } else if (stripos($this->_agent, 'iPod') !== false) { + } elseif (stripos($this->_agent, 'iPod') !== false) { $this->_platform = self::PLATFORM_IPOD; - } else if (stripos($this->_agent, 'iPhone') !== false) { + } elseif (stripos($this->_agent, 'iPhone') !== false) { $this->_platform = self::PLATFORM_IPHONE; } elseif (stripos($this->_agent, 'mac') !== false) { $this->_platform = self::PLATFORM_APPLE; @@ -1246,9 +1246,9 @@ class Browser $this->_platform = self::PLATFORM_ANDROID; } elseif (stripos($this->_agent, 'linux') !== false) { $this->_platform = self::PLATFORM_LINUX; - } else if (stripos($this->_agent, 'Nokia') !== false) { + } elseif (stripos($this->_agent, 'Nokia') !== false) { $this->_platform = self::PLATFORM_NOKIA; - } else if (stripos($this->_agent, 'BlackBerry') !== false) { + } elseif (stripos($this->_agent, 'BlackBerry') !== false) { $this->_platform = self::PLATFORM_BLACKBERRY; } elseif (stripos($this->_agent, 'FreeBSD') !== false) { $this->_platform = self::PLATFORM_FREEBSD; diff --git a/lib/classes/DailymotionWithoutOauth2.php b/lib/classes/DailymotionWithoutOauth2.php index 975f93c143..0e73000322 100644 --- a/lib/classes/DailymotionWithoutOauth2.php +++ b/lib/classes/DailymotionWithoutOauth2.php @@ -21,10 +21,10 @@ class DailymotionWithoutOauth2 extends Dailymotion * * @return mixed the method response * - * @throws DailymotionApiException if API return an error - * @throws DailymotionAuthException if can't authenticate the request + * @throws DailymotionApiException if API return an error + * @throws DailymotionAuthException if can't authenticate the request * @throws DailymotionAuthRequiredException if not authentication info is available - * @throws DailymotionTransportException if an error occurs during request. + * @throws DailymotionTransportException if an error occurs during request. */ public function call($method, $args = array(), $access_token = null) { diff --git a/lib/classes/Feed/Adapter.class.php b/lib/classes/Feed/Adapter.class.php index fb5ed86f17..fe87fd7d3c 100644 --- a/lib/classes/Feed/Adapter.class.php +++ b/lib/classes/Feed/Adapter.class.php @@ -59,8 +59,8 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param appbox $appbox - * @param int $id + * @param appbox $appbox + * @param int $id * @return Feed_Adapter */ public function __construct(appbox &$appbox, $id) @@ -150,7 +150,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param string $file The path to the file + * @param string $file The path to the file * @return Feed_Adapter */ public function set_icon($file) @@ -217,7 +217,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param User_Adapter $user + * @param User_Adapter $user * @return boolean */ public function is_owner(User_Adapter $user) @@ -229,7 +229,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param User_Adapter $user + * @param User_Adapter $user * @return boolean */ public function is_publisher(User_Adapter $user) @@ -240,7 +240,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * Tells if a user has access to the feed * - * @param User_Adapter $user + * @param User_Adapter $user * @return type */ public function has_access(User_Adapter $user) @@ -285,7 +285,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param User_Adapter $user + * @param User_Adapter $user * @return Feed_Adapter */ public function add_publisher(User_Adapter $user) @@ -338,7 +338,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param collection $collection + * @param collection $collection * @return Feed_Adapter */ public function set_collection(collection $collection = null) @@ -362,7 +362,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param boolean $boolean + * @param boolean $boolean * @return Feed_Adapter */ public function set_public($boolean) @@ -390,7 +390,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param string $title + * @param string $title * @return Feed_Adapter */ public function set_title($title) @@ -413,7 +413,7 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param string $subtitle + * @param string $subtitle * @return Feed_Adapter */ public function set_subtitle($subtitle) @@ -434,10 +434,10 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param appbox $appbox - * @param User_Adapter $user - * @param string $title - * @param string $subtitle + * @param appbox $appbox + * @param User_Adapter $user + * @param string $title + * @param string $subtitle * @return Feed_Adapter */ public static function create(appbox &$appbox, User_Adapter $user, $title, $subtitle) @@ -459,9 +459,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param appbox $appbox - * @param User_Adapter $user - * @param int $id + * @param appbox $appbox + * @param User_Adapter $user + * @param int $id * @return Feed_Adapter */ public static function load_with_user(appbox &$appbox, User_Adapter &$user, $id) @@ -545,8 +545,8 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param int $offset_start - * @param int $how_many + * @param int $offset_start + * @param int $how_many * @return Feed_Entry_Collection */ public function get_entries($offset_start, $how_many) @@ -580,9 +580,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param registryInterface $registry - * @param string $format - * @param int $page + * @param registryInterface $registry + * @param string $format + * @param int $page * @return Feed_Link */ public function get_homepage_link(registryInterface $registry, $format, $page = null) @@ -620,8 +620,8 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param User_Adapter $user - * @param boolean $renew + * @param User_Adapter $user + * @param boolean $renew * @return string */ protected function get_token(User_Adapter $user, $renew = false) @@ -675,11 +675,11 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea /** * - * @param registryInterface $registry - * @param User_Adapter $user - * @param string $format - * @param int $page - * @param boolean $renew_token + * @param registryInterface $registry + * @param User_Adapter $user + * @param string $format + * @param int $page + * @param boolean $renew_token * @return Feed_Link */ public function get_user_link(registryInterface $registry, User_Adapter $user, $format, $page = null, $renew_token = false) diff --git a/lib/classes/Feed/Aggregate.class.php b/lib/classes/Feed/Aggregate.class.php index 5225b590ab..097885c001 100644 --- a/lib/classes/Feed/Aggregate.class.php +++ b/lib/classes/Feed/Aggregate.class.php @@ -25,8 +25,8 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface /** * - * @param appbox $appbox - * @param array $feeds + * @param appbox $appbox + * @param array $feeds * @return Feed_Aggregate */ public function __construct(appbox &$appbox, Array $feeds) @@ -75,8 +75,8 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface /** * - * @param int $offset_start - * @param int $how_many + * @param int $offset_start + * @param int $how_many * @return Feed_Entry_Collection */ public function get_entries($offset_start, $how_many) @@ -137,9 +137,9 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface /** * - * @param registryInterface $registry - * @param string $format - * @param int $page + * @param registryInterface $registry + * @param string $format + * @param int $page * @return Feed_Link */ public function get_homepage_link(registryInterface $registry, $format, $page = null) @@ -181,8 +181,8 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface /** * - * @param User_Adapter $user - * @param boolean $renew + * @param User_Adapter $user + * @param boolean $renew * @return string */ protected function get_token(User_Adapter $user, $renew = false) @@ -217,8 +217,8 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface /** * - * @param appbox $appbox - * @param User_Adapter $user + * @param appbox $appbox + * @param User_Adapter $user * @return Feed_Aggregate */ public static function load_with_user(appbox &$appbox, User_Adapter &$user) @@ -230,11 +230,11 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface /** * - * @param registryInterface $registry - * @param User_Adapter $user - * @param string $format - * @param int $page - * @param boolean $renew_token + * @param registryInterface $registry + * @param User_Adapter $user + * @param string $format + * @param int $page + * @param boolean $renew_token * @return Feed_Link */ public function get_user_link(registryInterface $registry, User_Adapter $user, $format, $page = null, $renew_token = false) diff --git a/lib/classes/Feed/Collection.class.php b/lib/classes/Feed/Collection.class.php index 414c80e6d7..90755401e2 100644 --- a/lib/classes/Feed/Collection.class.php +++ b/lib/classes/Feed/Collection.class.php @@ -33,8 +33,8 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf /** * - * @param appbox $appbox - * @param array $feeds + * @param appbox $appbox + * @param array $feeds * @return Feed_Collection */ public function __construct(appbox $appbox, Array $feeds) @@ -47,8 +47,8 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf /** * - * @param appbox $appbox - * @param User_Adapter $user + * @param appbox $appbox + * @param User_Adapter $user * @return Feed_Collection */ public static function load_all(appbox $appbox, User_Adapter $user) @@ -100,7 +100,7 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf /** * - * @param appbox $appbox + * @param appbox $appbox * @return Feed_Collection */ public static function load_public_feeds(appbox $appbox) diff --git a/lib/classes/Feed/Entry/Adapter.class.php b/lib/classes/Feed/Entry/Adapter.class.php index fd3a28fae9..0c241d5c80 100644 --- a/lib/classes/Feed/Entry/Adapter.class.php +++ b/lib/classes/Feed/Entry/Adapter.class.php @@ -93,9 +93,9 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param appbox $appbox - * @param Feed_Adapter $feed - * @param int $id + * @param appbox $appbox + * @param Feed_Adapter $feed + * @param int $id * @return Feed_Entry_Adapter */ public function __construct(appbox &$appbox, Feed_Adapter &$feed, $id) @@ -217,7 +217,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param string $title + * @param string $title * @return Feed_Entry_Adapter */ public function set_title($title) @@ -240,7 +240,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param string $subtitle + * @param string $subtitle * @return Feed_Entry_Adapter */ public function set_subtitle($subtitle) @@ -262,7 +262,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param string $author_name + * @param string $author_name * @return Feed_Entry_Adapter */ public function set_author_name($author_name) @@ -285,7 +285,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param string $author_email + * @param string $author_email * @return Feed_Entry_Adapter */ public function set_author_email($author_email) @@ -356,7 +356,7 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param User_adapter $user + * @param User_adapter $user * @return boolean */ public function is_publisher(User_adapter $user) @@ -471,13 +471,13 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param appbox $appbox - * @param Feed_Adapter $feed - * @param Feed_Publisher_Adapter $publisher - * @param string $title - * @param string $subtitle - * @param string $author_name - * @param string $author_mail + * @param appbox $appbox + * @param Feed_Adapter $feed + * @param Feed_Publisher_Adapter $publisher + * @param string $title + * @param string $subtitle + * @param string $author_name + * @param string $author_mail * @return Feed_Entry_Adapter */ public static function create(appbox &$appbox, Feed_Adapter $feed @@ -525,8 +525,8 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa /** * - * @param appbox $appbox - * @param type $id + * @param appbox $appbox + * @param type $id * @return Feed_Entry_Adapter */ public static function load_from_id(appbox $appbox, $id) diff --git a/lib/classes/Feed/Entry/Collection.class.php b/lib/classes/Feed/Entry/Collection.class.php index 9bf83a2a42..bfa1e67de2 100644 --- a/lib/classes/Feed/Entry/Collection.class.php +++ b/lib/classes/Feed/Entry/Collection.class.php @@ -52,7 +52,7 @@ class Feed_Entry_Collection implements Feed_Entry_CollectionInterface /** * - * @param Feed_Entry_Adapter $entry + * @param Feed_Entry_Adapter $entry * @return Feed_Entry_Collection */ public function add_entry(Feed_Entry_Adapter $entry) diff --git a/lib/classes/Feed/Entry/Item.class.php b/lib/classes/Feed/Entry/Item.class.php index d60b5a5ebf..9437d67729 100644 --- a/lib/classes/Feed/Entry/Item.class.php +++ b/lib/classes/Feed/Entry/Item.class.php @@ -49,9 +49,9 @@ class Feed_Entry_Item implements Feed_Entry_ItemInterface, cache_cacheableInterf /** * - * @param appbox $appbox - * @param Feed_Entry_Adapter $entry - * @param int $id + * @param appbox $appbox + * @param Feed_Entry_Adapter $entry + * @param int $id * @return Feed_Entry_Item */ public function __construct(appbox &$appbox, Feed_Entry_Adapter &$entry, $id) @@ -168,9 +168,9 @@ class Feed_Entry_Item implements Feed_Entry_ItemInterface, cache_cacheableInterf /** * - * @param appbox $appbox - * @param Feed_Entry_Adapter $entry - * @param record_adapter $record + * @param appbox $appbox + * @param Feed_Entry_Adapter $entry + * @param record_adapter $record * @return Feed_Entry_Item */ public static function create(appbox &$appbox, Feed_Entry_Adapter &$entry, record_adapter &$record) diff --git a/lib/classes/Feed/Link.class.php b/lib/classes/Feed/Link.class.php index 96f691acca..6c1bcae4aa 100644 --- a/lib/classes/Feed/Link.class.php +++ b/lib/classes/Feed/Link.class.php @@ -37,9 +37,9 @@ class Feed_Link implements Feed_LinkInterface /** * - * @param string $href - * @param string $title - * @param string $mimetype + * @param string $href + * @param string $title + * @param string $mimetype * @return Feed_Link */ public function __construct($href, $title, $mimetype) diff --git a/lib/classes/Feed/Publisher/Adapter.class.php b/lib/classes/Feed/Publisher/Adapter.class.php index 2839403f3b..ef4590ab2d 100644 --- a/lib/classes/Feed/Publisher/Adapter.class.php +++ b/lib/classes/Feed/Publisher/Adapter.class.php @@ -55,8 +55,8 @@ class Feed_Publisher_Adapter implements Feed_Publisher_Interface, cache_cacheabl /** * - * @param appbox $appbox - * @param int $id + * @param appbox $appbox + * @param int $id * @return Feed_Publisher_Adapter */ public function __construct(appbox &$appbox, $id) @@ -175,10 +175,10 @@ class Feed_Publisher_Adapter implements Feed_Publisher_Interface, cache_cacheabl /** * - * @param appbox $appbox - * @param User_Adapter $user - * @param Feed_Adapter $feed - * @param boolean $owner + * @param appbox $appbox + * @param User_Adapter $user + * @param Feed_Adapter $feed + * @param boolean $owner * @return Feed_Publisher_Adapter */ public static function create(appbox &$appbox, User_Adapter &$user, Feed_Adapter &$feed, $owner) @@ -201,16 +201,15 @@ class Feed_Publisher_Adapter implements Feed_Publisher_Interface, cache_cacheabl /** * - * @param appbox $appbox - * @param Feed_Adapter $feed - * @param User_Adapter $user + * @param appbox $appbox + * @param Feed_Adapter $feed + * @param User_Adapter $user * @return Feed_Publisher_Adapter */ public static function getPublisher(appbox &$appbox, Feed_Adapter &$feed, User_Adapter &$user) { foreach ($feed->get_publishers() as $publisher) { - if ($publisher->get_user()->get_id() === $user->get_id()) - { + if ($publisher->get_user()->get_id() === $user->get_id()) { return $publisher; } } diff --git a/lib/classes/Feed/Token.class.php b/lib/classes/Feed/Token.class.php index 4d7a95db6b..f6fa1828a4 100644 --- a/lib/classes/Feed/Token.class.php +++ b/lib/classes/Feed/Token.class.php @@ -49,9 +49,9 @@ class Feed_Token /** * - * @param appbox $appbox - * @param string $token - * @param int $feed_id + * @param appbox $appbox + * @param string $token + * @param int $feed_id * @return Feed_Token */ public function __construct(appbox &$appbox, $token, $feed_id) diff --git a/lib/classes/Feed/TokenAggregate.class.php b/lib/classes/Feed/TokenAggregate.class.php index 6199be8b15..96c860b476 100644 --- a/lib/classes/Feed/TokenAggregate.class.php +++ b/lib/classes/Feed/TokenAggregate.class.php @@ -20,8 +20,8 @@ class Feed_TokenAggregate extends Feed_Token /** * - * @param appbox $appbox - * @param string $token + * @param appbox $appbox + * @param string $token * @return Feed_TokenAggregate */ public function __construct(appbox &$appbox, $token) diff --git a/lib/classes/Feed/XML/Abstract.class.php b/lib/classes/Feed/XML/Abstract.class.php index ec476e609f..1010c81520 100644 --- a/lib/classes/Feed/XML/Abstract.class.php +++ b/lib/classes/Feed/XML/Abstract.class.php @@ -84,7 +84,7 @@ abstract class Feed_XML_Abstract /** * - * @param DateTime $datetime + * @param DateTime $datetime * @return Feed_XML_Interface */ public function set_updated_on(DateTime $datetime) @@ -96,7 +96,7 @@ abstract class Feed_XML_Abstract /** * - * @param string $subtitle + * @param string $subtitle * @return Feed_XML_Interface */ public function set_subtitle($subtitle) @@ -108,7 +108,7 @@ abstract class Feed_XML_Abstract /** * - * @param Feed_Link $link + * @param Feed_Link $link * @return Feed_XML_Interface */ public function set_link(Feed_Link $link) @@ -120,7 +120,7 @@ abstract class Feed_XML_Abstract /** * - * @param Feed_Link $next_page + * @param Feed_Link $next_page * @return Feed_XML_Interface */ public function set_next_page(Feed_Link $next_page) @@ -132,7 +132,7 @@ abstract class Feed_XML_Abstract /** * - * @param Feed_Link $previous_page + * @param Feed_Link $previous_page * @return Feed_XML_Interface */ public function set_previous_page(Feed_Link $previous_page) @@ -144,7 +144,7 @@ abstract class Feed_XML_Abstract /** * - * @param Feed_Entry_Adapter $entry + * @param Feed_Entry_Adapter $entry * @return Feed_XML_Interface */ public function set_item(Feed_Entry_Adapter $entry) @@ -156,7 +156,7 @@ abstract class Feed_XML_Abstract /** * - * @param string $generator + * @param string $generator * @return Feed_XML_Interface */ public function set_generator($generator) @@ -168,9 +168,9 @@ abstract class Feed_XML_Abstract /** * - * @param DOMDocument $document - * @param DOMNode $node - * @param boolean $namespaced + * @param DOMDocument $document + * @param DOMNode $node + * @param boolean $namespaced * @return Feed_XML_Interface */ public function add_navigation(DOMDocument $document, DOMNode $node, $namespaced) @@ -194,10 +194,10 @@ abstract class Feed_XML_Abstract /** * - * @param DOMDocument $document - * @param DOMNode $node - * @param string $tagname - * @param string $tagcontent + * @param DOMDocument $document + * @param DOMNode $node + * @param string $tagname + * @param string $tagcontent * @return DOMElement */ protected function addTag(DOMDocument &$document, DOMNode &$node, $tagname, $tagcontent = null) @@ -213,9 +213,9 @@ abstract class Feed_XML_Abstract /** * - * @param DOMDocument $document - * @param DOMNode $item - * @param Feed_Entry_Item $content + * @param DOMDocument $document + * @param DOMNode $item + * @param Feed_Entry_Item $content * @return Feed_XML_Interface */ protected function addContent(DOMDocument $document, DOMNode $item, Feed_Entry_Item $content) diff --git a/lib/classes/Feed/XML/Atom.class.php b/lib/classes/Feed/XML/Atom.class.php index 1f2837f744..bec845c93b 100644 --- a/lib/classes/Feed/XML/Atom.class.php +++ b/lib/classes/Feed/XML/Atom.class.php @@ -113,9 +113,9 @@ class Feed_XML_Atom extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param DOMDocument $document - * @param DOMElement $feed - * @param Feed_Entry_Adapter $entry + * @param DOMDocument $document + * @param DOMElement $feed + * @param Feed_Entry_Adapter $entry * @return DOMElement */ protected function add_item(DOMDocument $document, DOMElement $feed, Feed_Entry_Adapter $entry) @@ -154,7 +154,7 @@ class Feed_XML_Atom extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $author_name + * @param string $author_name * @return Feed_XML_Atom */ public function set_author_name($author_name) @@ -167,7 +167,7 @@ class Feed_XML_Atom extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $author_name + * @param string $author_name * @return Feed_XML_Atom */ public function set_author_email($author_email) @@ -180,7 +180,7 @@ class Feed_XML_Atom extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $author_name + * @param string $author_name * @return Feed_XML_Atom */ public function set_author_url($author_url) diff --git a/lib/classes/Feed/XML/Cooliris.class.php b/lib/classes/Feed/XML/Cooliris.class.php index b99ef877c8..1e8c106b89 100644 --- a/lib/classes/Feed/XML/Cooliris.class.php +++ b/lib/classes/Feed/XML/Cooliris.class.php @@ -102,7 +102,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $language + * @param string $language * @return Feed_XML_RSS */ public function set_language($language) @@ -114,7 +114,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $language + * @param string $language * @return Feed_XML_RSS */ public function set_copyright($copyright) @@ -126,7 +126,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $managingEditor + * @param string $managingEditor * @return Feed_XML_RSS */ public function set_managingEditor($managingEditor) @@ -138,7 +138,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $webMaster + * @param string $webMaster * @return Feed_XML_RSS */ public function set_webMaster($webMaster) @@ -150,7 +150,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param DateTime $lastBuildDate + * @param DateTime $lastBuildDate * @return Feed_XML_RSS */ public function set_lastBuildDate(DateTime $lastBuildDate) @@ -162,7 +162,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $category + * @param string $category * @return Feed_XML_RSS */ public function set_category($category) @@ -174,7 +174,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $docs + * @param string $docs * @return Feed_XML_RSS */ public function set_docs($docs) @@ -186,7 +186,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param int $ttl + * @param int $ttl * @return Feed_XML_RSS */ public function set_ttl($ttl) @@ -198,7 +198,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param Feed_XML_RSS_Image $image + * @param Feed_XML_RSS_Image $image * @return Feed_XML_RSS */ public function set_image(Feed_XML_RSS_Image $image) @@ -210,7 +210,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $skipHours + * @param string $skipHours * @return Feed_XML_RSS */ public function set_skipHour($hour) @@ -222,7 +222,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $skipDays + * @param string $skipDays * @return Feed_XML_RSS */ public function set_skipDays($day) @@ -326,9 +326,9 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param DOMDocument $document - * @param DOMNode $node - * @param Feed_Entry_Adapter $entry + * @param DOMDocument $document + * @param DOMNode $node + * @param Feed_Entry_Adapter $entry * @return DOMElement */ protected function add_item(DOMDocument $document, DOMNode $node, Feed_Entry_Adapter $entry) @@ -342,9 +342,9 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param DOMDocument $document - * @param DOMNode $item - * @param Feed_Entry_Item $content + * @param DOMDocument $document + * @param DOMNode $item + * @param Feed_Entry_Item $content * @return Feed_XML_Interface */ protected function addContent(DOMDocument $document, DOMNode $node, Feed_Entry_Adapter $entry, Feed_Entry_Item $content) diff --git a/lib/classes/Feed/XML/RSS.class.php b/lib/classes/Feed/XML/RSS.class.php index 66c7993baf..60d12ce363 100644 --- a/lib/classes/Feed/XML/RSS.class.php +++ b/lib/classes/Feed/XML/RSS.class.php @@ -102,7 +102,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $language + * @param string $language * @return Feed_XML_RSS */ public function set_language($language) @@ -114,7 +114,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $language + * @param string $language * @return Feed_XML_RSS */ public function set_copyright($copyright) @@ -126,7 +126,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $managingEditor + * @param string $managingEditor * @return Feed_XML_RSS */ public function set_managingEditor($managingEditor) @@ -138,7 +138,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $webMaster + * @param string $webMaster * @return Feed_XML_RSS */ public function set_webMaster($webMaster) @@ -150,7 +150,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param DateTime $lastBuildDate + * @param DateTime $lastBuildDate * @return Feed_XML_RSS */ public function set_lastBuildDate(DateTime $lastBuildDate) @@ -162,7 +162,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $category + * @param string $category * @return Feed_XML_RSS */ public function set_category($category) @@ -174,7 +174,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $docs + * @param string $docs * @return Feed_XML_RSS */ public function set_docs($docs) @@ -186,7 +186,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param int $ttl + * @param int $ttl * @return Feed_XML_RSS */ public function set_ttl($ttl) @@ -198,7 +198,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param Feed_XML_RSS_Image $image + * @param Feed_XML_RSS_Image $image * @return Feed_XML_RSS */ public function set_image(Feed_XML_RSS_Image $image) @@ -210,7 +210,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $skipHours + * @param string $skipHours * @return Feed_XML_RSS */ public function set_skipHour($hour) @@ -222,7 +222,7 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param string $skipDays + * @param string $skipDays * @return Feed_XML_RSS */ public function set_skipDays($day) @@ -326,9 +326,9 @@ class Feed_XML_RSS extends Feed_XML_Abstract implements Feed_XML_Interface /** * - * @param DOMDocument $document - * @param DOMNode $node - * @param Feed_Entry_Adapter $entry + * @param DOMDocument $document + * @param DOMNode $node + * @param Feed_Entry_Adapter $entry * @return DOMElement */ protected function add_item(DOMDocument $document, DOMNode $node, Feed_Entry_Adapter $entry) diff --git a/lib/classes/Feed/XML/RSS/Image.class.php b/lib/classes/Feed/XML/RSS/Image.class.php index 3937481e89..9d343699e2 100644 --- a/lib/classes/Feed/XML/RSS/Image.class.php +++ b/lib/classes/Feed/XML/RSS/Image.class.php @@ -55,9 +55,9 @@ class Feed_XML_RSS_Image implements Feed_XML_RSS_ImageInterface /** * - * @param string $url - * @param string $title - * @param string $link + * @param string $url + * @param string $title + * @param string $link * @return Feed_XML_RSS_Image */ public function __construct($url, $title, $link) @@ -71,7 +71,7 @@ class Feed_XML_RSS_Image implements Feed_XML_RSS_ImageInterface /** * - * @param type $description + * @param type $description * @return Feed_XML_RSS_Image */ public function set_description($description) @@ -83,7 +83,7 @@ class Feed_XML_RSS_Image implements Feed_XML_RSS_ImageInterface /** * - * @param int $width + * @param int $width * @return Feed_XML_RSS_Image */ public function set_width($width) @@ -95,7 +95,7 @@ class Feed_XML_RSS_Image implements Feed_XML_RSS_ImageInterface /** * - * @param int $height + * @param int $height * @return Feed_XML_RSS_Image */ public function set_height($height) diff --git a/lib/classes/Session/Authentication/Guest.class.php b/lib/classes/Session/Authentication/Guest.class.php index f9f115f20e..9993672289 100644 --- a/lib/classes/Session/Authentication/Guest.class.php +++ b/lib/classes/Session/Authentication/Guest.class.php @@ -32,7 +32,7 @@ class Session_Authentication_Guest implements Session_Authentication_Interface /** * - * @param appbox $appbox + * @param appbox $appbox * @return Session_Authentication_Guest */ public function __construct(appbox &$appbox) diff --git a/lib/classes/Session/Authentication/Native.class.php b/lib/classes/Session/Authentication/Native.class.php index ee81497963..7ca2476118 100644 --- a/lib/classes/Session/Authentication/Native.class.php +++ b/lib/classes/Session/Authentication/Native.class.php @@ -50,9 +50,9 @@ class Session_Authentication_Native implements Session_Authentication_Interface /** * - * @param appbox $appbox - * @param string $login - * @param string $password + * @param appbox $appbox + * @param string $login + * @param string $password * @return Session_Authentication_Native */ public function __construct(appbox &$appbox, $login, $password) @@ -82,7 +82,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface /** * - * @param boolean $captcha_challenge_result + * @param boolean $captcha_challenge_result * @return Session_Authentication_Native */ public function set_captcha_challenge($captcha_challenge_result) @@ -148,7 +148,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface /** * - * @param Browser $browser + * @param Browser $browser * @return Session_Authentication_Native */ public function challenge_password(Browser $browser = null) @@ -185,7 +185,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface /** * - * @param Browser $browser + * @param Browser $browser * @return Session_Authentication_Native */ protected function save_badlog(Browser $browser) @@ -242,7 +242,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface /** * - * @param string $ip + * @param string $ip * @return Session_Authentication_Native */ protected function check_and_revoke_badlogs($ip) @@ -279,7 +279,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface /** * - * @param registryInterface $registry + * @param registryInterface $registry * @return boolean */ protected function is_captcha_activated(registryInterface $registry) diff --git a/lib/classes/Session/Authentication/None.class.php b/lib/classes/Session/Authentication/None.class.php index 40fc8be921..a4436517db 100644 --- a/lib/classes/Session/Authentication/None.class.php +++ b/lib/classes/Session/Authentication/None.class.php @@ -25,7 +25,7 @@ class Session_Authentication_None implements Session_Authentication_Interface /** * - * @param User_Adapter $user + * @param User_Adapter $user * @return Session_Authentication_None */ public function __construct(User_Adapter $user) diff --git a/lib/classes/Session/Authentication/PersistentCookie.class.php b/lib/classes/Session/Authentication/PersistentCookie.class.php index 860e10d204..304f5f9dc9 100644 --- a/lib/classes/Session/Authentication/PersistentCookie.class.php +++ b/lib/classes/Session/Authentication/PersistentCookie.class.php @@ -37,8 +37,8 @@ class Session_Authentication_PersistentCookie implements Session_Authentication_ /** * - * @param appbox $appbox - * @param type $persistent_cookie + * @param appbox $appbox + * @param type $persistent_cookie * @return Session_Authentication_PersistentCookie */ public function __construct(appbox &$appbox, $persistent_cookie) diff --git a/lib/classes/Session/Authentication/Token.class.php b/lib/classes/Session/Authentication/Token.class.php index 73e35fbccd..05ccea9e67 100644 --- a/lib/classes/Session/Authentication/Token.class.php +++ b/lib/classes/Session/Authentication/Token.class.php @@ -32,8 +32,8 @@ class Session_Authentication_Token implements Session_Authentication_Interface /** * - * @param appbox $appbox - * @param type $token + * @param appbox $appbox + * @param type $token * @return Session_Authentication_Token */ public function __construct(appbox &$appbox, $token) diff --git a/lib/classes/Session/Handler.class.php b/lib/classes/Session/Handler.class.php index 6272254938..727e95f261 100644 --- a/lib/classes/Session/Handler.class.php +++ b/lib/classes/Session/Handler.class.php @@ -123,7 +123,7 @@ class Session_Handler /** * Set the locale used in this session * - * @param string $value under the form i18n_l10n (de_DE, en_US...) + * @param string $value under the form i18n_l10n (de_DE, en_US...) * @return Session_Handler; */ public static function set_locale($value) @@ -207,8 +207,8 @@ class Session_Handler /** * Set temporary preference (till the session ends) * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value * @return Session_Handler */ public function set_session_prefs($key, $value) @@ -222,7 +222,7 @@ class Session_Handler /** * - * @param string $key + * @param string $key * @return mixed */ public function get_session_prefs($key) @@ -237,8 +237,8 @@ class Session_Handler /** * - * @param string $name - * @param mixed $default_value + * @param string $name + * @param mixed $default_value * @return mixed */ public static function get_cookie($name, $default_value = null) @@ -256,10 +256,10 @@ class Session_Handler /** * - * @param string $name - * @param mixed $value - * @param int $avalaibility - * @param boolean $http_only + * @param string $name + * @param mixed $value + * @param int $avalaibility + * @param boolean $http_only * @return boolean */ public static function set_cookie($name, $value, $avalaibility, $http_only) @@ -277,8 +277,7 @@ class Session_Handler self::$_cookie[$name] = $value; else $_COOKIE[$name] = $value; - } - else { + } else { if (http_request::is_command_line() && isset(self::$_cookie[$name])) unset(self::$_cookie[$name]); else @@ -293,7 +292,7 @@ class Session_Handler /** * - * @param string $name + * @param string $name * @return boolean */ public static function isset_cookie($name) @@ -342,7 +341,7 @@ class Session_Handler /** * * @param User_Adapter $user - * @param type $ses_id + * @param type $ses_id */ public function restore(User_Adapter $user, $ses_id) { @@ -359,7 +358,7 @@ class Session_Handler /** * Process the authentication * - * @param Session_Authentication_Interface $auth + * @param Session_Authentication_Interface $auth * @return Session_Handler */ public function authenticate(Session_Authentication_Interface $auth) @@ -543,7 +542,7 @@ class Session_Handler /** * - * @param databox $databox + * @param databox $databox * @return Session_Logger */ public function get_logger(databox $databox) @@ -655,8 +654,7 @@ class Session_Handler if ($enter) { if ($app && ! in_array($app, $apps)) $apps[] = $app; - } - elseif (in_array($app, $apps)) { + } elseif (in_array($app, $apps)) { unset($apps[$app]); } diff --git a/lib/classes/Session/Logger.class.php b/lib/classes/Session/Logger.class.php index 3c8e91fa4e..5c8fb00e19 100644 --- a/lib/classes/Session/Logger.class.php +++ b/lib/classes/Session/Logger.class.php @@ -43,8 +43,8 @@ class Session_Logger /** * - * @param databox $databox - * @param int $log_id + * @param databox $databox + * @param int $log_id * @return Session_Logger */ public function __construct(databox &$databox, $log_id) @@ -88,10 +88,10 @@ class Session_Logger /** * - * @param databox $databox - * @param Session_Phrasea $session - * @param User_Adapter $user - * @param Browser $browser + * @param databox $databox + * @param Session_Phrasea $session + * @param User_Adapter $user + * @param Browser $browser * @return Session_Logger */ public static function create(databox &$databox, Browser &$browser, Session_Handler $session, User_Adapter &$user = null) diff --git a/lib/classes/Session/Phrasea.class.php b/lib/classes/Session/Phrasea.class.php index a2eb263e41..460bafac73 100644 --- a/lib/classes/Session/Phrasea.class.php +++ b/lib/classes/Session/Phrasea.class.php @@ -37,9 +37,9 @@ class Session_Phrasea /** * - * @param appbox $appbox - * @param User_Adapter $user - * @param int $ses_id + * @param appbox $appbox + * @param User_Adapter $user + * @param int $ses_id * @return Session_Phrasea */ public function __construct(appbox &$appbox, User_Adapter &$user, $ses_id = null) @@ -63,7 +63,7 @@ class Session_Phrasea /** * - * @param Browser $browser + * @param Browser $browser * @return Session_Phrasea */ public function create(Browser &$browser) @@ -85,9 +85,9 @@ class Session_Phrasea /** * - * @param appbox $appbox + * @param appbox $appbox * @param Browser $browser - * @param Array $logs + * @param Array $logs */ protected function update_informations(appbox &$appbox, Browser &$browser) { diff --git a/lib/classes/Session/Storage/CommandLine.class.php b/lib/classes/Session/Storage/CommandLine.class.php index 7a57c829e0..d78801b63f 100644 --- a/lib/classes/Session/Storage/CommandLine.class.php +++ b/lib/classes/Session/Storage/CommandLine.class.php @@ -37,7 +37,7 @@ class Session_Storage_CommandLine extends Session_Storage_Abstract implements Se /** * - * @param string $session_name + * @param string $session_name * @return Session_Storage_CommandLine */ public static function getInstance($session_name) @@ -51,7 +51,7 @@ class Session_Storage_CommandLine extends Session_Storage_Abstract implements Se /** * - * @param string $name + * @param string $name * @return Session_Storage_CommandLine */ protected function __construct($name) @@ -61,7 +61,7 @@ class Session_Storage_CommandLine extends Session_Storage_Abstract implements Se /** * - * @param string $key + * @param string $key * @return mixed */ public function get($key, $default_value = null) @@ -71,7 +71,7 @@ class Session_Storage_CommandLine extends Session_Storage_Abstract implements Se /** * - * @param string $key + * @param string $key * @return mixed */ public function has($key) @@ -81,8 +81,8 @@ class Session_Storage_CommandLine extends Session_Storage_Abstract implements Se /** * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value * @return boolean */ public function set($key, $value) @@ -94,7 +94,7 @@ class Session_Storage_CommandLine extends Session_Storage_Abstract implements Se /** * - * @param string $key + * @param string $key * @return boolean */ public function remove($key) diff --git a/lib/classes/Session/Storage/Interface.class.php b/lib/classes/Session/Storage/Interface.class.php index 1557ccc7c3..b9fbcd46af 100644 --- a/lib/classes/Session/Storage/Interface.class.php +++ b/lib/classes/Session/Storage/Interface.class.php @@ -28,7 +28,7 @@ interface Session_Storage_Interface /** * Return true if the storage contains the key * - * @param string $key + * @param string $key * @return boolean */ public function has($key); diff --git a/lib/classes/Session/Storage/PHPSession.class.php b/lib/classes/Session/Storage/PHPSession.class.php index a96e98285e..c29e44ba8f 100644 --- a/lib/classes/Session/Storage/PHPSession.class.php +++ b/lib/classes/Session/Storage/PHPSession.class.php @@ -31,7 +31,7 @@ class Session_Storage_PHPSession extends Session_Storage_Abstract implements Ses /** * - * @param string $session_name + * @param string $session_name * @return Session_Storage_PHPSession */ public static function getInstance($session_name) @@ -45,7 +45,7 @@ class Session_Storage_PHPSession extends Session_Storage_Abstract implements Ses /** * - * @param string $session_name + * @param string $session_name * @return Session_Storage_PHPSession */ protected function __construct($session_name) @@ -87,7 +87,7 @@ class Session_Storage_PHPSession extends Session_Storage_Abstract implements Ses /** * - * @param string $key + * @param string $key * @return mixed */ public function has($key) @@ -97,7 +97,7 @@ class Session_Storage_PHPSession extends Session_Storage_Abstract implements Ses /** * - * @param string $key + * @param string $key * @return mixed */ public function get($key, $default_value = null) @@ -127,7 +127,7 @@ class Session_Storage_PHPSession extends Session_Storage_Abstract implements Ses * * @return string */ - function getName() + public function getName() { return session_name(); } @@ -137,7 +137,7 @@ class Session_Storage_PHPSession extends Session_Storage_Abstract implements Ses * * @return */ - function getId() + public function getId() { return session_id(); } diff --git a/lib/classes/Setup/Upgrade.class.php b/lib/classes/Setup/Upgrade.class.php index 2cc395f50a..1c55031b45 100644 --- a/lib/classes/Setup/Upgrade.class.php +++ b/lib/classes/Setup/Upgrade.class.php @@ -46,7 +46,7 @@ class Setup_Upgrade /** * - * @param appbox $appbox + * @param appbox $appbox * @return Setup_Upgrade */ public function __construct(appbox &$appbox) @@ -80,7 +80,7 @@ class Setup_Upgrade /** * Add steps to do to the counter * - * @param int $how_many + * @param int $how_many * @return Setup_Upgrade */ public function add_steps($how_many) @@ -94,7 +94,7 @@ class Setup_Upgrade /** * Add completed steps to the counter * - * @param int $how_many + * @param int $how_many * @return Setup_Upgrade */ public function add_steps_complete($how_many) @@ -108,7 +108,7 @@ class Setup_Upgrade /** * Set the current message * - * @param string $message + * @param string $message * @return Setup_Upgrade */ public function set_current_message($message) diff --git a/lib/classes/User/Adapter.class.php b/lib/classes/User/Adapter.class.php index 6c440225c2..cb734c4080 100644 --- a/lib/classes/User/Adapter.class.php +++ b/lib/classes/User/Adapter.class.php @@ -313,8 +313,8 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param type $id - * @param appbox $appbox + * @param type $id + * @param appbox $appbox * @return User_Adapter */ public function __construct($id, appbox &$appbox) @@ -327,16 +327,15 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param type $id - * @param appbox $appbox + * @param type $id + * @param appbox $appbox * @return User_Adapter */ public static function getInstance($id, appbox &$appbox) { if (is_int((int) $id) && (int) $id > 0) { $id = (int) $id; - } - else + } else throw new Exception('Invalid usr_id'); if ( ! isset(self::$_instance[$id])) { @@ -373,7 +372,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param type $pasword + * @param type $pasword * @return User_Adapter */ public function set_password($pasword) @@ -392,7 +391,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param string $email + * @param string $email * @return User_Adapter */ public function set_email($email) @@ -431,7 +430,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param boolean $renew + * @param boolean $renew * @return system_url */ public function get_protected_rss_url($renew = false) @@ -464,7 +463,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * Query in the cache * - * @param unknown_type $query + * @param unknown_type $query * @return boolean */ public static function saveQuery($query) @@ -510,7 +509,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param string $login + * @param string $login * @return int */ public static function get_usr_id_from_login($login) @@ -529,7 +528,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param int $datas + * @param int $datas * @return User_Adapter */ public function set_defaultftpdatas($datas) @@ -545,7 +544,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param bollean $boolean + * @param bollean $boolean * @return User_Adapter */ public function set_mail_notifications($boolean) @@ -563,7 +562,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param boolean $boolean + * @param boolean $boolean * @return User_Adapter */ public function set_activeftp($boolean) @@ -580,7 +579,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param boolean $boolean + * @param boolean $boolean * @return User_Adapter */ public function set_ldap_created($boolean) @@ -597,7 +596,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param string $address + * @param string $address * @return User_Adapter */ public function set_ftp_address($address) @@ -614,7 +613,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param string $login + * @param string $login * @return User_Adapter */ public function set_ftp_login($login) @@ -630,7 +629,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param type $password + * @param type $password * @return User_Adapter */ public function set_ftp_password($password) @@ -1034,7 +1033,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface /** * - * @param $id + * @param $id * @return user */ public function load($id) diff --git a/lib/classes/User/Query.class.php b/lib/classes/User/Query.class.php index 6bf1e0b021..c627f0d504 100644 --- a/lib/classes/User/Query.class.php +++ b/lib/classes/User/Query.class.php @@ -257,8 +257,7 @@ class User_Query implements User_QueryInterface if (count($this->base_ids) == 0) { if ($this->bases_restrictions) throw new Exception('No base available for you, not enough rights'); - } - else { + } else { $extra = $this->include_phantoms ? ' OR base_id IS NULL ' : ''; $not_base_id = array_diff($this->active_bases, $this->base_ids); @@ -278,8 +277,7 @@ class User_Query implements User_QueryInterface if (count($this->sbas_ids) == 0) { if ($this->sbas_restrictions) throw new Exception('No base available for you, not enough rights'); - } - else { + } else { $extra = $this->include_phantoms ? ' OR sbas_id IS NULL ' : ''; $not_sbas_id = array_diff($this->active_sbas, $this->sbas_ids); @@ -411,7 +409,7 @@ class User_Query implements User_QueryInterface /** * - * @param array $rights + * @param array $rights * @return User_Query */ public function who_have_right(Array $rights) @@ -423,7 +421,7 @@ class User_Query implements User_QueryInterface /** * - * @param boolean $boolean + * @param boolean $boolean * @return User_Query */ public function include_templates($boolean) @@ -435,7 +433,7 @@ class User_Query implements User_QueryInterface /** * - * @param boolean $boolean + * @param boolean $boolean * @return User_Query */ public function only_templates($boolean) @@ -447,7 +445,7 @@ class User_Query implements User_QueryInterface /** * - * @param array $rights + * @param array $rights * @return User_Query */ public function who_have_not_right(Array $rights) @@ -590,8 +588,8 @@ class User_Query implements User_QueryInterface /** * - * @param ACL $ACL User's ACLs - * @param array $rights An array of base rights you need + * @param ACL $ACL User's ACLs + * @param array $rights An array of base rights you need * @return User_Query */ public function on_bases_where_i_am(ACL $ACL, Array $rights) @@ -611,8 +609,8 @@ class User_Query implements User_QueryInterface /** * - * @param ACL $ACL - * @param array $rights An array of sbas rights you need + * @param ACL $ACL + * @param array $rights An array of sbas rights you need * @return User_Query */ public function on_sbas_where_i_am(ACL $ACL, Array $rights) @@ -632,8 +630,8 @@ class User_Query implements User_QueryInterface /** * - * @param int $offset_start - * @param int $results_quantity + * @param int $offset_start + * @param int $results_quantity * @return User_Query */ public function limit($offset_start, $results_quantity) @@ -648,8 +646,8 @@ class User_Query implements User_QueryInterface * Query width a like field * like fields are defined as constants of the object * - * @param const $like_field - * @param string $like_value + * @param const $like_field + * @param string $like_value * @return User_Query */ public function like($like_field, $like_value) @@ -673,7 +671,7 @@ class User_Query implements User_QueryInterface /** * Choose whether multiple like will be treated as AND or OR * - * @param type $like_match + * @param type $like_match * @return User_Query */ public function like_match($like_match) @@ -694,7 +692,7 @@ class User_Query implements User_QueryInterface /** * Restrict User search on base_ids * - * @param array $base_ids + * @param array $base_ids * @return User_Query */ public function on_base_ids(Array $base_ids = null) @@ -719,7 +717,7 @@ class User_Query implements User_QueryInterface /** * - * @param array $sbas_ids + * @param array $sbas_ids * @return User_Query */ public function on_sbas_ids(Array $sbas_ids = null) @@ -746,8 +744,8 @@ class User_Query implements User_QueryInterface * Sort results. Sort field and sort order are defined as constants * of this object * - * @param const $sort - * @param const $ord + * @param const $sort + * @param const $ord * @return User_Query */ public function sort_by($sort, $ord = 'asc') @@ -876,7 +874,7 @@ class User_Query implements User_QueryInterface * Wheter or not retrieve inactive users * (inactive users do not have the "access" right) * - * @param boolean $boolean + * @param boolean $boolean * @return User_Query */ public function get_inactives($boolean = true) diff --git a/lib/classes/ZipArchiveImproved.class.php b/lib/classes/ZipArchiveImproved.class.php index 5de73cb115..6a07b40a31 100644 --- a/lib/classes/ZipArchiveImproved.class.php +++ b/lib/classes/ZipArchiveImproved.class.php @@ -58,7 +58,7 @@ class ZipArchiveImproved extends ZipArchive * overwrites ZipArchive::open() to add the archiveFileName functionality. * * @param string $fileName - * @param int $flags + * @param int $flags * return mixed */ public function open($fileName, $flags) @@ -102,8 +102,8 @@ class ZipArchiveImproved extends ZipArchive * adds a file to a ZIP archive from the given path. calls the ZipArchive::addFile() internally. * overwrites ZipArchive::addFile() to handle maximum file connections in operating systems. * - * @param string $fileName the path to file to be added to archive - * @param string [optional] $localname the name of the file in the ZIP archive + * @param string $fileName the path to file to be added to archive + * @param string [optional] $localname the name of the file in the ZIP archive * @return bool */ public function addFile($fileName) diff --git a/lib/classes/appbox.class.php b/lib/classes/appbox.class.php index e3fd27f960..fe06c750b8 100644 --- a/lib/classes/appbox.class.php +++ b/lib/classes/appbox.class.php @@ -185,8 +185,8 @@ class appbox extends base /** * - * @param collection $collection - * @param $ordre + * @param collection $collection + * @param $ordre * @return appbox */ public function set_collection_order(collection $collection, $ordre) @@ -203,8 +203,8 @@ class appbox extends base /** * - * @param databox $databox - * @param $boolean + * @param databox $databox + * @param $boolean * @return appbox */ public function set_databox_indexable(databox $databox, $boolean) @@ -224,7 +224,7 @@ class appbox extends base /** * - * @param databox $databox + * @param databox $databox * @return */ public function is_databox_indexable(databox $databox) @@ -243,8 +243,8 @@ class appbox extends base /** * - * @param databox $databox - * @param $viewname + * @param databox $databox + * @param $viewname * @return appbox */ public function set_databox_viewname(databox $databox, $viewname) @@ -315,7 +315,7 @@ class appbox extends base foreach ($finder as $file) { $core['file-system']->remove($file); } - + $upgrader->add_steps_complete(1); /** @@ -383,10 +383,10 @@ class appbox extends base /** * - * @param registryInterface $registry - * @param type $conn - * @param type $dbname - * @param type $write_file + * @param registryInterface $registry + * @param type $conn + * @param type $dbname + * @param type $write_file * @return type */ public static function create(\Alchemy\Phrasea\Core $Core, registryInterface &$registry, connection_interface $conn, $dbname, $write_file = false) @@ -567,7 +567,7 @@ class appbox extends base /** * - * @param $option + * @param $option * @return string */ public function get_cache_key($option = null) diff --git a/lib/classes/appbox/register.class.php b/lib/classes/appbox/register.class.php index 30dc5a64e6..854bd796b2 100644 --- a/lib/classes/appbox/register.class.php +++ b/lib/classes/appbox/register.class.php @@ -27,7 +27,7 @@ class appbox_register * Construct an Appbox_Register object which will give use infos * about the current registrations on the provided appbox * - * @param appbox $appbox + * @param appbox $appbox * @return appbox_register */ public function __construct(appbox &$appbox) @@ -40,8 +40,8 @@ class appbox_register /** * Add a registration request for a user on a collection * - * @param User_Interface $user - * @param collection $collection + * @param User_Interface $user + * @param collection $collection * @return appbox_register */ public function add_request(User_Interface $user, collection $collection) @@ -59,7 +59,7 @@ class appbox_register * Return an array of collection objects where provided * user is waiting for approbation * - * @param User_Interface $user + * @param User_Interface $user * @return array */ public function get_collection_awaiting_for_user(User_Interface $user) @@ -80,7 +80,7 @@ class appbox_register /** * Remove all registration older than a month * - * @param appbox $appbox + * @param appbox $appbox * @return appbox_register */ public static function clean_old_requests(appbox $appbox) diff --git a/lib/classes/base.class.php b/lib/classes/base.class.php index fda4010325..ef1c44c951 100644 --- a/lib/classes/base.class.php +++ b/lib/classes/base.class.php @@ -68,7 +68,7 @@ abstract class base implements cache_cacheableInterface /** * */ - abstract function get_base_type(); + abstract public function get_base_type(); /** * @@ -141,7 +141,7 @@ abstract class base implements cache_cacheableInterface /** * - * @param registryInterface $registry + * @param registryInterface $registry * @return base */ public function set_registry(registryInterface $registry) @@ -163,7 +163,7 @@ abstract class base implements cache_cacheableInterface /** * Replaces the connection * - * @param \connection_pdo $connection + * @param \connection_pdo $connection * @return \base */ public function set_connection(\connection_pdo $connection) @@ -184,7 +184,7 @@ abstract class base implements cache_cacheableInterface /** * - * @param $option + * @param $option * @return */ public function get_data_from_cache($option = null) @@ -429,7 +429,7 @@ abstract class base implements cache_cacheableInterface /** * - * @param SimpleXMLElement $table + * @param SimpleXMLElement $table * @return base */ protected function createTable(SimpleXMLElement $table) diff --git a/lib/classes/cache/databox.class.php b/lib/classes/cache/databox.class.php index 4e6ba1708d..19a20abd46 100644 --- a/lib/classes/cache/databox.class.php +++ b/lib/classes/cache/databox.class.php @@ -21,7 +21,7 @@ class cache_databox /** * - * @param int $sbas_id + * @param int $sbas_id * @return cache_databox */ public static function refresh($sbas_id) @@ -145,9 +145,9 @@ class cache_databox /** * - * @param int $sbas_id - * @param string $type - * @param mixed content $value + * @param int $sbas_id + * @param string $type + * @param mixed content $value * @return Void */ public static function update($sbas_id, $type, $value = '') diff --git a/lib/classes/caption/Field/Value.class.php b/lib/classes/caption/Field/Value.class.php index 14b37ff44f..27e53dde7e 100644 --- a/lib/classes/caption/Field/Value.class.php +++ b/lib/classes/caption/Field/Value.class.php @@ -56,9 +56,9 @@ class caption_Field_Value /** * - * @param databox_field $databox_field - * @param record_adapter $record - * @param type $id + * @param databox_field $databox_field + * @param record_adapter $record + * @param type $id * @return \caption_Field_Value */ public function __construct(databox_field $databox_field, record_adapter $record, $id) @@ -264,7 +264,7 @@ class caption_Field_Value /** * - * @param array $value + * @param array $value * @return caption_field */ public function update_cache_value($value) @@ -476,7 +476,7 @@ class caption_Field_Value /** * - * @param string $word + * @param string $word * @return array */ protected function splitTermAndContext($word) diff --git a/lib/classes/caption/field.class.php b/lib/classes/caption/field.class.php index bd79f93dc9..3e92fe7e22 100644 --- a/lib/classes/caption/field.class.php +++ b/lib/classes/caption/field.class.php @@ -37,9 +37,9 @@ class caption_field /** * - * @param databox_field $databox_field - * @param record_Interface $record - * @param int $id + * @param databox_field $databox_field + * @param record_Interface $record + * @param int $id * @return caption_field */ public function __construct(databox_field &$databox_field, record_Interface $record) @@ -130,8 +130,8 @@ class caption_field /** * - * @param array $values - * @param string $separator + * @param array $values + * @param string $separator * @return string */ protected static function serialize_value(Array $values, $separator, $highlight = false) @@ -167,7 +167,7 @@ class caption_field /** * - * @param int $meta_id + * @param int $meta_id * @return array */ public function get_value($meta_id) @@ -177,7 +177,7 @@ class caption_field /** * - * @param string $custom_separator + * @param string $custom_separator * @return mixed */ public function get_serialized_values($custom_separator = false, $highlightTheso = false) @@ -189,8 +189,7 @@ class caption_field $separator = $this->databox_field->get_separator(); return self::serialize_value($this->values, $separator, $highlightTheso); - } - else { + } else { foreach ($this->values as $value) { /* @var $value Caption_Field_Value */ @@ -250,8 +249,8 @@ class caption_field /** * - * @param string $serialized_value - * @param string $separator + * @param string $serialized_value + * @param string $separator * @return array */ public static function get_multi_values($serialized_value, $separator) diff --git a/lib/classes/caption/record.class.php b/lib/classes/caption/record.class.php index 95c04b0c33..82873dd6f6 100644 --- a/lib/classes/caption/record.class.php +++ b/lib/classes/caption/record.class.php @@ -42,8 +42,8 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * - * @param record_Interface $record - * @param databox $databox + * @param record_Interface $record + * @param databox $databox * @return caption_record */ public function __construct(record_Interface &$record, databox &$databox) @@ -172,7 +172,7 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * - * @param array $grep_fields + * @param array $grep_fields * @return array */ public function get_fields(Array $grep_fields = null, $IncludeBusiness = false) @@ -196,7 +196,7 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * - * @param type $fieldname + * @param type $fieldname * @return \caption_field * @throws \Exception */ @@ -213,7 +213,7 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * - * @param type $label + * @param type $label * @return caption_field */ public function get_dc_field($label) @@ -228,9 +228,9 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * - * @param string $highlight - * @param array $grep_fields - * @param searchEngine_adapter $searchEngine + * @param string $highlight + * @param array $grep_fields + * @param searchEngine_adapter $searchEngine * @return array */ public function get_highlight_fields($highlight = '', Array $grep_fields = null, searchEngine_adapter $searchEngine = null, $includeBusiness = false) @@ -240,9 +240,9 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * @todo move this fun in caption_field object - * @param string $highlight - * @param array $grep_fields - * @param searchEngine_adapter $searchEngine + * @param string $highlight + * @param array $grep_fields + * @param searchEngine_adapter $searchEngine * @return array */ protected function highlight_fields($highlight, Array $grep_fields = null, searchEngine_adapter $searchEngine = null, $includeBusiness = false) @@ -289,7 +289,7 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param string $option + * @param string $option * @return string */ public function get_cache_key($option = null) @@ -300,7 +300,7 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param string $option + * @param string $option * @return mixed */ public function get_data_from_cache($option = null) @@ -313,9 +313,9 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param mixed $value - * @param string $option - * @param int $duration + * @param mixed $value + * @param string $option + * @param int $duration * @return caption_field */ public function set_data_to_cache($value, $option = null, $duration = 0) @@ -328,7 +328,7 @@ class caption_record implements caption_interface, cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param string $option + * @param string $option * @return caption_field */ public function delete_data_from_cache($option = null) diff --git a/lib/classes/collection.class.php b/lib/classes/collection.class.php index 4b55dc9ad2..a1542fe6eb 100644 --- a/lib/classes/collection.class.php +++ b/lib/classes/collection.class.php @@ -360,7 +360,7 @@ class collection implements cache_cacheableInterface /** * - * @param int $base_id + * @param int $base_id * @return collection */ public static function get_from_base_id($base_id) @@ -377,8 +377,8 @@ class collection implements cache_cacheableInterface /** * - * @param int $sbas_id - * @param int $coll_id + * @param int $sbas_id + * @param int $coll_id * @return collection */ public static function get_from_coll_id(databox $databox, $coll_id) diff --git a/lib/classes/connection.class.php b/lib/classes/connection.class.php index 6119b473a5..4074b9af46 100755 --- a/lib/classes/connection.class.php +++ b/lib/classes/connection.class.php @@ -100,7 +100,7 @@ class connection /** * - * @param string $name + * @param string $name * @return connection_pdo */ public static function getPDOConnection($name = null, registryInterface $registry = null) @@ -159,7 +159,7 @@ class connection /** * - * @param type $name + * @param type $name * @return type */ public static function close_PDO_connection($name) diff --git a/lib/classes/connection/abstract.class.php b/lib/classes/connection/abstract.class.php index 94aa5dd8a5..99210e8ee7 100644 --- a/lib/classes/connection/abstract.class.php +++ b/lib/classes/connection/abstract.class.php @@ -67,8 +67,8 @@ abstract class connection_abstract extends PDO /** * - * @param string $statement - * @param array $driver_options + * @param string $statement + * @param array $driver_options * @return PDOStatement */ public function prepare($statement, $driver_options = array()) diff --git a/lib/classes/connection/pdo.class.php b/lib/classes/connection/pdo.class.php index 1225d5a27f..70aeafc89f 100644 --- a/lib/classes/connection/pdo.class.php +++ b/lib/classes/connection/pdo.class.php @@ -21,13 +21,13 @@ class connection_pdo extends connection_abstract implements connection_interface /** * - * @param string $name - * @param string $hostname - * @param int $port - * @param string $user - * @param string $passwd - * @param string $dbname - * @param array $options + * @param string $name + * @param string $hostname + * @param int $port + * @param string $user + * @param string $passwd + * @param string $dbname + * @param array $options * @return connection_pdo */ public function __construct($name, $hostname, $port, $user, $passwd, $dbname = false, $options = array(), registryInterface $registry = null) @@ -59,8 +59,8 @@ class connection_pdo extends connection_abstract implements connection_interface /** * - * @param type $statement - * @param type $driver_options + * @param type $statement + * @param type $driver_options * @return PDOStatement */ public function prepare($statement, $driver_options = array()) @@ -83,7 +83,7 @@ class connection_pdo extends connection_abstract implements connection_interface /** * - * @param string $message + * @param string $message * @return connection_pdo */ protected function log($message) diff --git a/lib/classes/databox.class.php b/lib/classes/databox.class.php index 49663bab48..35ae5181ba 100644 --- a/lib/classes/databox.class.php +++ b/lib/classes/databox.class.php @@ -102,7 +102,7 @@ class databox extends base /** * - * @param int $sbas_id + * @param int $sbas_id * @return databox */ protected function __construct($sbas_id) @@ -172,8 +172,8 @@ class databox extends base /** * - * @param int $record_id - * @param int $number + * @param int $record_id + * @param int $number * @return record_adapter */ public function get_record($record_id, $number = null) @@ -188,7 +188,7 @@ class databox extends base /** * - * @param int $sbas_id + * @param int $sbas_id * @return databox */ public static function get_instance($sbas_id) @@ -476,12 +476,12 @@ class databox extends base /** * - * @param string $host - * @param int $port - * @param string $user - * @param string $password - * @param string $dbname - * @param registry $registry + * @param string $host + * @param int $port + * @param string $user + * @param string $password + * @param string $dbname + * @param registry $registry * @return databox */ public static function mount(appbox $appbox, $host, $port, $user, $password, $dbname, registry $registry) @@ -588,8 +588,8 @@ class databox extends base /** * - * @param $repository_path - * @param $date + * @param $repository_path + * @param $date * @return */ public static function dispatch($repository_path, $date = false) @@ -767,7 +767,7 @@ class databox extends base /** * - * @param DOMDocument $dom_struct + * @param DOMDocument $dom_struct * @return databox */ public function saveStructure(DOMDocument $dom_struct) @@ -926,7 +926,7 @@ class databox extends base /** * - * @param User_Interface $user + * @param User_Interface $user * @return databox */ public function registerAdmin(User_Interface $user) @@ -988,7 +988,7 @@ class databox extends base /** * - * @param $sbas_id + * @param $sbas_id * @return */ public static function getPrintLogo($sbas_id) @@ -1026,7 +1026,7 @@ class databox extends base /** * - * @param $sbas_id + * @param $sbas_id * @return DOMDocument */ public function get_dom_thesaurus() @@ -1048,7 +1048,7 @@ class databox extends base /** * - * @param $sbas_id + * @param $sbas_id * @return DOMXpath */ public function get_xpath_thesaurus() @@ -1070,7 +1070,7 @@ class databox extends base /** * - * @param int $sbas_id + * @param int $sbas_id * @return SimpleXMLElement */ public function get_sxml_thesaurus() @@ -1092,7 +1092,7 @@ class databox extends base /** * - * @param int $sbas_id + * @param int $sbas_id * @return string */ public function get_thesaurus() @@ -1183,7 +1183,7 @@ class databox extends base /** * - * @param $sbas_id + * @param $sbas_id * @return DOMDocument */ public function get_dom_structure() @@ -1210,7 +1210,7 @@ class databox extends base /** * - * @param $sbas_id + * @param $sbas_id * @return DOMDocument */ public function get_dom_cterms() @@ -1257,7 +1257,7 @@ class databox extends base /** * - * @param $sbas_id + * @param $sbas_id * @return DOMXpath */ public function get_xpath_structure() @@ -1278,7 +1278,7 @@ class databox extends base /** * - * @param string $structure + * @param string $structure * @return Array */ public static function get_structure_errors($structure) diff --git a/lib/classes/databox/descriptionStructure.class.php b/lib/classes/databox/descriptionStructure.class.php index a5e33743b9..0221ad41ae 100644 --- a/lib/classes/databox/descriptionStructure.class.php +++ b/lib/classes/databox/descriptionStructure.class.php @@ -40,7 +40,7 @@ class databox_descriptionStructure implements IteratorAggregate /** * - * @param databox_field $field + * @param databox_field $field * @return databox_descriptionStructure */ public function add_element(databox_field $field) @@ -52,7 +52,7 @@ class databox_descriptionStructure implements IteratorAggregate /** * - * @param databox_field $field + * @param databox_field $field * @return databox_descriptionStructure */ public function remove_element(databox_field $field) @@ -74,7 +74,7 @@ class databox_descriptionStructure implements IteratorAggregate /** * - * @param int $id + * @param int $id * @return databox_field */ public function get_element($id) @@ -87,7 +87,7 @@ class databox_descriptionStructure implements IteratorAggregate /** * - * @param string $name + * @param string $name * @return databox_field */ public function get_element_by_name($name) @@ -111,7 +111,7 @@ class databox_descriptionStructure implements IteratorAggregate /** * - * @param string $id + * @param string $id * @return boolean */ public function isset_element($id) diff --git a/lib/classes/databox/field.class.php b/lib/classes/databox/field.class.php index 44f06c2ba9..f1d54cc29d 100644 --- a/lib/classes/databox/field.class.php +++ b/lib/classes/databox/field.class.php @@ -151,8 +151,8 @@ class databox_field implements cache_cacheableInterface /** * - * @param databox $databox - * @param $id + * @param databox $databox + * @param $id * @return databox_field */ protected function __construct(databox &$databox, $id) @@ -239,8 +239,8 @@ class databox_field implements cache_cacheableInterface /** * - * @param \databox $databox - * @param int $id + * @param \databox $databox + * @param int $id * @return \databox_field */ public static function get_instance(databox &$databox, $id) @@ -414,7 +414,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param string $name + * @param string $name * @return databox_field */ public function set_name($name) @@ -439,7 +439,7 @@ class databox_field implements cache_cacheableInterface /** * Get a PHPExiftool Tag from tagName * - * @param type $tagName + * @param type $tagName * @return \PHPExiftool\Driver\Tag * @throws Exception_Databox_metadataDescriptionNotFound */ @@ -523,7 +523,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param boolean $bool + * @param boolean $bool * @return databox_field */ public function set_indexable($bool) @@ -536,7 +536,7 @@ class databox_field implements cache_cacheableInterface /** * Set a vocabulary * - * @param Vocabulary\ControlProvider\ControlProviderInterface $vocabulary + * @param Vocabulary\ControlProvider\ControlProviderInterface $vocabulary * @return \databox_field */ public function setVocabularyControl(Vocabulary\ControlProvider\ControlProviderInterface $vocabulary = null) @@ -549,8 +549,8 @@ class databox_field implements cache_cacheableInterface /** * Set whether or not the vocabulary is restricted to the provider * - * @param boolean $boolean - * @return \databox_field + * @param boolean $boolean + * @return \databox_field */ public function setVocabularyRestricted($boolean) { @@ -561,7 +561,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param boolean $bool + * @param boolean $bool * @return databox_field */ public function set_readonly($readonly) @@ -573,7 +573,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param boolean $boolean + * @param boolean $boolean * @return databox_field */ public function set_business($boolean) @@ -585,7 +585,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param boolean $bool + * @param boolean $bool * @return databox_field */ public function set_required($required) @@ -597,7 +597,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param boolean $bool + * @param boolean $bool * @return databox_field */ public function set_multi($multi) @@ -617,7 +617,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param boolean $bool + * @param boolean $bool * @return databox_field */ public function set_report($report) @@ -629,7 +629,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param string $type + * @param string $type * @return databox_field */ public function set_type($type) @@ -641,7 +641,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param string $type + * @param string $type * @return databox_field */ public function set_tbranch($branch) @@ -653,7 +653,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param string $type + * @param string $type * @return databox_field */ public function set_separator($separator) @@ -666,9 +666,9 @@ class databox_field implements cache_cacheableInterface /** * Return the separator depending of the multi attribute * - * @param string $separator - * @param boolean $multi - * @return string + * @param string $separator + * @param boolean $multi + * @return string */ protected static function checkMultiSeparator($separator, $multi) { @@ -685,7 +685,7 @@ class databox_field implements cache_cacheableInterface /** * - * @param string $type + * @param string $type * @return databox_field */ public function set_thumbtitle($value) @@ -881,7 +881,7 @@ class databox_field implements cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param string $option + * @param string $option * @return string */ public function get_cache_key($option = null) @@ -892,7 +892,7 @@ class databox_field implements cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param string $option + * @param string $option * @return mixed */ public function get_data_from_cache($option = null) @@ -903,9 +903,9 @@ class databox_field implements cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param mixed $value - * @param string $option - * @param int $duration + * @param mixed $value + * @param string $option + * @param int $duration * @return caption_field */ public function set_data_to_cache($value, $option = null, $duration = 0) @@ -916,7 +916,7 @@ class databox_field implements cache_cacheableInterface /** * Part of the cache_cacheableInterface * - * @param string $option + * @param string $option * @return caption_field */ public function delete_data_from_cache($option = null) diff --git a/lib/classes/databox/status.class.php b/lib/classes/databox/status.class.php index 9a35b43cde..3d9f0a4ab1 100644 --- a/lib/classes/databox/status.class.php +++ b/lib/classes/databox/status.class.php @@ -49,7 +49,7 @@ class databox_status /** * - * @param int $sbas_id + * @param int $sbas_id * @return status */ private function __construct($sbas_id) @@ -411,7 +411,7 @@ class databox_status $switch = in_array($switch, array('on', 'off')) ? $switch : false; - if ( ! $switch){ + if ( ! $switch) { throw new Exception_InvalidArgument(); } diff --git a/lib/classes/databox/subdef.class.php b/lib/classes/databox/subdef.class.php index 39b017c371..d47826c469 100644 --- a/lib/classes/databox/subdef.class.php +++ b/lib/classes/databox/subdef.class.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -use MediaAlchemyst\Specification\Specification; use Alchemy\Phrasea\Media\Subdef\Image; use Alchemy\Phrasea\Media\Subdef\Audio; use Alchemy\Phrasea\Media\Subdef\Video; @@ -60,7 +59,7 @@ class databox_subdef /** * - * @param SimpleXMLElement $sd + * @param SimpleXMLElement $sd * @return databox_subdef */ public function __construct(SubdefType $type, SimpleXMLElement $sd) @@ -286,7 +285,7 @@ class databox_subdef /** * Build Image Subdef object depending the SimpleXMLElement * - * @param SimpleXMLElement $sd + * @param SimpleXMLElement $sd * @return \Alchemy\Phrasea\Media\Subdef\Video */ protected function buildImageSubdef(SimpleXMLElement $sd) @@ -312,7 +311,7 @@ class databox_subdef /** * Build Audio Subdef object depending the SimpleXMLElement * - * @param SimpleXMLElement $sd + * @param SimpleXMLElement $sd * @return \Alchemy\Phrasea\Media\Subdef\Video */ protected function buildAudioSubdef(SimpleXMLElement $sd) @@ -323,7 +322,7 @@ class databox_subdef /** * Build Flexpaper Subdef object depending the SimpleXMLElement * - * @param SimpleXMLElement $sd + * @param SimpleXMLElement $sd * @return \Alchemy\Phrasea\Media\Subdef\Video */ protected function buildFlexPaperSubdef(SimpleXMLElement $sd) @@ -334,7 +333,7 @@ class databox_subdef /** * Build GIF Subdef object depending the SimpleXMLElement * - * @param SimpleXMLElement $sd + * @param SimpleXMLElement $sd * @return \Alchemy\Phrasea\Media\Subdef\Video */ protected function buildGifSubdef(SimpleXMLElement $sd) @@ -354,7 +353,7 @@ class databox_subdef /** * Build Video Subdef object depending the SimpleXMLElement * - * @param SimpleXMLElement $sd + * @param SimpleXMLElement $sd * @return \Alchemy\Phrasea\Media\Subdef\Video */ protected function buildVideoSubdef(SimpleXMLElement $sd) diff --git a/lib/classes/databox/subdefsStructure.class.php b/lib/classes/databox/subdefsStructure.class.php index 604aefa0d9..32f444564b 100644 --- a/lib/classes/databox/subdefsStructure.class.php +++ b/lib/classes/databox/subdefsStructure.class.php @@ -33,7 +33,7 @@ class databox_subdefsStructure implements IteratorAggregate /** * - * @param databox $databox + * @param databox $databox * @return Array */ public function __construct(databox &$databox) @@ -122,8 +122,8 @@ class databox_subdefsStructure implements IteratorAggregate /** * - * @param type $subdef_type - * @param type $subdef_name + * @param type $subdef_type + * @param type $subdef_name * @return databox_subdef */ public function get_subdef($subdef_type, $subdef_name) @@ -136,8 +136,8 @@ class databox_subdefsStructure implements IteratorAggregate /** * - * @param string $group - * @param string $name + * @param string $group + * @param string $name * @return databox_subdefsStructure */ public function delete_subdef($group, $name) @@ -168,9 +168,9 @@ class databox_subdefsStructure implements IteratorAggregate /** * - * @param string $group - * @param string $name - * @param string $class + * @param string $group + * @param string $name + * @param string $class * @return databox_subdefsStructure */ public function add_subdef($groupname, $name, $class) @@ -204,11 +204,11 @@ class databox_subdefsStructure implements IteratorAggregate /** * - * @param string $group - * @param string $name - * @param string $class - * @param boolean $downloadable - * @param Array $options + * @param string $group + * @param string $name + * @param string $class + * @param boolean $downloadable + * @param Array $options * @return databox_subdefsStructure */ public function set_subdef($group, $name, $class, $downloadable, $options) diff --git a/lib/classes/deprecated/inscript.api.php b/lib/classes/deprecated/inscript.api.php index 514cfde1d9..b160e1de20 100644 --- a/lib/classes/deprecated/inscript.api.php +++ b/lib/classes/deprecated/inscript.api.php @@ -156,8 +156,7 @@ function giveMeBases($usr = null) $inscriptions[$sbas_id]['CollsNonactif'][$collection->get_coll_id()] = $lacgu; elseif ($usrerRegis[$databox->get_dbname()][$collection->get_coll_id()] === true) $inscriptions[$sbas_id]['CollsRegistered'][$collection->get_coll_id()] = $lacgu; - } - elseif ( ! $cguSpec && $collInscript) {//ne va pas.. si l'inscriptio na la coll est explicitement non autorise, je refuse' + } elseif ( ! $cguSpec && $collInscript) {//ne va pas.. si l'inscriptio na la coll est explicitement non autorise, je refuse' $inscriptions[$sbas_id]['Colls'][$collection->get_coll_id()] = $collection->get_name(); } elseif ($cguSpec) { $inscriptions[$sbas_id]['CollsCGU'][$collection->get_coll_id()]['name'] = $collection->get_name(); diff --git a/lib/classes/eventsmanager/broker.class.php b/lib/classes/eventsmanager/broker.class.php index 9c0c2377ec..1901939cd3 100644 --- a/lib/classes/eventsmanager/broker.class.php +++ b/lib/classes/eventsmanager/broker.class.php @@ -39,7 +39,7 @@ class eventsmanager_broker return self::$_instance; } - function start() + public function start() { $iterators_pool = array( 'event' => (is_array($this->appbox->get_registry()->get('GV_events')) ? $this->appbox->get_registry()->get('GV_events') : array()), @@ -107,7 +107,7 @@ class eventsmanager_broker return $ret; } - function trigger($event, $array_params = array(), &$object = false) + public function trigger($event, $array_params = array(), &$object = false) { if (array_key_exists($event, $this->events)) { foreach ($this->events[$event] as $classname) { @@ -118,7 +118,7 @@ class eventsmanager_broker return; } - function bind($event, $object_name) + public function bind($event, $object_name) { if ( ! array_key_exists($event, $this->events)) @@ -127,7 +127,7 @@ class eventsmanager_broker $this->events[$event][] = $object_name; } - function notify($usr_id, $event_type, $datas, $mailed = false) + public function notify($usr_id, $event_type, $datas, $mailed = false) { try { $event_type = str_replace('eventsmanager_', '', $event_type); @@ -153,7 +153,7 @@ class eventsmanager_broker return true; } - function get_json_notifications($page = 0) + public function get_json_notifications($page = 0) { $appbox = appbox::get_instance(\bootstrap::getCore()); $session = $appbox->get_session(); @@ -226,7 +226,7 @@ class eventsmanager_broker return p4string::jsonencode($datas); } - function get_unread_notifications_number() + public function get_unread_notifications_number() { $appbox = appbox::get_instance(\bootstrap::getCore()); $session = $appbox->get_session(); @@ -248,7 +248,7 @@ class eventsmanager_broker return $total; } - function get_notifications() + public function get_notifications() { $appbox = appbox::get_instance(\bootstrap::getCore()); $session = $appbox->get_session(); @@ -314,7 +314,7 @@ class eventsmanager_broker return $ret; } - function read(Array $notifications, $usr_id) + public function read(Array $notifications, $usr_id) { if (count($notifications) == 0) { return false; @@ -331,7 +331,7 @@ class eventsmanager_broker return $this; } - function mailed($notification, $usr_id) + public function mailed($notification, $usr_id) { $sql = 'UPDATE notifications SET mailed="0" WHERE usr_id = :usr_id AND id = :notif_id'; @@ -343,7 +343,7 @@ class eventsmanager_broker return; } - function list_notifications_available($usr_id) + public function list_notifications_available($usr_id) { $personnal_notifications = array(); diff --git a/lib/classes/eventsmanager/event/test.class.php b/lib/classes/eventsmanager/event/test.class.php index b121efae90..7e128a25ea 100644 --- a/lib/classes/eventsmanager/event/test.class.php +++ b/lib/classes/eventsmanager/event/test.class.php @@ -25,9 +25,9 @@ class eventsmanager_event_test extends eventsmanager_eventAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return event_test */ public function fire($event, $params, &$object) diff --git a/lib/classes/eventsmanager/notify/autoregister.class.php b/lib/classes/eventsmanager/notify/autoregister.class.php index 52a0d4bb81..05924abd9f 100644 --- a/lib/classes/eventsmanager/notify/autoregister.class.php +++ b/lib/classes/eventsmanager/notify/autoregister.class.php @@ -34,9 +34,9 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return Void */ public function fire($event, $params, &$object) @@ -142,8 +142,8 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -189,12 +189,12 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param Array $datas + * @param Array $to + * @param Array $from + * @param Array $datas * @return boolean */ - function mail($to, $from, $datas) + public function mail($to, $from, $datas) { $subject = sprintf(_('admin::register: Inscription automatique sur %s') , $this->registry->get('GV_homeTitle')); @@ -258,7 +258,7 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { $bool = false; $session = $this->appbox->get_session(); diff --git a/lib/classes/eventsmanager/notify/bridgeuploadfail.class.php b/lib/classes/eventsmanager/notify/bridgeuploadfail.class.php index b04fdc42d6..ad5ed738c4 100644 --- a/lib/classes/eventsmanager/notify/bridgeuploadfail.class.php +++ b/lib/classes/eventsmanager/notify/bridgeuploadfail.class.php @@ -34,9 +34,9 @@ class eventsmanager_notify_bridgeuploadfail extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return Void */ public function fire($event, $params, &$object) @@ -102,8 +102,8 @@ class eventsmanager_notify_bridgeuploadfail extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -152,12 +152,12 @@ class eventsmanager_notify_bridgeuploadfail extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param Array $datas + * @param Array $to + * @param Array $from + * @param Array $datas * @return boolean */ - function mail($to, $from, $datas) + public function mail($to, $from, $datas) { $subject = sprintf('Echec upload sur %s' , $this->registry->get('GV_homeTitle')); @@ -175,7 +175,7 @@ class eventsmanager_notify_bridgeuploadfail extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { return true; } diff --git a/lib/classes/eventsmanager/notify/downloadmailfail.class.php b/lib/classes/eventsmanager/notify/downloadmailfail.class.php index eb5ed6ffae..6fa0cacb26 100644 --- a/lib/classes/eventsmanager/notify/downloadmailfail.class.php +++ b/lib/classes/eventsmanager/notify/downloadmailfail.class.php @@ -37,9 +37,9 @@ class eventsmanager_notify_downloadmailfail extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return Void */ public function fire($event, $params, &$object) @@ -105,8 +105,8 @@ class eventsmanager_notify_downloadmailfail extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -162,7 +162,7 @@ class eventsmanager_notify_downloadmailfail extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { return true; } diff --git a/lib/classes/eventsmanager/notify/feed.class.php b/lib/classes/eventsmanager/notify/feed.class.php index 4ab1b32603..9dfb852c73 100644 --- a/lib/classes/eventsmanager/notify/feed.class.php +++ b/lib/classes/eventsmanager/notify/feed.class.php @@ -34,9 +34,9 @@ class eventsmanager_notify_feed extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return boolean */ public function fire($event, $params, &$entry) @@ -108,16 +108,15 @@ class eventsmanager_notify_feed extends eventsmanager_notifyAbstract $this->broker->notify($user_to_notif->get_id(), __CLASS__, $datas, $mailed); } $start += $perLoop; - } - while (count($results) > 0); + } while (count($results) > 0); return true; } /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -164,21 +163,21 @@ class eventsmanager_notify_feed extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { return true; } /** * - * @param Array $to - * @param Array $from - * @param string $message - * @param string $url - * @param boolean $accuse + * @param Array $to + * @param Array $from + * @param string $message + * @param string $url + * @param boolean $accuse * @return boolean */ - function mail($to, $from, $url, \Feed_Entry_Adapter $entry) + public function mail($to, $from, $url, \Feed_Entry_Adapter $entry) { $subject = sprintf(_('Nouvelle publication : %s'), $entry->get_title()); diff --git a/lib/classes/eventsmanager/notify/order.class.php b/lib/classes/eventsmanager/notify/order.class.php index f1c37965c5..1831aacba4 100644 --- a/lib/classes/eventsmanager/notify/order.class.php +++ b/lib/classes/eventsmanager/notify/order.class.php @@ -34,9 +34,9 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return Void */ public function fire($event, $params, &$object) @@ -126,8 +126,8 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return string */ public function datas($datas, $unread) @@ -176,12 +176,12 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param Array $datas + * @param Array $to + * @param Array $from + * @param Array $datas * @return boolean */ - function mail($to, $from, $datas) + public function mail($to, $from, $datas) { $subject = sprintf(_('admin::register: Nouvelle commande sur %s') , $this->registry->get('GV_homeTitle')); @@ -235,7 +235,7 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { $bool = false; $session = $this->appbox->get_session(); diff --git a/lib/classes/eventsmanager/notify/orderdeliver.class.php b/lib/classes/eventsmanager/notify/orderdeliver.class.php index 9d5f63e3a0..c2de7a4004 100644 --- a/lib/classes/eventsmanager/notify/orderdeliver.class.php +++ b/lib/classes/eventsmanager/notify/orderdeliver.class.php @@ -27,7 +27,7 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract * * @return notify_orderdeliver */ - function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) + public function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) { $this->group = _('Commande'); parent::__construct($appbox, $core, $broker); @@ -46,9 +46,9 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param Array $object + * @param string $event + * @param Array $params + * @param Array $object * @return boolean */ public function fire($event, $params, &$object) @@ -117,8 +117,8 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return string */ public function datas($datas, $unread) @@ -177,12 +177,12 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param int $ssel_id + * @param Array $to + * @param Array $from + * @param int $ssel_id * @return boolean */ - function mail($to, $from, $ssel_id) + public function mail($to, $from, $ssel_id) { try { $em = $this->core->getEntityManager(); @@ -214,7 +214,7 @@ class eventsmanager_notify_orderdeliver extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { return true; } diff --git a/lib/classes/eventsmanager/notify/ordernotdelivered.class.php b/lib/classes/eventsmanager/notify/ordernotdelivered.class.php index f6663bfa57..3952bf3802 100644 --- a/lib/classes/eventsmanager/notify/ordernotdelivered.class.php +++ b/lib/classes/eventsmanager/notify/ordernotdelivered.class.php @@ -22,7 +22,7 @@ class eventsmanager_notify_ordernotdelivered extends eventsmanager_notifyAbstrac */ public $events = array('__ORDER_NOT_DELIVERED__'); - function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) + public function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) { $this->group = _('Commande'); parent::__construct($appbox, $core, $broker); @@ -130,7 +130,7 @@ class eventsmanager_notify_ordernotdelivered extends eventsmanager_notifyAbstrac return _('Refus d\'elements de commande'); } - function mail($to, $from, $n) + public function mail($to, $from, $n) { $subject = sprintf(_('push::mail:: Refus d\'elements de votre commande')); @@ -146,7 +146,7 @@ class eventsmanager_notify_ordernotdelivered extends eventsmanager_notifyAbstrac * * @return boolean */ - function is_available() + public function is_available() { return true; } diff --git a/lib/classes/eventsmanager/notify/push.class.php b/lib/classes/eventsmanager/notify/push.class.php index bdf6a91c7d..797cb5d1f1 100644 --- a/lib/classes/eventsmanager/notify/push.class.php +++ b/lib/classes/eventsmanager/notify/push.class.php @@ -34,9 +34,9 @@ class eventsmanager_notify_push extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return boolean */ public function fire($event, $params, &$object) @@ -102,8 +102,8 @@ class eventsmanager_notify_push extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -152,21 +152,21 @@ class eventsmanager_notify_push extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { return true; } /** * - * @param Array $to - * @param Array $from - * @param string $message - * @param string $url - * @param boolean $accuse + * @param Array $to + * @param Array $from + * @param string $message + * @param string $url + * @param boolean $accuse * @return boolean */ - function mail($to, $from, $message, $url, $accuse) + public function mail($to, $from, $message, $url, $accuse) { $subject = _('push::mail:: Reception de documents'); diff --git a/lib/classes/eventsmanager/notify/register.class.php b/lib/classes/eventsmanager/notify/register.class.php index 3d807035f1..debf62e21f 100644 --- a/lib/classes/eventsmanager/notify/register.class.php +++ b/lib/classes/eventsmanager/notify/register.class.php @@ -34,9 +34,9 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return Void */ public function fire($event, $params, &$object) @@ -141,8 +141,8 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract /** * - * @param Array $datas - * @param boolean $unread + * @param Array $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -189,12 +189,12 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param string $datas + * @param Array $to + * @param Array $from + * @param string $datas * @return boolean */ - function mail($to, $from, $datas) + public function mail($to, $from, $datas) { $subject = sprintf( _('admin::register: demande d\'inscription sur %s'), $this->registry->get('GV_homeTitle') @@ -263,7 +263,7 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { $bool = false; diff --git a/lib/classes/eventsmanager/notify/validate.class.php b/lib/classes/eventsmanager/notify/validate.class.php index 002954984b..096d7c0f4a 100644 --- a/lib/classes/eventsmanager/notify/validate.class.php +++ b/lib/classes/eventsmanager/notify/validate.class.php @@ -27,7 +27,7 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract * * @return notify_validate */ - function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) + public function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) { $this->group = _('Validation'); parent::__construct($appbox, $core, $broker); @@ -46,9 +46,9 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return boolean */ public function fire($event, $params, &$object) @@ -114,8 +114,8 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract /** * - * @param string $datas - * @param boolean $unread + * @param string $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -180,14 +180,14 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param string $message - * @param string $url - * @param boolean $accuse + * @param Array $to + * @param Array $from + * @param string $message + * @param string $url + * @param boolean $accuse * @return boolean */ - function mail($to, $from, $message, $url, $accuse) + public function mail($to, $from, $message, $url, $accuse) { $subject = _('push::mail:: Demande de validation de documents'); @@ -210,7 +210,7 @@ class eventsmanager_notify_validate extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { return true; } diff --git a/lib/classes/eventsmanager/notify/validationdone.class.php b/lib/classes/eventsmanager/notify/validationdone.class.php index ed2e6c5182..1ae9eb5219 100644 --- a/lib/classes/eventsmanager/notify/validationdone.class.php +++ b/lib/classes/eventsmanager/notify/validationdone.class.php @@ -27,7 +27,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract * * @return notify_validationdone */ - function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) + public function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) { $this->group = _('Validation'); parent::__construct($appbox, $core, $broker); @@ -46,9 +46,9 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract /** * - * @param Array $event - * @param Array $params - * @param mixed content $object + * @param Array $event + * @param Array $params + * @param mixed content $object * @return boolean */ public function fire($event, $params, &$object) @@ -114,8 +114,8 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract /** * - * @param string $datas - * @param boolean $unread + * @param string $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -174,12 +174,12 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract /** * - * @param Array $to - * @param Array $from - * @param int $ssel_id + * @param Array $to + * @param Array $from + * @param int $ssel_id * @return boolean */ - function mail($to, $from, $ssel_id, $url) + public function mail($to, $from, $ssel_id, $url) { try { $em = $this->core->getEntityManager(); @@ -207,7 +207,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract * * @return boolean */ - function is_available() + public function is_available() { $bool = false; diff --git a/lib/classes/eventsmanager/notify/validationreminder.class.php b/lib/classes/eventsmanager/notify/validationreminder.class.php index a4649bc96e..58732e80fc 100644 --- a/lib/classes/eventsmanager/notify/validationreminder.class.php +++ b/lib/classes/eventsmanager/notify/validationreminder.class.php @@ -27,7 +27,7 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra * * @return notify_validationreminder */ - function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) + public function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core, eventsmanager_broker &$broker) { $this->group = _('Validation'); parent::__construct($appbox, $core, $broker); @@ -46,9 +46,9 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra /** * - * @param string $event - * @param Array $params - * @param mixed content $object + * @param string $event + * @param Array $params + * @param mixed content $object * @return boolean */ public function fire($event, $params, &$object) @@ -124,8 +124,8 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra /** * - * @param string $datas - * @param boolean $unread + * @param string $datas + * @param boolean $unread * @return Array */ public function datas($datas, $unread) @@ -188,12 +188,12 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra /** * - * @param Array $to - * @param Array $from - * @param string $url + * @param Array $to + * @param Array $from + * @param string $url * @return boolean */ - function mail($to, $from, $url) + public function mail($to, $from, $url) { $subject = _('push::mail:: Rappel de demande de validation de documents'); @@ -224,7 +224,7 @@ class eventsmanager_notify_validationreminder extends eventsmanager_notifyAbstra * * @return string */ - function is_available() + public function is_available() { return true; } diff --git a/lib/classes/eventsmanager/notifyAbstract.class.php b/lib/classes/eventsmanager/notifyAbstract.class.php index 7e7cd31c55..e7ccd5acf9 100644 --- a/lib/classes/eventsmanager/notifyAbstract.class.php +++ b/lib/classes/eventsmanager/notifyAbstract.class.php @@ -4,24 +4,24 @@ abstract class eventsmanager_notifyAbstract extends eventsmanager_eventAbstract { protected $events = array('__EVENT__'); - function fire($event, $params, &$object) + public function fire($event, $params, &$object) { } - abstract function datas($datas, $unread); + abstract public function datas($datas, $unread); - function is_available() + public function is_available() { return true; } - function email() + public function email() { return true; } - abstract function icon_url(); + abstract public function icon_url(); protected function get_prefs($class, $usr_id) { diff --git a/lib/classes/format.class.php b/lib/classes/format.class.php index 63d883d829..b0a22549f2 100644 --- a/lib/classes/format.class.php +++ b/lib/classes/format.class.php @@ -3,7 +3,7 @@ class format { - static public function arr_to_csv_line($arr, $tri_column = false) + public static function arr_to_csv_line($arr, $tri_column = false) { $line = array(); $tmp = array(); @@ -17,8 +17,7 @@ class format if (array_key_exists($key, $tri_column)) { $tmp[$key] = $v; } - } - else + } else $line[] = '"' . str_replace('"', '""', strip_tags($v)) . '"'; } if ($tri_column) { @@ -35,12 +34,11 @@ class format return implode(",", $line); } elseif (count($arr) == count($line)) { return implode(",", $line); - } - else + } else throw new Exception('CSV failed'); } - static public function arr_to_csv($arr, $tri_column = false) + public static function arr_to_csv($arr, $tri_column = false) { $lines = array(); diff --git a/lib/classes/gatekeeper.class.php b/lib/classes/gatekeeper.class.php index 110039070e..1bfef34773 100644 --- a/lib/classes/gatekeeper.class.php +++ b/lib/classes/gatekeeper.class.php @@ -58,7 +58,7 @@ class gatekeeper * * @return gatekeeper */ - function __construct(\Alchemy\Phrasea\Core $Core) + public function __construct(\Alchemy\Phrasea\Core $Core) { $this->Core = $Core; @@ -71,7 +71,7 @@ class gatekeeper * * @return Void */ - function check_directory() + public function check_directory() { $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); $appbox = appbox::get_instance($this->Core); diff --git a/lib/classes/http/query.class.php b/lib/classes/http/query.class.php index 9ef8a154c9..99b1ad7ec6 100644 --- a/lib/classes/http/query.class.php +++ b/lib/classes/http/query.class.php @@ -19,7 +19,7 @@ class http_query /** * - * @param string $url + * @param string $url * @return int */ public static function getHttpCodeFromUrl($url) @@ -80,8 +80,8 @@ class http_query /** * - * @param string $url - * @param array $post_data + * @param string $url + * @param array $post_data * @return string */ public static function getUrl($url, $post_data = false) diff --git a/lib/classes/http/request.class.php b/lib/classes/http/request.class.php index 7c6b2c5dcb..6d00a0eddb 100644 --- a/lib/classes/http/request.class.php +++ b/lib/classes/http/request.class.php @@ -75,7 +75,7 @@ class http_request * * @return http_request */ - function __construct() + public function __construct() { return $this; } @@ -121,7 +121,7 @@ class http_request /** * - * @param int $code + * @param int $code * @return http_request */ public function set_code($code) @@ -174,8 +174,8 @@ class http_request /** * - * @param array $indexes - * @param string $serializeds_datas_index + * @param array $indexes + * @param string $serializeds_datas_index * @return array */ public function get_parms_from_serialized_datas(Array $indexes, $serializeds_datas_index) @@ -235,9 +235,9 @@ class http_request /** * - * @param mixed content $data - * @param const $filter - * @return mixed content + * @param mixed content $data + * @param const $filter + * @return mixed content */ public function filter($data, $filter) { diff --git a/lib/classes/lazaret.class.php b/lib/classes/lazaret.class.php index 006dde689c..32950bf824 100644 --- a/lib/classes/lazaret.class.php +++ b/lib/classes/lazaret.class.php @@ -23,7 +23,7 @@ class lazaret extends set_abstract * * @return lazaret */ - function __construct() + public function __construct() { $appbox = appbox::get_instance(\bootstrap::getCore()); $session = $appbox->get_session(); diff --git a/lib/classes/lazaretFile.class.php b/lib/classes/lazaretFile.class.php index 721fe44c37..6df952e7dc 100644 --- a/lib/classes/lazaretFile.class.php +++ b/lib/classes/lazaretFile.class.php @@ -15,10 +15,10 @@ class lazaretFile /** * - * @param int $lazaret_id + * @param int $lazaret_id * @return lazaretFile */ - function __construct($lazaret_id) + public function __construct($lazaret_id) { $conn = connection::getPDOConnection(); @@ -105,8 +105,8 @@ class lazaretFile /** * - * @param Int $lazaret_id - * @param Int $record_id + * @param Int $lazaret_id + * @param Int $record_id * @return lazaretFile */ public function substitute($lazaret_id, $record_id) diff --git a/lib/classes/logs.class.php b/lib/classes/logs.class.php index 719523d76b..9065f967d6 100644 --- a/lib/classes/logs.class.php +++ b/lib/classes/logs.class.php @@ -2,9 +2,9 @@ class logs { - static $_last_check = array(); + public static $_last_check = array(); - static function rotate($filepath) + public static function rotate($filepath) { $limit = (1024 * 1024 * 20); diff --git a/lib/classes/media/Permalink/Adapter.class.php b/lib/classes/media/Permalink/Adapter.class.php index 2e7ffed9e6..25484a86a5 100644 --- a/lib/classes/media/Permalink/Adapter.class.php +++ b/lib/classes/media/Permalink/Adapter.class.php @@ -67,8 +67,8 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param databox $databox - * @param media_subdef $media_subdef + * @param databox $databox + * @param media_subdef $media_subdef * @return media_Permalink_Adapter */ protected function __construct(databox &$databox, media_subdef &$media_subdef) @@ -156,7 +156,7 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param registryInterface $registry + * @param registryInterface $registry * @return string */ public function get_page(registryInterface $registry) @@ -173,7 +173,7 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param string $token + * @param string $token * @return media_Permalink_Adapter */ protected function set_token($token) @@ -193,7 +193,7 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param string $is_activated + * @param string $is_activated * @return media_Permalink_Adapter */ public function set_is_activated($is_activated) @@ -219,7 +219,7 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param string $label + * @param string $label * @return media_Permalink_Adapter */ public function set_label($label) @@ -300,8 +300,8 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param databox $databox - * @param media_subdef $media_subdef + * @param databox $databox + * @param media_subdef $media_subdef * @return media_Permalink_Adapter */ public static function getPermalink(databox &$databox, media_subdef &$media_subdef) @@ -317,8 +317,8 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param databox $databox - * @param media_subdef $media_subdef + * @param databox $databox + * @param media_subdef $media_subdef * @return media_Permalink_Adapter */ public static function create(databox &$databox, media_subdef &$media_subdef) @@ -346,10 +346,10 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea /** * - * @param databox $databox - * @param string $token - * @param int $record_id - * @param string $name + * @param databox $databox + * @param string $token + * @param int $record_id + * @param string $name * @return record_adapter */ public static function challenge_token(databox &$databox, $token, $record_id, $name) diff --git a/lib/classes/media/abstract.class.php b/lib/classes/media/abstract.class.php index dfeb97d5a8..7cc3d0c51d 100644 --- a/lib/classes/media/abstract.class.php +++ b/lib/classes/media/abstract.class.php @@ -40,12 +40,12 @@ abstract class media_abstract /** * - * @param string $url - * @param int $width - * @param int $height + * @param string $url + * @param int $width + * @param int $height * @return media */ - function __construct($url, $width, $height) + public function __construct($url, $width, $height) { $this->url = $url; $this->height = (int) $height; diff --git a/lib/classes/media/subdef.class.php b/lib/classes/media/subdef.class.php index f9259f2903..f73db67de2 100644 --- a/lib/classes/media/subdef.class.php +++ b/lib/classes/media/subdef.class.php @@ -144,12 +144,12 @@ class media_subdef extends media_abstract implements cache_cacheableInterface * @todo the presence of file is checked on constructor, it would be better * to check it when needed (stop disk access) * - * @param record_adapter $record - * @param type $name - * @param type $substitute - * @return media_subdef + * @param record_adapter $record + * @param type $name + * @param type $substitute + * @return media_subdef */ - function __construct(record_adapter &$record, $name, $substitute = false) + public function __construct(record_adapter &$record, $name, $substitute = false) { $this->name = $name; $this->record = $record; @@ -165,7 +165,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface /** * - * @param boolean $substitute + * @param boolean $substitute * @return media_subdef */ protected function load($substitute) @@ -566,8 +566,8 @@ class media_subdef extends media_abstract implements cache_cacheableInterface /** * - * @param registryInterface $registry - * @param int $angle + * @param registryInterface $registry + * @param int $angle * @return media_subdef */ public function rotate($angle) @@ -759,7 +759,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface /** * - * @param boolean $random + * @param boolean $random * @return string */ protected function generate_url($random = false) diff --git a/lib/classes/module/admin.class.php b/lib/classes/module/admin.class.php index 0ce1920da3..df8f9e7507 100644 --- a/lib/classes/module/admin.class.php +++ b/lib/classes/module/admin.class.php @@ -18,7 +18,7 @@ class module_admin { - function getTree($position = false) + public function getTree($position = false) { $appbox = appbox::get_instance(\bootstrap::getCore()); $session = $appbox->get_session(); diff --git a/lib/classes/module/console/aboutAuthors.class.php b/lib/classes/module/console/aboutAuthors.class.php index 2406e6a694..e878c84737 100644 --- a/lib/classes/module/console/aboutAuthors.class.php +++ b/lib/classes/module/console/aboutAuthors.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/aboutLicense.class.php b/lib/classes/module/console/aboutLicense.class.php index 0b6d2775c4..d555eddd70 100644 --- a/lib/classes/module/console/aboutLicense.class.php +++ b/lib/classes/module/console/aboutLicense.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/checkExtension.class.php b/lib/classes/module/console/checkExtension.class.php index fd04733dbb..49c119bd40 100644 --- a/lib/classes/module/console/checkExtension.class.php +++ b/lib/classes/module/console/checkExtension.class.php @@ -15,8 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/classes/module/console/fieldsDelete.class.php b/lib/classes/module/console/fieldsDelete.class.php index 2cd78a21fd..e677533e50 100644 --- a/lib/classes/module/console/fieldsDelete.class.php +++ b/lib/classes/module/console/fieldsDelete.class.php @@ -15,10 +15,8 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/fieldsList.class.php b/lib/classes/module/console/fieldsList.class.php index dd3299c526..97cb492653 100644 --- a/lib/classes/module/console/fieldsList.class.php +++ b/lib/classes/module/console/fieldsList.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/fieldsMerge.class.php b/lib/classes/module/console/fieldsMerge.class.php index 9cbeffbce3..691edc015d 100644 --- a/lib/classes/module/console/fieldsMerge.class.php +++ b/lib/classes/module/console/fieldsMerge.class.php @@ -15,7 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/lib/classes/module/console/fieldsRename.class.php b/lib/classes/module/console/fieldsRename.class.php index a893500d0e..6fe00ee408 100644 --- a/lib/classes/module/console/fieldsRename.class.php +++ b/lib/classes/module/console/fieldsRename.class.php @@ -15,10 +15,8 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/fileEnsureDevSetting.class.php b/lib/classes/module/console/fileEnsureDevSetting.class.php index 5908b338f8..5bedbf89f7 100644 --- a/lib/classes/module/console/fileEnsureDevSetting.class.php +++ b/lib/classes/module/console/fileEnsureDevSetting.class.php @@ -15,7 +15,6 @@ use Symfony\Component\Console\Input\InputArgument, Symfony\Component\Console\Output\OutputInterface, Symfony\Component\Console\Command\Command; use Alchemy\Phrasea\Core; -use Symfony\Component\Yaml; /** * @todo write tests @@ -765,8 +764,7 @@ class module_console_fileEnsureDevSetting extends Command $key = $scope . ":" . $key; $this->printConf($output, $key, $val, $scopage, ''); } - } - elseif (is_bool($value)) { + } elseif (is_bool($value)) { if ($value === false) { $value = 'false'; } elseif ($value === true) { diff --git a/lib/classes/module/console/fileEnsureProductionSetting.class.php b/lib/classes/module/console/fileEnsureProductionSetting.class.php index 3889ac933b..ee8ddf7828 100644 --- a/lib/classes/module/console/fileEnsureProductionSetting.class.php +++ b/lib/classes/module/console/fileEnsureProductionSetting.class.php @@ -15,7 +15,6 @@ use Symfony\Component\Console\Input\InputArgument, Symfony\Component\Console\Output\OutputInterface, Symfony\Component\Console\Command\Command; use Alchemy\Phrasea\Core; -use Symfony\Component\Yaml; /** * @todo write tests @@ -771,8 +770,7 @@ class module_console_fileEnsureProductionSetting extends Command $key = $scope . ":" . $key; $this->printConf($output, $key, $val, $scopage, ''); } - } - elseif (is_bool($value)) { + } elseif (is_bool($value)) { if ($value === false) { $value = 'false'; } elseif ($value === true) { diff --git a/lib/classes/module/console/schedulerStart.class.php b/lib/classes/module/console/schedulerStart.class.php index 084e99a9f3..6d667ea456 100644 --- a/lib/classes/module/console/schedulerStart.class.php +++ b/lib/classes/module/console/schedulerStart.class.php @@ -15,8 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -65,8 +63,7 @@ class module_console_schedulerStart extends Command $scheduler = new task_Scheduler(); $scheduler->run($input, $output); } catch (\Exception $e) { - switch($e->getCode()) - { + switch ($e->getCode()) { case task_Scheduler::ERR_ALREADY_RUNNING: // 114 : aka EALREADY (Operation already in progress) $exitCode = ERR_ALREADY_RUNNING; break; @@ -74,6 +71,7 @@ class module_console_schedulerStart extends Command $exitCode = 1; // default exit code (error) break; } + return $exitCode; } } diff --git a/lib/classes/module/console/schedulerState.class.php b/lib/classes/module/console/schedulerState.class.php index fcd22e3cc3..de7d1eb580 100644 --- a/lib/classes/module/console/schedulerState.class.php +++ b/lib/classes/module/console/schedulerState.class.php @@ -15,8 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/classes/module/console/schedulerStop.class.php b/lib/classes/module/console/schedulerStop.class.php index c96f92b46b..346d00fcf2 100644 --- a/lib/classes/module/console/schedulerStop.class.php +++ b/lib/classes/module/console/schedulerStop.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/sphinxGenerateSuggestion.class.php b/lib/classes/module/console/sphinxGenerateSuggestion.class.php index 44a2580cf8..160b2fd08b 100644 --- a/lib/classes/module/console/sphinxGenerateSuggestion.class.php +++ b/lib/classes/module/console/sphinxGenerateSuggestion.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/systemBackupDB.class.php b/lib/classes/module/console/systemBackupDB.class.php index 5371b9049a..2c94434b56 100644 --- a/lib/classes/module/console/systemBackupDB.class.php +++ b/lib/classes/module/console/systemBackupDB.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/systemClearCache.class.php b/lib/classes/module/console/systemClearCache.class.php index c1ac30aadb..9f5d247ea7 100644 --- a/lib/classes/module/console/systemClearCache.class.php +++ b/lib/classes/module/console/systemClearCache.class.php @@ -14,11 +14,8 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Finder\Finder; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/systemConfigCheck.class.php b/lib/classes/module/console/systemConfigCheck.class.php index fd42c04e2d..04f96f5fe5 100644 --- a/lib/classes/module/console/systemConfigCheck.class.php +++ b/lib/classes/module/console/systemConfigCheck.class.php @@ -16,10 +16,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/systemExport.class.php b/lib/classes/module/console/systemExport.class.php index 76d8bc81cb..7c7f92dfe3 100644 --- a/lib/classes/module/console/systemExport.class.php +++ b/lib/classes/module/console/systemExport.class.php @@ -15,8 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/lib/classes/module/console/systemMailCheck.class.php b/lib/classes/module/console/systemMailCheck.class.php index 7189ee4081..b72e9e4ba4 100644 --- a/lib/classes/module/console/systemMailCheck.class.php +++ b/lib/classes/module/console/systemMailCheck.class.php @@ -16,10 +16,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/systemTemplateGenerator.class.php b/lib/classes/module/console/systemTemplateGenerator.class.php index ee1aac3afe..d1f1bffef7 100644 --- a/lib/classes/module/console/systemTemplateGenerator.class.php +++ b/lib/classes/module/console/systemTemplateGenerator.class.php @@ -15,10 +15,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/systemUpgrade.class.php b/lib/classes/module/console/systemUpgrade.class.php index eb6c44bd2d..3c7f5cf335 100644 --- a/lib/classes/module/console/systemUpgrade.class.php +++ b/lib/classes/module/console/systemUpgrade.class.php @@ -16,10 +16,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/taskState.class.php b/lib/classes/module/console/taskState.class.php index cdedb92bfd..eebf53f594 100644 --- a/lib/classes/module/console/taskState.class.php +++ b/lib/classes/module/console/taskState.class.php @@ -15,7 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/lib/classes/module/console/tasklist.class.php b/lib/classes/module/console/tasklist.class.php index f9922a9809..4e26fda76a 100644 --- a/lib/classes/module/console/tasklist.class.php +++ b/lib/classes/module/console/tasklist.class.php @@ -16,10 +16,7 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Command\Command; diff --git a/lib/classes/module/console/taskrun.class.php b/lib/classes/module/console/taskrun.class.php index 7023927801..4034c2a5de 100755 --- a/lib/classes/module/console/taskrun.class.php +++ b/lib/classes/module/console/taskrun.class.php @@ -15,7 +15,6 @@ * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -54,7 +53,7 @@ class module_console_taskrun extends Command return $this; } - function sig_handler($signo) + public function sig_handler($signo) { if ($this->task) { $this->task->log(sprintf("signal %s received", $signo)); diff --git a/lib/classes/module/report.class.php b/lib/classes/module/report.class.php index 0c2341e5ea..7aea7afd77 100644 --- a/lib/classes/module/report.class.php +++ b/lib/classes/module/report.class.php @@ -564,7 +564,7 @@ class module_report /** * Retourne un objet qui genere la requete selon le type de report - * @param string $domain + * @param string $domain * @return module_report_sqlconnexion */ public function sqlBuilder($domain) @@ -601,8 +601,8 @@ class module_report /** * initialise les configuration des columns ex : boundable, linkable orderable * etc .. par defaut ou celle passe en parametre par $tab - * @param array $tab - * @param string $groupby + * @param array $tab + * @param string $groupby * @return void */ protected function setDisplay($tab, $groupby = false) @@ -751,7 +751,7 @@ class module_report /** * @desc Initialize the configuration foreach column displayed in the report - * @param array $display contain the conf's variables + * @param array $display contain the conf's variables * @return void */ protected function initDefaultConfigColumn($display) @@ -806,8 +806,8 @@ class module_report /** * @desc build the final formated array which contains all the result, * we construct the html code from this array - * @param array $tab pass the configcolumn parameter to this tab - * @return the formated array + * @param array $tab pass the configcolumn parameter to this tab + * @return the formated array */ public function buildReport($tab = false, $groupby = false, $on = false) { diff --git a/lib/classes/module/report/activity.class.php b/lib/classes/module/report/activity.class.php index 23d0618c0c..91968ed402 100644 --- a/lib/classes/module/report/activity.class.php +++ b/lib/classes/module/report/activity.class.php @@ -52,7 +52,7 @@ class module_report_activity extends module_report /** * set top value - * @param int $nb_top + * @param int $nb_top * @return module_report_activity */ public function setTop($nb_top) @@ -213,8 +213,8 @@ class module_report_activity extends module_report /** * get the most asked question - * @param array $tab config for html table - * @param bool $no_answer true for question with no answer + * @param array $tab config for html table + * @param bool $no_answer true for question with no answer */ public function getTopQuestion($tab = false, $no_answer = false) { @@ -284,7 +284,7 @@ class module_report_activity extends module_report /** * @desc get all downloads from one specific user * @param $usr user id - * @param array $config config for the html table + * @param array $config config for the html table * @return array */ public function getAllDownloadByUserBase($usr, $config = false) @@ -360,7 +360,7 @@ class module_report_activity extends module_report /** * @desc get all download by base by day - * @param array $tab config for html table + * @param array $tab config for html table * @return array */ public function getDownloadByBaseByDay($tab = false) @@ -461,8 +461,8 @@ class module_report_activity extends module_report /** * @desc get nb connexion by user , fonction ,societe etc.. - * @param array $tab config for html table - * @param string $on choose the field on what you want the result + * @param array $tab config for html table + * @param string $on choose the field on what you want the result * @return array */ public function getConnexionBase($tab = false, $on = "") @@ -555,8 +555,8 @@ class module_report_activity extends module_report /** * @desc get the deail of download by users - * @param bool $ext false for your appbox conn, true for external connections - * @param array $tab config for the html table + * @param bool $ext false for your appbox conn, true for external connections + * @param array $tab config for the html table * @return array */ public function getDetailDownload($tab = false, $on = "") diff --git a/lib/classes/module/report/add.class.php b/lib/classes/module/report/add.class.php index 7acee345f9..e856485ad8 100644 --- a/lib/classes/module/report/add.class.php +++ b/lib/classes/module/report/add.class.php @@ -109,11 +109,9 @@ class module_report_add extends module_report $this->result[$i][$value] = $this->pretty_string ? phraseadate::getPrettyString(new DateTime($row[$value])) : $row[$value]; } elseif ($value == 'size') { $this->result[$i][$value] = p4string::format_octets($row[$value]); - } - else + } else $this->result[$i][$value] = $row[$value]; - } - else { + } else { if ($value == 'comment') { $this->result[$i][$value] = ' '; } else { diff --git a/lib/classes/module/report/connexion.class.php b/lib/classes/module/report/connexion.class.php index bf64f78cfb..930f936725 100644 --- a/lib/classes/module/report/connexion.class.php +++ b/lib/classes/module/report/connexion.class.php @@ -63,7 +63,7 @@ class module_report_connexion extends module_report /** * @desc build the list with all distinct result - * @param string $field the field from the request displayed in a array + * @param string $field the field from the request displayed in a array * @return string $liste */ public function colFilter($field) @@ -95,8 +95,8 @@ class module_report_connexion extends module_report /** * @desc build the result from the specified sql - * @param array $champ all the field from the request displayed in a array - * @param string $sql the request from buildreq + * @param array $champ all the field from the request displayed in a array + * @param string $sql the request from buildreq * @return $this->result */ protected function buildResult($rs) diff --git a/lib/classes/module/report/dashboard.class.php b/lib/classes/module/report/dashboard.class.php index 9c9d1468bf..05a9f365fc 100644 --- a/lib/classes/module/report/dashboard.class.php +++ b/lib/classes/module/report/dashboard.class.php @@ -98,8 +98,8 @@ class module_report_dashboard implements module_report_dashboard_componentInterf /** * @desc modifier les date du report - * @param Datetime $dmin - * @param Datetime $dmax + * @param Datetime $dmin + * @param Datetime $dmax * @return */ public function setDate($dmin, $dmax) @@ -128,7 +128,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf /** * @desc return le titre de la date - * @param $d vaut 'dmin' ou 'dmax' + * @param $d vaut 'dmin' ou 'dmax' * @return */ public function getTitleDate($d) @@ -141,8 +141,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf $datetime = new Datetime($this->dmin); return phraseadate::getPrettyString($datetime); - } - else + } else throw new Exception('argument must be string dmin or dmax'); } @@ -171,8 +170,8 @@ class module_report_dashboard implements module_report_dashboard_componentInterf /** * @desc construct the legend for charts * if dmax === false dmax = now(); - * @param $dmin - * @param $dmax + * @param $dmin + * @param $dmax * @return */ protected function getPlotLegendDay($dmin, $dmax = false) @@ -287,7 +286,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf /** * @desc la liste des base authorisee sous forme de string - * @param $separotor + * @param $separotor * @return string */ public function getListeBase($separator) diff --git a/lib/classes/module/report/dashboard/feed.class.php b/lib/classes/module/report/dashboard/feed.class.php index 058a8e297a..658a4feb91 100644 --- a/lib/classes/module/report/dashboard/feed.class.php +++ b/lib/classes/module/report/dashboard/feed.class.php @@ -63,10 +63,10 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI /** * @desc return l'objet stockee dans le cache si i l existe sinon instancie * un nouveau objet dashboard_feed - * @param $sbasid - * @param $sbas_coll - * @param $dmin - * @param $dmax + * @param $sbasid + * @param $sbas_coll + * @param $dmin + * @param $dmax * @return self */ public static function getInstance($sbasid, $sbas_coll, $dmin, $dmax) @@ -89,7 +89,7 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI /** * @desc Remplis les resultats bruts pour valeures passees en param - * @param $sbasid + * @param $sbasid * @param $sbas_collection, les collection sous forme de string * séparés par une virgule * @param $dmin, Y-m-d @@ -109,7 +109,7 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI /** * @desc return les date dormate pour les requetes sql; - * @param $d, vaut 'dmin' ou 'dmax' + * @param $d, vaut 'dmin' ou 'dmax' * @return Datetime */ private function dateToSqlDate($d) diff --git a/lib/classes/module/report/dashboard/merge.class.php b/lib/classes/module/report/dashboard/merge.class.php index 2953770296..1a03e40db4 100644 --- a/lib/classes/module/report/dashboard/merge.class.php +++ b/lib/classes/module/report/dashboard/merge.class.php @@ -107,7 +107,7 @@ class module_report_dashboard_merge implements module_report_dashboard_component } /** - * @return le dashboard trie + * @return le dashboard trie * @return */ public function getDash() diff --git a/lib/classes/module/report/dashboard/sort.class.php b/lib/classes/module/report/dashboard/sort.class.php index d4475fb10a..4a22878db8 100644 --- a/lib/classes/module/report/dashboard/sort.class.php +++ b/lib/classes/module/report/dashboard/sort.class.php @@ -109,8 +109,7 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI foreach ($data as $key => $row) $tmp[$key] = $row[$field]; $args[$n] = &$tmp; - } - else + } else $args[$n] = &$field; } $args[] = &$data; diff --git a/lib/classes/module/report/download.class.php b/lib/classes/module/report/download.class.php index 73adafdb81..124398f6f9 100644 --- a/lib/classes/module/report/download.class.php +++ b/lib/classes/module/report/download.class.php @@ -99,8 +99,8 @@ class module_report_download extends module_report /** * @desc build the result from the specified sql - * @param array $champ all the field from the request displayed in a array - * @param string $sql the request from buildreq + * @param array $champ all the field from the request displayed in a array + * @param string $sql the request from buildreq * @return $this->result */ protected function buildResult($rs) @@ -144,8 +144,7 @@ class module_report_download extends module_report $this->result[$i][$column] = p4string::format_octets($value); else $this->result[$i][$column] = $value; - } - else { + } else { if ($column == 'comment') $this->result[$i][$column] = ''; else diff --git a/lib/classes/module/report/edit.class.php b/lib/classes/module/report/edit.class.php index 9ac150dc6a..3f8c667112 100644 --- a/lib/classes/module/report/edit.class.php +++ b/lib/classes/module/report/edit.class.php @@ -113,11 +113,9 @@ class module_report_edit extends module_report $this->result[$i][$value] = $this->pretty_string ? phraseadate::getPrettyString(new DateTime($row[$value])) : $row[$value]; } elseif ($value == 'size') { $this->result[$i][$value] = p4string::format_octets($row[$value]); - } - else + } else $this->result[$i][$value] = $row[$value]; - } - else { + } else { if ($value == 'comment') { $this->result[$i][$value] = ' '; } else { diff --git a/lib/classes/module/report/nav.class.php b/lib/classes/module/report/nav.class.php index eea6272111..0e6988af24 100644 --- a/lib/classes/module/report/nav.class.php +++ b/lib/classes/module/report/nav.class.php @@ -103,7 +103,7 @@ class module_report_nav extends module_report /** * @desc return the filter to generate the good request - * @param object $conn the current connexion to appbox + * @param object $conn the current connexion to appbox * @return string */ private function getFilter() @@ -113,7 +113,7 @@ class module_report_nav extends module_report /** * @desc report the browser used by users - * @param array $tab config for the html table + * @param array $tab config for the html table * @return tab */ public function buildTabNav($tab = false) @@ -178,7 +178,7 @@ class module_report_nav extends module_report /** * @desc report the OS from user - * @param array $tab config for the html table + * @param array $tab config for the html table * @return array */ public function buildTabOs($tab = false) @@ -238,7 +238,7 @@ class module_report_nav extends module_report /** * @desc report the resolution that are using the users - * @param array $tab config for the html table + * @param array $tab config for the html table * @return array */ public function buildTabRes($tab = false) @@ -362,7 +362,7 @@ class module_report_nav extends module_report /** * @desc report the most consulted module by the users - * @param array $tab + * @param array $tab * @return array */ public function buildTabModule($tab = false) @@ -444,9 +444,9 @@ class module_report_nav extends module_report /** * @desc report basic user informations - * @param int $val user id - * @param array $tab config for the html table - * @param string $on the field + * @param int $val user id + * @param array $tab config for the html table + * @param string $on the field * @return array */ public function buildTabGrpInfo($req, array $params, $val, $tab = false, $on = false) diff --git a/lib/classes/module/report/push.class.php b/lib/classes/module/report/push.class.php index ce714402d1..f34af5f3c3 100644 --- a/lib/classes/module/report/push.class.php +++ b/lib/classes/module/report/push.class.php @@ -114,11 +114,9 @@ class module_report_push extends module_report $row[$value]; } elseif ($value == 'size') { $this->result[$i][$value] = p4string::format_octets($row[$value]); - } - else + } else $this->result[$i][$value] = $row[$value]; - } - else { + } else { if ($value == 'comment') { $this->result[$i][$value] = ' '; } else { diff --git a/lib/classes/module/report/question.class.php b/lib/classes/module/report/question.class.php index 4f81e34ec2..8dbbf6ea8b 100644 --- a/lib/classes/module/report/question.class.php +++ b/lib/classes/module/report/question.class.php @@ -100,8 +100,7 @@ class module_report_question extends module_report $this->pretty_string ? phraseadate::getPrettyString(new DateTime($row[$value])) : $row[$value]; else $this->result[$i][$value] = $row[$value]; - } - else + } else $this->result[$i][$value] = "" . _('report:: non-renseigne') . ""; } $i ++; diff --git a/lib/classes/module/report/sqlconnexion.class.php b/lib/classes/module/report/sqlconnexion.class.php index 925d27533b..90e71810fd 100644 --- a/lib/classes/module/report/sqlconnexion.class.php +++ b/lib/classes/module/report/sqlconnexion.class.php @@ -56,8 +56,7 @@ class module_report_sqlconnexion extends module_report_sql implements module_rep $stmt->closeCursor(); if ($this->enable_limit) $this->sql .= $this->filter->getLimitFilter() ? : ''; - } - else { + } else { $this->sql = " SELECT TRIM(" . $this->getTransQuery($this->groupby) . ") as " . $this->groupby . ", SUM(1) as nb diff --git a/lib/classes/module/report/sqldownload.class.php b/lib/classes/module/report/sqldownload.class.php index 0b54c1d772..a1b446f390 100644 --- a/lib/classes/module/report/sqldownload.class.php +++ b/lib/classes/module/report/sqldownload.class.php @@ -72,8 +72,7 @@ class module_report_sqldownload extends module_report_sql implements module_repo $stmt->closeCursor(); $this->sql .= $this->filter->getLimitFilter() ? : ''; - } - else { + } else { $name = $this->groupby; $field = $this->getTransQuery($this->groupby); diff --git a/lib/classes/module/report/validate.class.php b/lib/classes/module/report/validate.class.php index 770db02dcb..c1e033ce00 100644 --- a/lib/classes/module/report/validate.class.php +++ b/lib/classes/module/report/validate.class.php @@ -114,11 +114,9 @@ class module_report_validate extends module_report $row[$value]; } elseif ($value == 'size') { $this->result[$i][$value] = p4string::format_octets($row[$value]); - } - else + } else $this->result[$i][$value] = $row[$value]; - } - else { + } else { if ($value == 'comment') { $this->result[$i][$value] = ' '; } else { diff --git a/lib/classes/p4file.class.php b/lib/classes/p4file.class.php index 0bf9a5ce73..f636eb1243 100644 --- a/lib/classes/p4file.class.php +++ b/lib/classes/p4file.class.php @@ -181,7 +181,7 @@ class p4file if ( ! $colorSpace || $required == $colorSpace) { $go = true; - } else if ($required == 'rgb' && in_array($colorSpace, array('srgb', 'rgb')) > 0) { + } elseif ($required == 'rgb' && in_array($colorSpace, array('srgb', 'rgb')) > 0) { $go = true; } diff --git a/lib/classes/p4string.class.php b/lib/classes/p4string.class.php index f955765a70..2f9acf3799 100644 --- a/lib/classes/p4string.class.php +++ b/lib/classes/p4string.class.php @@ -85,7 +85,7 @@ class p4string /** * @deprecated * - * @param type $s + * @param type $s * @return type */ public static function JSstring($s) @@ -96,9 +96,9 @@ class p4string /** * @deprecated * - * @param type $s - * @param type $context - * @param type $quoted + * @param type $s + * @param type $context + * @param type $quoted * @return type */ public static function MakeString($s, $context = 'html', $quoted = '') diff --git a/lib/classes/patch/303.class.php b/lib/classes/patch/303.class.php index 5832a8c739..c33508618a 100644 --- a/lib/classes/patch/303.class.php +++ b/lib/classes/patch/303.class.php @@ -33,7 +33,7 @@ class patch_303 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_303 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $this->update_users_log_datas($appbox); $this->update_users_search_datas($appbox); @@ -64,7 +64,7 @@ class patch_303 implements patchInterface * * @return patch_303 */ - function update_users_log_datas(appbox &$appbox) + public function update_users_log_datas(appbox &$appbox) { $col = array('fonction', 'societe', 'activite', 'pays'); @@ -110,7 +110,7 @@ class patch_303 implements patchInterface * * @return patch_303 */ - function update_users_search_datas(appbox &$appbox) + public function update_users_search_datas(appbox &$appbox) { foreach ($appbox->get_databoxes() as $databox) { $date_debut = '0000-00-00 00:00:00'; diff --git a/lib/classes/patch/304.class.php b/lib/classes/patch/304.class.php index 94da48d45a..a2b7aee8a7 100644 --- a/lib/classes/patch/304.class.php +++ b/lib/classes/patch/304.class.php @@ -33,7 +33,7 @@ class patch_304 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_304 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $sql = 'SELECT id FROM pref WHERE prop = "indexes"'; $stmt = $databox->get_connection()->prepare($sql); diff --git a/lib/classes/patch/305.class.php b/lib/classes/patch/305.class.php index c919cdc76f..9ba11c4885 100644 --- a/lib/classes/patch/305.class.php +++ b/lib/classes/patch/305.class.php @@ -33,7 +33,7 @@ class patch_305 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_305 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'REPLACE INTO usr_settings (SELECT usr_id, "start_page_query" as prop, last_query as value diff --git a/lib/classes/patch/306.class.php b/lib/classes/patch/306.class.php index bdf5e27748..575e103b18 100644 --- a/lib/classes/patch/306.class.php +++ b/lib/classes/patch/306.class.php @@ -33,7 +33,7 @@ class patch_306 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_306 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $dom = $databox->get_dom_structure(); $xpath = $databox->get_xpath_structure(); diff --git a/lib/classes/patch/310.class.php b/lib/classes/patch/310.class.php index bd5e412290..7586ce1329 100644 --- a/lib/classes/patch/310.class.php +++ b/lib/classes/patch/310.class.php @@ -33,7 +33,7 @@ class patch_310 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_310 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $dom_structure = $databox->get_dom_structure(); $sx_structure = $databox->get_sxml_structure(); @@ -82,8 +82,7 @@ class patch_310 implements patchInterface $media = "audio"; else $media = "image"; - } - elseif ($type == 'video') { + } elseif ($type == 'video') { if ($v->method == 'AnimGIF') $media = "gif"; elseif ($v->method == 'JPG') diff --git a/lib/classes/patch/3102.class.php b/lib/classes/patch/3102.class.php index 03cb569fff..c2d4466b53 100644 --- a/lib/classes/patch/3102.class.php +++ b/lib/classes/patch/3102.class.php @@ -33,7 +33,7 @@ class patch_3102 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_3102 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$base) + public function apply(base &$base) { $conn = connection::getPDOConnection(); diff --git a/lib/classes/patch/3103.class.php b/lib/classes/patch/3103.class.php index 05a497aaa6..0770fe6647 100644 --- a/lib/classes/patch/3103.class.php +++ b/lib/classes/patch/3103.class.php @@ -33,7 +33,7 @@ class patch_3103 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_3103 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $conn = $appbox->get_connection(); diff --git a/lib/classes/patch/311.class.php b/lib/classes/patch/311.class.php index bc7207662a..fd7807ee6e 100644 --- a/lib/classes/patch/311.class.php +++ b/lib/classes/patch/311.class.php @@ -33,7 +33,7 @@ class patch_311 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_311 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $sql = 'UPDATE record SET jeton = ' . (JETON_WRITE_META_DOC | JETON_WRITE_META_SUBDEF); diff --git a/lib/classes/patch/320.class.php b/lib/classes/patch/320.class.php index 28c56e3765..2b34e7e29e 100644 --- a/lib/classes/patch/320.class.php +++ b/lib/classes/patch/320.class.php @@ -33,7 +33,7 @@ class patch_320 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -47,12 +47,12 @@ class patch_320 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $sql = 'UPDATE record SET parent_record_id = "1" WHERE parent_record_id != "0"'; diff --git a/lib/classes/patch/320a.class.php b/lib/classes/patch/320a.class.php index da55d89d1c..e9a1e3cff1 100644 --- a/lib/classes/patch/320a.class.php +++ b/lib/classes/patch/320a.class.php @@ -32,7 +32,7 @@ class patch_320a implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320a implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'SELECT * FROM usr WHERE nonce IS NULL'; diff --git a/lib/classes/patch/320aa.class.php b/lib/classes/patch/320aa.class.php index ad550027de..9d51fb7460 100644 --- a/lib/classes/patch/320aa.class.php +++ b/lib/classes/patch/320aa.class.php @@ -32,7 +32,7 @@ class patch_320aa implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320aa implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { if (is_file(__DIR__ . '/../../../config/_GV.php')) require __DIR__ . '/../../../config/_GV.php'; diff --git a/lib/classes/patch/320ab.class.php b/lib/classes/patch/320ab.class.php index 3122fc4227..058882339e 100644 --- a/lib/classes/patch/320ab.class.php +++ b/lib/classes/patch/320ab.class.php @@ -32,7 +32,7 @@ class patch_320ab implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320ab implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'REPLACE INTO records_rights (SELECT null as id, usr_id, b.sbas_id, record_id, "1" as document diff --git a/lib/classes/patch/320b.class.php b/lib/classes/patch/320b.class.php index e694d24ca8..12621d94b1 100644 --- a/lib/classes/patch/320b.class.php +++ b/lib/classes/patch/320b.class.php @@ -32,7 +32,7 @@ class patch_320b implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320b implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'UPDATE basusr SET nowatermark=1 WHERE needwatermark=0'; $stmt = $appbox->get_connection()->prepare($sql); diff --git a/lib/classes/patch/320c.class.php b/lib/classes/patch/320c.class.php index 918ee071cc..00d13f78a1 100644 --- a/lib/classes/patch/320c.class.php +++ b/lib/classes/patch/320c.class.php @@ -32,7 +32,7 @@ class patch_320c implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320c implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $sql = 'TRUNCATE metadatas'; $stmt = $databox->get_connection()->prepare($sql); diff --git a/lib/classes/patch/320d.class.php b/lib/classes/patch/320d.class.php index f842bad975..8baf18fb02 100644 --- a/lib/classes/patch/320d.class.php +++ b/lib/classes/patch/320d.class.php @@ -32,7 +32,7 @@ class patch_320d implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320d implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'SELECT base_id, usr_id FROM order_masters'; diff --git a/lib/classes/patch/320e.class.php b/lib/classes/patch/320e.class.php index d81dd08b71..ee19bb587e 100644 --- a/lib/classes/patch/320e.class.php +++ b/lib/classes/patch/320e.class.php @@ -32,7 +32,7 @@ class patch_320e implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320e implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $sql = 'UPDATE record r, subdef s SET r.mime = s.mime diff --git a/lib/classes/patch/320f.class.php b/lib/classes/patch/320f.class.php index 4db074cda3..e160d44d53 100644 --- a/lib/classes/patch/320f.class.php +++ b/lib/classes/patch/320f.class.php @@ -32,7 +32,7 @@ class patch_320f implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320f implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $feeds = array(); diff --git a/lib/classes/patch/320h.class.php b/lib/classes/patch/320h.class.php index 1d6f6b24f5..f9a70868a8 100644 --- a/lib/classes/patch/320h.class.php +++ b/lib/classes/patch/320h.class.php @@ -32,7 +32,7 @@ class patch_320h implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_320h implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'DELETE FROM basusr WHERE actif = "0"'; diff --git a/lib/classes/patch/360.class.php b/lib/classes/patch/360.class.php index 66148597bc..6492051ac4 100644 --- a/lib/classes/patch/360.class.php +++ b/lib/classes/patch/360.class.php @@ -32,7 +32,7 @@ class patch_360 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_360 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $tables = array('StoryWZ', 'ValidationDatas', 'ValidationParticipants', 'ValidationSessions', 'BasketElements', 'Baskets'); diff --git a/lib/classes/patch/3602.class.php b/lib/classes/patch/3602.class.php index 7e0e70258a..e72d5cd789 100644 --- a/lib/classes/patch/3602.class.php +++ b/lib/classes/patch/3602.class.php @@ -32,7 +32,7 @@ class patch_3602 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_3602 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { try { $sql = 'ALTER TABLE `metadatas` DROP INDEX `unique`'; diff --git a/lib/classes/patch/3603.class.php b/lib/classes/patch/3603.class.php index 48dcf374fb..c8999a1585 100644 --- a/lib/classes/patch/3603.class.php +++ b/lib/classes/patch/3603.class.php @@ -32,7 +32,7 @@ class patch_3603 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_3603 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $sql = 'UPDATE usr SET usr_mail = NULL diff --git a/lib/classes/patch/3604.class.php b/lib/classes/patch/3604.class.php index 94cebcc273..02942c22a0 100644 --- a/lib/classes/patch/3604.class.php +++ b/lib/classes/patch/3604.class.php @@ -32,7 +32,7 @@ class patch_3604 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_3604 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { /** * Fail if upgrade has previously failed, no problem diff --git a/lib/classes/patch/361.class.php b/lib/classes/patch/361.class.php index 6ce78a1346..6af8787190 100644 --- a/lib/classes/patch/361.class.php +++ b/lib/classes/patch/361.class.php @@ -34,7 +34,7 @@ class patch_361 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -48,12 +48,12 @@ class patch_361 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $Core = \bootstrap::getCore(); diff --git a/lib/classes/patch/370.class.php b/lib/classes/patch/370.class.php index e6d6d3e256..f4bdc570df 100644 --- a/lib/classes/patch/370.class.php +++ b/lib/classes/patch/370.class.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ -use Doctrine\ORM\Tools\Pagination\Paginator; /** * @@ -34,7 +33,7 @@ class patch_370 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -48,12 +47,12 @@ class patch_370 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $conn = $databox->get_connection(); diff --git a/lib/classes/patch/370a3.class.php b/lib/classes/patch/370a3.class.php index cff1005dcb..84d99d323f 100644 --- a/lib/classes/patch/370a3.class.php +++ b/lib/classes/patch/370a3.class.php @@ -32,7 +32,7 @@ class patch_370a3 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_370a3 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$appbox) + public function apply(base &$appbox) { $appbox = \appbox::get_instance(\bootstrap::getCore()); diff --git a/lib/classes/patch/370a4.class.php b/lib/classes/patch/370a4.class.php index f24c03ce3e..3164581720 100644 --- a/lib/classes/patch/370a4.class.php +++ b/lib/classes/patch/370a4.class.php @@ -32,7 +32,7 @@ class patch_370a4 implements patchInterface * * @return string */ - function get_release() + public function get_release() { return $this->release; } @@ -46,12 +46,12 @@ class patch_370a4 implements patchInterface * * @return Array */ - function concern() + public function concern() { return $this->concern; } - function apply(base &$databox) + public function apply(base &$databox) { $sql = 'SELECT id, src FROM metadatas_structure'; diff --git a/lib/classes/patchInterface.class.php b/lib/classes/patchInterface.class.php index e9ea24bf9a..f537d891dd 100644 --- a/lib/classes/patchInterface.class.php +++ b/lib/classes/patchInterface.class.php @@ -3,11 +3,11 @@ interface patchInterface { - function get_release(); + public function get_release(); - function concern(); + public function concern(); - function require_all_upgrades(); + public function require_all_upgrades(); - function apply(base &$base); + public function apply(base &$base); } diff --git a/lib/classes/phrasea.class.php b/lib/classes/phrasea.class.php index 2dfb90e6d0..8a0b8a8154 100644 --- a/lib/classes/phrasea.class.php +++ b/lib/classes/phrasea.class.php @@ -94,7 +94,7 @@ class phrasea self::headers(500); } - function getHome($type = 'PUBLI', $context = 'prod') + public function getHome($type = 'PUBLI', $context = 'prod') { $appbox = appbox::get_instance(\bootstrap::getCore()); $session = $appbox->get_session(); diff --git a/lib/classes/phraseadate.class.php b/lib/classes/phraseadate.class.php index a9ffa2ac91..b0263dd1de 100644 --- a/lib/classes/phraseadate.class.php +++ b/lib/classes/phraseadate.class.php @@ -18,7 +18,7 @@ class phraseadate /** * - * @param DateTime $date + * @param DateTime $date * @return string */ public static function getTime(DateTime $date) @@ -41,7 +41,7 @@ class phraseadate /** * - * @param DateTime $date + * @param DateTime $date * @return string */ public static function getDate(DateTime $date) @@ -63,7 +63,7 @@ class phraseadate /** * - * @param DateTime $date + * @param DateTime $date * @return string */ public static function getPrettyString(DateTime $date = null) @@ -107,7 +107,7 @@ class phraseadate /** * - * @param DateTime $date + * @param DateTime $date * @return string */ public static function format_mysql(DateTime $date) @@ -117,9 +117,9 @@ class phraseadate /** * - * @param DateTime $date - * @param string $locale - * @param string $format + * @param DateTime $date + * @param string $locale + * @param string $format * @return string */ private function formatDate(DateTime $date, $locale, $format) @@ -167,8 +167,8 @@ class phraseadate /** * - * @param string $isodelimdate - * @param string $format + * @param string $isodelimdate + * @param string $format * @return string */ public static function isodateToDate($isodelimdate, $format) @@ -187,8 +187,7 @@ class phraseadate array_push($bal, substr($isodelimdate, 1, $p - 1)); } $isodelimdate = substr($isodelimdate, $p + 1); - } - else { + } else { $isodelimdate = ""; } } else { @@ -231,8 +230,8 @@ class phraseadate /** * - * @param string $strdate - * @param string $format + * @param string $strdate + * @param string $format * @return string */ public static function dateToIsodate($strdate, $format) diff --git a/lib/classes/queries.class.php b/lib/classes/queries.class.php index 921d816352..e2891b966d 100644 --- a/lib/classes/queries.class.php +++ b/lib/classes/queries.class.php @@ -145,8 +145,7 @@ class queries var _topics = topics; var zpop; current_popqry = ""; - for(i=0; _topics && i 0) current_popqry = zpop.options[j].value; @@ -160,8 +159,7 @@ class queries return; zpop = document.forms["pops"]["popTopic_"+ipop]; - if(_topics) - { + if (_topics) { while(zpop.options[0]) zpop.options[0] = null; zpop.options[0] = new Option("All", ""); @@ -169,13 +167,10 @@ class queries zpop.options[j+1] = new Option(_topics[j].label, _topics[j].query); zpop.selectedIndex = 0; document.getElementById("divTopic_"+ipop).style.display = ""; - } - else - { + } else { document.getElementById("divTopic_"+ipop).style.display = "none"; } - while(++ipop <= ' . $maxdepth . ') - { + while (++ipop <= ' . $maxdepth . ') { document.getElementById("divTopic_"+ipop).style.display = "none"; } } diff --git a/lib/classes/random.class.php b/lib/classes/random.class.php index 1498c10518..6dcd58a5c6 100644 --- a/lib/classes/random.class.php +++ b/lib/classes/random.class.php @@ -77,8 +77,8 @@ class random /** * - * @param int $length - * @param constant $possible + * @param int $length + * @param constant $possible * @return string */ public static function generatePassword($length = 8, $possible = SELF::LETTERS_AND_NUMBERS) @@ -102,10 +102,10 @@ class random /** * - * @param string $type - * @param int $usr - * @param string $end_date - * @param mixed content $datas + * @param string $type + * @param int $usr + * @param string $end_date + * @param mixed content $datas * @return boolean */ public static function getUrlToken($type, $usr, DateTime $end_date = null, $datas = '') diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index 3789a03961..0a57d7ab66 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -144,11 +144,11 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param $base_id - * @param $record_id - * @param $number - * @param $xml - * @param $status + * @param $base_id + * @param $record_id + * @param $number + * @param $xml + * @param $status * @return record_adapter */ public function __construct($sbas_id, $record_id, $number = null) @@ -264,7 +264,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * Set a relative number (order) for the vurrent in its set * - * @param int $number + * @param int $number * @return record_adapter */ public function set_number($number) @@ -276,7 +276,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param string $type + * @param string $type * @return record_adapter */ public function set_type($type) @@ -463,8 +463,8 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param collection $collection - * @param appbox $appbox + * @param collection $collection + * @param appbox $appbox * @return record_adapter */ public function move_to_collection(collection &$collection, appbox &$appbox) @@ -581,7 +581,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param $name + * @param $name * @return media_subdef */ public function get_subdef($name) @@ -608,8 +608,8 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * Returns an array of subdef matching * - * @param string|array $devices the matching device (see databox_subdef::DEVICE_*) - * @param type $mimes the matching mime types + * @param string|array $devices the matching device (see databox_subdef::DEVICE_*) + * @param type $mimes the matching mime types * @return array */ public function getSubdfefByDeviceAndMime($devices = null, $mimes = null) @@ -724,7 +724,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param string $data + * @param string $data * @return Array */ public function get_technical_infos($data = false) @@ -1069,7 +1069,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param DOMDocument $dom_doc + * @param DOMDocument $dom_doc * @return record_adapter */ protected function set_xml(DOMDocument $dom_doc) @@ -1092,7 +1092,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * * @todo move this function to caption_record - * @param Array $params An array containing three keys : meta_struct_id (int), meta_id (int or null) and value (Array) + * @param Array $params An array containing three keys : meta_struct_id (int), meta_id (int or null) and value (Array) * @return record_adapter */ protected function set_metadata(Array $params, databox $databox) @@ -1152,7 +1152,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * * @todo move this function to caption_record - * @param array $metadatas + * @param array $metadatas * @return record_adapter */ public function set_metadatas(Array $metadatas, $force_readonly = false) @@ -1234,7 +1234,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param string $status + * @param string $status * @return record_adapter */ public function set_binary_status($status) @@ -1281,7 +1281,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param \collection $collection + * @param \collection $collection * @return \record_adapter */ public static function createStory(\collection $collection) @@ -1417,9 +1417,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param int $base_id - * @param int $record_id - * @param string $sha256 + * @param int $base_id + * @param int $record_id + * @param string $sha256 * @return record_adapter */ public static function get_record_by_sha($sbas_id, $sha256, $record_id = null) @@ -1643,7 +1643,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param string $option optionnal cache name + * @param string $option optionnal cache name * @return string */ public function get_cache_key($option = null) @@ -1721,7 +1721,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface * * @todo move to media_subdef class * @param databox_subdef $subdef_class - * @param string $pathdest + * @param string $pathdest */ protected function generate_subdef(databox_subdef $subdef_class, $pathdest) { @@ -1741,8 +1741,8 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * Generate a subdef pathname depending the databox_subdef and the previous file(if regenerated) * - * @param databox_subdef $subdef - * @param type $oldVersion + * @param databox_subdef $subdef + * @param type $oldVersion * @return type */ protected function generateSubdefPathname(databox_subdef $subdef, $oldVersion = null) @@ -1759,7 +1759,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * Get the extension from MediaAlchemyst specs * - * @param MediaAlchemyst\Specification\Specification $spec + * @param MediaAlchemyst\Specification\Specification $spec * @return string */ protected function getExtensionFromSpec(MediaAlchemyst\Specification\Specification $spec) @@ -1790,7 +1790,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * Get the extension from audiocodec * - * @param string $audioCodec + * @param string $audioCodec * @return string */ protected function getExtensionFromAudioCodec($audioCodec) @@ -1812,7 +1812,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * Get the extension from videocodec * - * @param string $videoCodec + * @param string $videoCodec * @return string */ protected function getExtensionFromVideoCodec($videoCodec) @@ -1836,7 +1836,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param string $option optionnal cache name + * @param string $option optionnal cache name * @return mixed */ public function get_data_from_cache($option = null) @@ -1933,9 +1933,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface /** * - * @param databox $databox - * @param int $offset_start - * @param int $how_many + * @param databox $databox + * @param int $offset_start + * @param int $how_many * @return type */ public static function get_records_by_originalname(databox $databox, $original_name, $caseSensitive = false, $offset_start = 0, $how_many = 10) diff --git a/lib/classes/record/exportElement.class.php b/lib/classes/record/exportElement.class.php index 7179688224..128c5a74a5 100644 --- a/lib/classes/record/exportElement.class.php +++ b/lib/classes/record/exportElement.class.php @@ -49,13 +49,13 @@ class record_exportElement extends record_adapter /** * - * @param int $base_id - * @param int $record_id - * @param string $directory - * @param int $remain_hd + * @param int $base_id + * @param int $record_id + * @param string $directory + * @param int $remain_hd * @return record_exportElement */ - function __construct($sbas_id, $record_id, $directory = '', $remain_hd = false) + public function __construct($sbas_id, $record_id, $directory = '', $remain_hd = false) { $this->directory = $directory; $this->remain_hd = $remain_hd; @@ -136,8 +136,7 @@ class record_exportElement extends record_adapter 'class' => 'document', 'label' => _('document original') ); - } - else + } else $downloadable['document'] = array( 'class' => 'document', 'label' => _('document original') @@ -187,14 +186,12 @@ class record_exportElement extends record_adapter 'class' => $class, 'label' => $subdef_label ); - } - else + } else $downloadable[$name] = array( 'class' => $class, 'label' => $subdef_label ); - } - else { + } else { $downloadable[$name] = array( 'class' => $class, 'label' => $subdef_label @@ -229,16 +226,15 @@ class record_exportElement extends record_adapter /** * - * @param string $name - * @param int $size + * @param string $name + * @param int $size * @return record_exportElement */ private function add_count($name, $size) { if ( ! $this->size) { $objectsize = array(); - } - else + } else $objectsize = $this->size; $objectsize[$name] = $size; @@ -250,8 +246,8 @@ class record_exportElement extends record_adapter /** * - * @param string $name - * @return mixed content + * @param string $name + * @return mixed content */ public function get_size($name = false) { diff --git a/lib/classes/record/orderElement.class.php b/lib/classes/record/orderElement.class.php index 905c8e59b8..bae6b43363 100644 --- a/lib/classes/record/orderElement.class.php +++ b/lib/classes/record/orderElement.class.php @@ -31,10 +31,10 @@ class record_orderElement extends record_adapter /** * - * @param int $base_id - * @param int $record_id + * @param int $base_id + * @param int $record_id * @param boolean $deny - * @param int $order_master_id + * @param int $order_master_id */ public function __construct($sbas_id, $record_id, $deny, $order_master_id) { diff --git a/lib/classes/record/preview.class.php b/lib/classes/record/preview.class.php index 3cc9f37d47..bdd934e271 100644 --- a/lib/classes/record/preview.class.php +++ b/lib/classes/record/preview.class.php @@ -79,10 +79,10 @@ class record_preview extends record_adapter /** * - * @param string $env - * @param int $pos - * @param mixed content $contId - * @param boolean $reload_train + * @param string $env + * @param int $pos + * @param mixed content $contId + * @param boolean $reload_train * @return record_preview */ public function __construct($env, $pos, $contId, $reload_train, searchEngine_adapter $search_engine = null, $query = '') diff --git a/lib/classes/recordutils/image.class.php b/lib/classes/recordutils/image.class.php index 5955336062..7cd34e2653 100644 --- a/lib/classes/recordutils/image.class.php +++ b/lib/classes/recordutils/image.class.php @@ -20,11 +20,11 @@ class recordutils_image extends recordutils /** * - * @param int $fontSize - * @param int $angle - * @param string $fontFace - * @param string $string - * @param int $width + * @param int $fontSize + * @param int $angle + * @param string $fontFace + * @param string $string + * @param int $width * @return Array */ protected function wrap($fontSize, $angle, $fontFace, $string, $width) @@ -64,9 +64,9 @@ class recordutils_image extends recordutils /** * - * @param int $bas - * @param int $rec - * @param boolean $hd + * @param int $bas + * @param int $rec + * @param boolean $hd * @return string */ public static function stamp($bas, $rec, $hd = false) @@ -340,9 +340,9 @@ class recordutils_image extends recordutils /** * - * @param int $bas - * @param int $rec - * @param boolean $hd + * @param int $bas + * @param int $rec + * @param boolean $hd * @return string */ public static function watermark($bas, $rec, $hd = false) diff --git a/lib/classes/registry.class.php b/lib/classes/registry.class.php index 85e9e3bcea..44589d9e68 100644 --- a/lib/classes/registry.class.php +++ b/lib/classes/registry.class.php @@ -49,7 +49,7 @@ class registry implements registryInterface /** * - * @param \Alchemy\Phrasea\Cache\Cache $cache + * @param \Alchemy\Phrasea\Cache\Cache $cache * @return registry */ protected function __construct() @@ -122,7 +122,7 @@ class registry implements registryInterface /** * - * @param string $key + * @param string $key * @return mixed */ public function get($key, $defaultvalue = null) @@ -139,8 +139,8 @@ class registry implements registryInterface /** * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value * @return registry */ public function set($key, $value, $type) @@ -183,7 +183,7 @@ class registry implements registryInterface /** * - * @param string $key + * @param string $key * @return mixed */ public function is_set($key) @@ -195,7 +195,7 @@ class registry implements registryInterface /** * - * @param string $key + * @param string $key * @return registry */ public function un_set($key) diff --git a/lib/classes/searchEngine/adapter.class.php b/lib/classes/searchEngine/adapter.class.php index 4d48af06a1..797852a43b 100644 --- a/lib/classes/searchEngine/adapter.class.php +++ b/lib/classes/searchEngine/adapter.class.php @@ -37,7 +37,7 @@ class searchEngine_adapter /** * - * @param registryInterface $registry + * @param registryInterface $registry * @return searchEngine_adapter */ public function __construct(registryInterface $registry) @@ -55,7 +55,7 @@ class searchEngine_adapter /** * - * @param searchEngine_options $options + * @param searchEngine_options $options * @return searchEngine_adapter */ public function set_options(searchEngine_options $options) @@ -68,7 +68,7 @@ class searchEngine_adapter /** * - * @param boolean $boolean + * @param boolean $boolean * @return searchEngine_adapter */ public function set_is_first_page($boolean) @@ -109,9 +109,9 @@ class searchEngine_adapter /** * - * @param string $query - * @param int $page - * @param int $perPage + * @param string $query + * @param int $page + * @param int $perPage * @return searchEngine_results */ public function query_per_page($query, $page, $perPage) @@ -127,9 +127,9 @@ class searchEngine_adapter /** * - * @param string $query - * @param int $offset - * @param int $perPage + * @param string $query + * @param int $offset + * @param int $perPage * @return searchEngine_results */ public function query_per_offset($query, $offset, $perPage) diff --git a/lib/classes/searchEngine/adapter/phrasea/engine.class.php b/lib/classes/searchEngine/adapter/phrasea/engine.class.php index 44c9e25b70..71afb51840 100644 --- a/lib/classes/searchEngine/adapter/phrasea/engine.class.php +++ b/lib/classes/searchEngine/adapter/phrasea/engine.class.php @@ -129,14 +129,14 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract * * @return searchEngine_adapter_phrasea_engine */ - function __construct() + public function __construct() { return $this; } /** * - * @param searchEngine_options $options + * @param searchEngine_options $options * @return searchEngine_adapter_phrasea_engine */ public function set_options(searchEngine_options $options) @@ -168,7 +168,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract /** * - * @param $proposals + * @param $proposals * @return string */ protected static function proposalsToHTML($proposals) @@ -214,12 +214,12 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract /** * - * @param int $query - * @param int $offset - * @param int $perPage + * @param int $query + * @param int $offset + * @param int $perPage * @return searchEngine_results */ - function results($query, $offset, $perPage) + public function results($query, $offset, $perPage) { assert(is_int($offset)); @@ -336,7 +336,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract /** * - * @param Session_Handler $session + * @param Session_Handler $session * @return array */ public function get_suggestions(Session_Handler $session) @@ -464,7 +464,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract /** * - * @param int $sbas + * @param int $sbas * @return searchEngine_adapter_phrasea_engine */ protected function singleParse($sbas) @@ -490,7 +490,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract /** * - * @param string $query + * @param string $query * @return searchEngine_adapter_phrasea_engine */ protected function addQuery($query) @@ -606,8 +606,7 @@ class searchEngine_adapter_phrasea_engine extends searchEngine_adapter_abstract $session->get_ses_id(), ($record->get_number() + 1), 1, true, "[[em]]", "[[/em]]" ); - if ( ! isset($res['results']) || ! is_array($res['results'])) - { + if ( ! isset($res['results']) || ! is_array($res['results'])) { return array(); } diff --git a/lib/classes/searchEngine/adapter/phrasea/queryParser.class.php b/lib/classes/searchEngine/adapter/phrasea/queryParser.class.php index bd208f4ece..951ef968ea 100644 --- a/lib/classes/searchEngine/adapter/phrasea/queryParser.class.php +++ b/lib/classes/searchEngine/adapter/phrasea/queryParser.class.php @@ -17,7 +17,7 @@ */ class searchEngine_adapter_phrasea_queryParser { - var $ops = array( + public $ops = array( "et" => array("NODETYPE" => PHRASEA_OP_AND, "CANNUM" => false), "and" => array("NODETYPE" => PHRASEA_OP_AND, "CANNUM" => false), "ou" => array("NODETYPE" => PHRASEA_OP_OR, "CANNUM" => false), @@ -33,7 +33,7 @@ class searchEngine_adapter_phrasea_queryParser "dans" => array("NODETYPE" => PHRASEA_OP_IN, "CANNUM" => false), "in" => array("NODETYPE" => PHRASEA_OP_IN, "CANNUM" => false) ); - var $opk = array( + public $opk = array( "<" => array("NODETYPE" => PHRASEA_OP_LT, "CANNUM" => false), ">" => array("NODETYPE" => PHRASEA_OP_GT, "CANNUM" => false), "<=" => array("NODETYPE" => PHRASEA_OP_LEQT, "CANNUM" => false), @@ -42,7 +42,7 @@ class searchEngine_adapter_phrasea_queryParser "=" => array("NODETYPE" => PHRASEA_OP_EQUAL, "CANNUM" => false), ":" => array("NODETYPE" => PHRASEA_OP_COLON, "CANNUM" => false) ); - var $spw = array( + public $spw = array( "all" => array( "CLASS" => "PHRASEA_KW_ALL", "NODETYPE" => PHRASEA_KW_ALL, "CANNUM" => false ), @@ -58,21 +58,21 @@ class searchEngine_adapter_phrasea_queryParser "CLASS" => "PHRASEA_KW_LAST", "NODETYPE" => PHRASEA_KW_LAST, "CANNUM" => true ) ); - var $quoted_defaultop = array( + public $quoted_defaultop = array( "VALUE" => "default_avant", "NODETYPE" => PHRASEA_OP_BEFORE, "PNUM" => 0 ); - var $defaultop = array( + public $defaultop = array( "VALUE" => "and", "NODETYPE" => PHRASEA_OP_AND, "PNUM" => NULL ); - var $defaultlast = 12; - var $phq; - var $errmsg = ""; + public $defaultlast = 12; + public $phq; + public $errmsg = ""; /** * * @var boolean */ - var $debug = false; + public $debug = false; /** * un tableau qui contiendra des propositions de thesaurus @@ -80,16 +80,16 @@ class searchEngine_adapter_phrasea_queryParser * * @var array */ - var $proposals = Array("QRY" => "", "BASES" => array(), "QUERIES" => array()); + public $proposals = Array("QRY" => "", "BASES" => array(), "QUERIES" => array()); /** * Current language for thesaurus * @var */ - var $lng = null; + public $lng = null; protected $unicode; - function __construct($lng = "???") + public function __construct($lng = "???") { $this->lng = $lng; $this->unicode = new unicode(); @@ -97,17 +97,17 @@ class searchEngine_adapter_phrasea_queryParser return $this; } - function mb_trim($s, $encoding) + public function mb_trim($s, $encoding) { return(trim($s)); } - function mb_ltrim($s, $encoding) + public function mb_ltrim($s, $encoding) { return(ltrim($s)); } - function parsequery($phq) + public function parsequery($phq) { if ($this->debug) { for ($i = 0; $i < mb_strlen($phq, 'UTF-8'); $i ++ ) { @@ -132,7 +132,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function astext($tree) + public function astext($tree) { switch ($tree["CLASS"]) { case "SIMPLE": @@ -171,7 +171,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function astable(&$tree) + public function astable(&$tree) { $this->calc_complexity($tree); $txt = ""; @@ -181,7 +181,7 @@ class searchEngine_adapter_phrasea_queryParser return($txt); } - function calc_complexity(&$tree) + public function calc_complexity(&$tree) { if ($tree) { if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK") { @@ -192,7 +192,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function astable2(&$out, &$tree, $depth = 0) + public function astable2(&$out, &$tree, $depth = 0) { switch ($tree["CLASS"]) { case "SIMPLE": @@ -231,14 +231,14 @@ class searchEngine_adapter_phrasea_queryParser } } - function dumpDiv(&$tree) + public function dumpDiv(&$tree) { print("
\n"); $this->dumpDiv2($tree); print("
\n"); } - function dumpDiv2(&$tree, $depth = 0) + public function dumpDiv2(&$tree, $depth = 0) { switch ($tree["CLASS"]) { case "SIMPLE": @@ -289,7 +289,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function dump($tree) + public function dump($tree) { switch ($tree["CLASS"]) { case "SIMPLE": @@ -345,7 +345,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function priority_opk(&$tree, $depth = 0) + public function priority_opk(&$tree, $depth = 0) { if ( ! $tree) { return; @@ -365,7 +365,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function distrib_opk(&$tree, $depth = 0) + public function distrib_opk(&$tree, $depth = 0) { if ( ! $tree) { return; @@ -392,7 +392,7 @@ class searchEngine_adapter_phrasea_queryParser $this->distrib_opk($tree["RB"], $depth + 1); } - function thesaurus2_apply(&$tree, $bid) + public function thesaurus2_apply(&$tree, $bid) { if ( ! $tree) { return; @@ -406,14 +406,11 @@ class searchEngine_adapter_phrasea_queryParser } if (count($tids) >= 1) { /* - if(count($tids)==1) - { + if (count($tids)==1) { // on cherche un id simple, on utilisera la syntaxe sql 'like' (l'extension repérera elle méme la syntaxe car la value finit par '%') $val = str_replace(".", "d", $tids[0]) . "d%"; $tree["VALUE"] = array($val); - } - else - { + } else { // on cherche plusieurs id's, on utilisera la syntaxe 'regexp' (l'extension repérera elle méme la syntaxe car la value finit par '$' $val = ""; foreach($tids as $tid) @@ -442,7 +439,7 @@ class searchEngine_adapter_phrasea_queryParser // thesaurus only : ==> ((th:a) et (th:b)) // ft et thesaurus : ==> ((a ou (th:a)) et (b ou (th:b))) // RETOURNE l'arbre résultat sans modifier l'arbre d'origine - function extendThesaurusOnTerms(&$tree, $useFullText, $useThesaurus, $keepfuzzy) + public function extendThesaurusOnTerms(&$tree, $useFullText, $useThesaurus, $keepfuzzy) { $copy = $tree; $this->_extendThesaurusOnTerms($tree, $copy, $useFullText, $useThesaurus, $keepfuzzy, 0, ""); @@ -452,7 +449,7 @@ class searchEngine_adapter_phrasea_queryParser return($copy); } - function _extendThesaurusOnTerms(&$tree, &$copy, $useFullText, $useThesaurus, $keepfuzzy, $depth, $path) + public function _extendThesaurusOnTerms(&$tree, &$copy, $useFullText, $useThesaurus, $keepfuzzy, $depth, $path) { if ($depth == 0) $ret = $tree; @@ -465,8 +462,7 @@ class searchEngine_adapter_phrasea_queryParser $copy = $this->_extendToThesaurus_Simple($tree, false, $keepfuzzy, $path); else $copy = $this->_extendToThesaurus_Simple($tree, $useFullText, $keepfuzzy, $path); - } - else { + } else { if ($tree["CLASS"] == "OPK" && $tree["NODETYPE"] == PHRASEA_OP_COLON) { // on a 'field:value' , on traite 'value' $tree["RB"]["PATH"] = $copy["RB"]["PATH"] = $path . "R"; @@ -477,8 +473,7 @@ class searchEngine_adapter_phrasea_queryParser $copy["CONTEXT"] = $tree["CONTEXT"] = "*"; $copy["RB"]["SREF"] = &$tree["RB"]; - } - else { + } else { $recursL = $recursR = false; if ($tree["CLASS"] == "OPS" && ($tree["NODETYPE"] == PHRASEA_OP_AND || $tree["NODETYPE"] == PHRASEA_OP_OR || $tree["NODETYPE"] == PHRASEA_OP_EXCEPT)) { // on a une branche à gauche de 'ET', 'OU', 'SAUF' @@ -499,7 +494,7 @@ class searchEngine_adapter_phrasea_queryParser // étend (ou remplace) un terme cherché en 'full-text' à une recherche thesaurus (champ non spécifié, tout le thésaurus = '*') // le contexte éventuel est rapporté à l'opérateur ':' // ex : a[k] ==> (a ou (TH :[k] a)) - function _extendToThesaurus_Simple(&$simple, $keepFullText, $keepfuzzy, $path) + public function _extendToThesaurus_Simple(&$simple, $keepFullText, $keepfuzzy, $path) { $simple["PATH"] = $path; $context = null; @@ -543,8 +538,7 @@ class searchEngine_adapter_phrasea_queryParser // note une référence vers le terme d'origine $tmp["RB"]["RB"]["SREF"] = &$simple; $tmp["RB"]["RB"]["PATH"] = $path; - } - else { + } else { // on remplace le ft par du th $tmp = array("CLASS" => "OPK", "NODETYPE" => PHRASEA_OP_COLON, @@ -575,7 +569,7 @@ class searchEngine_adapter_phrasea_queryParser return($tmp); } - function thesaurus2(&$tree, $bid, $name, &$domthe, $searchsynonyms = true, $depth = 0) + public function thesaurus2(&$tree, $bid, $name, &$domthe, $searchsynonyms = true, $depth = 0) { if ($this->debug) print("thesaurus2:\n\$tree=" . var_export($tree, true) . "\n"); @@ -599,7 +593,7 @@ class searchEngine_adapter_phrasea_queryParser return($ambigus); } - function propAsHTML(&$node, &$html, $path, $depth = 0) + public function propAsHTML(&$node, &$html, $path, $depth = 0) { global $parm; if ($depth > 0) { @@ -675,7 +669,7 @@ class searchEngine_adapter_phrasea_queryParser $html .= $tab . "\n"; } - function _queryAsHTML($tree, $depth = 0) + public function _queryAsHTML($tree, $depth = 0) { if ($depth == 0) { $ambiguites = array("n" => 0, "refs" => array()); @@ -689,8 +683,7 @@ class searchEngine_adapter_phrasea_queryParser if (isset($tree["CONTEXT"])) $w .= ' [' . $tree["CONTEXT"] . ']'; $txt = '"' . $w . '"'; - } - else { + } else { if (isset($tree["CONTEXT"])) $w .= '[' . $tree["CONTEXT"] . ']'; if ($tree["CLASS"] == "QSIMPLE") @@ -722,7 +715,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function setTids(&$tree, $bid, &$domthe, $searchsynonyms) + public function setTids(&$tree, $bid, &$domthe, $searchsynonyms) { if ($this->debug) print("============================ setTids:\n\$tree=" . var_export($tree, true) . "\n"); @@ -776,8 +769,7 @@ class searchEngine_adapter_phrasea_queryParser $prophtml = ""; $this->propAsHTML($domthe->documentElement, $prophtml, $path); $this->proposals["BASES"]["b$bid"]["TERMS"][$path]["HTML"] = $prophtml; - } - else { + } else { // le mot n'est pas dans le thesaurus } @@ -793,27 +785,18 @@ class searchEngine_adapter_phrasea_queryParser if(is_array($w = $simple["VALUE"])) $t = $w = implode(" ", $w); - if(isset($tree["CONTEXT"])) - { - if(!$tree["CONTEXT"]) - { + if (isset($tree["CONTEXT"])) { + if (!$tree["CONTEXT"]) { $x0 = "@w=\"" . $w ."\" and not(@k)"; - } - else - { - if($tree["CONTEXT"]=="*") - { + } else { + if ($tree["CONTEXT"]=="*") { $x0 = "@w=\"" . $w ."\""; - } - else - { + } else { $x0 = "@w=\"" . $w ."\" and @k=\"" . $tree["CONTEXT"] . "\""; $t .= " (" . $tree["CONTEXT"] . ")"; } } - } - else - { + } else { $x0 = "@w=\"" . $w ."\""; } @@ -827,20 +810,15 @@ class searchEngine_adapter_phrasea_queryParser if(!isset($tree["RB"]["SREF"]["TIDS"])) $tree["RB"]["SREF"]["TIDS"] = array(); - if($nodes->length >= 1) - { - if($nodes->length == 1) - { + if ($nodes->length >= 1) { + if ($nodes->length == 1) { // on cherche un id simple, on utilisera la syntaxe sql 'like' (l'extension repérera elle méme la syntaxe car la value finira par '%') $this->addtoTIDS($tree["RB"], $bid, $nodes->item(0)); // $this->thesaurusDOMNodes[] = $nodes->item(0); - } - else - { + } else { // on cherche plusieurs id's, on utilisera la syntaxe 'regexp' (l'extension repérera elle meme la syntaxe car la value finira par '$') $val = ""; - foreach($nodes as $node) - { + foreach ($nodes as $node) { if(!isset($tree["CONTEXT"])) $ambigus++; $this->addtoTIDS($tree["RB"], $bid, $node); @@ -850,9 +828,7 @@ class searchEngine_adapter_phrasea_queryParser $prophtml = ""; $this->propAsHTML($domthe->documentElement, $prophtml, $path); $this->proposals["TERMS"][$path]["HTML"] = $prophtml; - } - else - { + } else { // le mot n'est pas dans le thesaurus } @@ -860,7 +836,7 @@ class searchEngine_adapter_phrasea_queryParser } */ - function containsColonOperator(&$tree) + public function containsColonOperator(&$tree) { if ( ! $tree) { return(false); @@ -877,7 +853,7 @@ class searchEngine_adapter_phrasea_queryParser return($ret); } - function addtoTIDS(&$extendednode, $bid, $DOMnode) // ajoute un tid en évitant les doublons + public function addtoTIDS(&$extendednode, $bid, $DOMnode) // ajoute un tid en évitant les doublons { $id = $DOMnode->getAttribute("id"); $pid = $DOMnode->parentNode->getAttribute("id"); @@ -940,7 +916,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function astext_ambigu($tree, &$ambiguites, $mouseCallback = "void", $depth = 0) + public function astext_ambigu($tree, &$ambiguites, $mouseCallback = "void", $depth = 0) { if ($depth == 0) { $ambiguites = array("n" => 0, "refs" => array()); @@ -990,7 +966,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function get_ambigu(&$tree, $mouseCallback = "void", $depth = 0) + public function get_ambigu(&$tree, $mouseCallback = "void", $depth = 0) { if ( ! $tree) { return(""); @@ -1012,7 +988,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function set_default(&$tree, &$emptyw, $depth = 0) + public function set_default(&$tree, &$emptyw, $depth = 0) { if ( ! $tree) { return(true); @@ -1061,8 +1037,7 @@ class searchEngine_adapter_phrasea_queryParser else if ( ! isset($tree["LB"])) $tree = $tree["RB"]; - } - else { + } else { if (($tree["CLASS"] == "SIMPLE" || $tree["CLASS"] == "QSIMPLE")) { if (is_array($tree["VALUE"])) { $treetmp = null; @@ -1108,13 +1083,13 @@ class searchEngine_adapter_phrasea_queryParser return(true); } - function factor_or(&$tree) + public function factor_or(&$tree) { do $n = $this->factor_or2($tree); while ($n > 0); } - function factor_or2(&$tree, $depth = 0) + public function factor_or2(&$tree, $depth = 0) { $nmodif = 0; if ($tree["CLASS"] == "OPS" || $tree["CLASS"] == "OPK") { @@ -1125,15 +1100,13 @@ class searchEngine_adapter_phrasea_queryParser if (is_array($tree["RB"]["VALUE"])) { foreach ($tree["RB"]["VALUE"] as $v) $tree["VALUE"][] = $v; - } - else + } else $tree["VALUE"][] = $tree["RB"]["VALUE"]; unset($tree["LB"]); unset($tree["RB"]); unset($tree["PNUM"]); $nmodif ++; - } - else { + } else { $nmodif += $this->factor_or2($tree["LB"], $depth + 1); $nmodif += $this->factor_or2($tree["RB"], $depth + 1); } @@ -1142,7 +1115,7 @@ class searchEngine_adapter_phrasea_queryParser return($nmodif); } - function setNumValue(&$tree, SimpleXMLElement $sxml_struct, $depth = 0) + public function setNumValue(&$tree, SimpleXMLElement $sxml_struct, $depth = 0) { if ($tree["CLASS"] == "OPK") { if (isset($tree["RB"]) && ($tree["RB"]["CLASS"] == "SIMPLE" || $tree["RB"]["CLASS"] == "QSIMPLE") && ($tree["LB"]["CLASS"] == "SIMPLE" || $tree["LB"]["CLASS"] == "QSIMPLE")) { @@ -1174,14 +1147,14 @@ class searchEngine_adapter_phrasea_queryParser $this->setNumValue($tree["RB"], $sxml_struct, $depth + 1); } - function changeNodeEquals(&$branch, $type) + public function changeNodeEquals(&$branch, $type) { if (strtoupper($type) == strtoupper("Date")) { $branch = $this->changeNodeEquals2($branch); } } - function changeNodeEquals2($oneBranch) + public function changeNodeEquals2($oneBranch) { ## creation branche gauche avec ">=" // print("changeNodeEquals2\n"); @@ -1226,7 +1199,7 @@ class searchEngine_adapter_phrasea_queryParser return $tree; } - function setNumValue2(&$branch, $type) + public function setNumValue2(&$branch, $type) { if (strtoupper($type) == strtoupper("Date")) { $dateEnIso = $this->isoDate($branch["VALUE"]); @@ -1234,7 +1207,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function isoDate($onedate, $max = false) + public function isoDate($onedate, $max = false) { $v_y = "1900"; $v_m = "01"; @@ -1285,8 +1258,7 @@ class searchEngine_adapter_phrasea_queryParser $v_d = "99"; else $v_d = "00"; - } - elseif (strlen($tmp[1]) == 4) { + } elseif (strlen($tmp[1]) == 4) { // on a l'année en premier, on suppose alors que c'est de la forme DD MM YYYY $v_y = $tmp[1]; $v_m = $tmp[0]; @@ -1294,8 +1266,7 @@ class searchEngine_adapter_phrasea_queryParser $v_d = "99"; else $v_d = "00"; - } - else { + } else { // on a l'anné sur 2 chiffres if ($tmp[1] < 20) $v_y = "20" . $tmp[1]; @@ -1378,7 +1349,7 @@ class searchEngine_adapter_phrasea_queryParser return("" . $v_y . $v_m . $v_d . $v_h . $v_minutes . $v_s); } - function distrib_in(&$tree, $depth = 0) + public function distrib_in(&$tree, $depth = 0) { $opdistrib = array(PHRASEA_OP_AND, PHRASEA_OP_OR, PHRASEA_OP_EXCEPT, PHRASEA_OP_NEAR, PHRASEA_OP_BEFORE, PHRASEA_OP_AFTER); // ces opérateurs sont 'distribuables' autour d'un 'IN' @@ -1452,7 +1423,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function makequery($tree) + public function makequery($tree) { $a = array($tree["NODETYPE"]); switch ($tree["CLASS"]) { @@ -1491,7 +1462,7 @@ class searchEngine_adapter_phrasea_queryParser return($a); } - function maketree($depth, $inquote = false) + public function maketree($depth, $inquote = false) { // printf("\n\n"); $tree = null; @@ -1533,8 +1504,7 @@ class searchEngine_adapter_phrasea_queryParser $tree["RB"] = $this->maketree($depth + 1); if ( ! $tree["RB"]) $tree = null; - } - else { + } else { // ici on applique l'opérateur par défaut $tree = array("CLASS" => "OPS", "VALUE" => $this->defaultop["VALUE"], @@ -1581,8 +1551,7 @@ class searchEngine_adapter_phrasea_queryParser $tree["RB"] = $this->maketree($depth + 1, true); if ( ! $tree["RB"]) $tree = null; - } - else { + } else { // ici on applique l'opérateur par défaut $tree = array("CLASS" => "OPS", "VALUE" => $this->defaultop["VALUE"], @@ -1621,7 +1590,7 @@ class searchEngine_adapter_phrasea_queryParser return($tree); } - function addtotree($tree, $t, $depth, $inquote) + public function addtotree($tree, $t, $depth, $inquote) { if ($this->debug) { printf("addtotree({tree}, \$t[CLASS]='%s', \$t[VALUE]='%s', \$depth=%d, inquote=%s)\n", $t["CLASS"], $t["VALUE"], $depth, $inquote ? "true" : "false"); @@ -1659,8 +1628,7 @@ class searchEngine_adapter_phrasea_queryParser return(null); } } - } - else { + } else { if ($this->errmsg != "") $this->errmsg .= "\\n"; $this->errmsg .= sprintf("le contexte [%s] ne peut suivre qu'un terme ou un opérateur
", $t["VALUE"]); @@ -1723,8 +1691,7 @@ class searchEngine_adapter_phrasea_queryParser } return(array("CLASS" => "OPS", "VALUE" => $t["VALUE"], "NODETYPE" => $this->ops[$t["VALUE"]]["NODETYPE"], "PNUM" => $pnum, "DEPTH" => $depth, "LB" => $tree, "RB" => null)); - } - else { + } else { // ce mot n'est pas un opérateur $pnum = null; $nodetype = PHRASEA_KEYLIST; @@ -1741,8 +1708,7 @@ class searchEngine_adapter_phrasea_queryParser $this->ungettoken($tn["VALUE"]); } } - } - else { + } else { //printf("sdfsdfsdfsd
"); $type = $inquote ? "QSIMPLE" : "SIMPLE"; } @@ -1753,7 +1719,7 @@ class searchEngine_adapter_phrasea_queryParser } } - function addsimple($t, $type, $nodetype, $pnum, $tree, $depth) + public function addsimple($t, $type, $nodetype, $pnum, $tree, $depth) { $nok = 0; $registry = registry::get_instance(); @@ -1770,8 +1736,7 @@ class searchEngine_adapter_phrasea_queryParser return(null); } // $nok = 0; - } - else + } else $nok ++; } } @@ -1851,12 +1816,12 @@ class searchEngine_adapter_phrasea_queryParser } } - function ungettoken($s) + public function ungettoken($s) { $this->phq = $s . " " . $this->phq; } - function nexttoken($inquote = false) + public function nexttoken($inquote = false) { if ($this->phq == "") { return(null); @@ -1965,8 +1930,7 @@ class searchEngine_adapter_phrasea_queryParser // $c = mb_strtolower($c); // $t .= isset($this->noaccent[$c]) ? $this->noaccent[$c] : $c; $t .= $this->unicode->remove_diacritics(mb_strtolower($c_utf8)); - } - else + } else break; } // if ($c_utf8 == "(" || $c_utf8 == ")" || $c_utf8 == "[" || $c_utf8 == "]" || $c_utf8 == "=" || $c_utf8 == ":" || $c_utf8 == "<" || $c_utf8 == ">" || $c_utf8 == "\"") diff --git a/lib/classes/searchEngine/adapter/sphinx/engine.class.php b/lib/classes/searchEngine/adapter/sphinx/engine.class.php index 4cafc65fff..8f4ede9d9a 100644 --- a/lib/classes/searchEngine/adapter/sphinx/engine.class.php +++ b/lib/classes/searchEngine/adapter/sphinx/engine.class.php @@ -67,7 +67,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i /** * - * @param searchEngine_options $options + * @param searchEngine_options $options * @return searchEngine_adapter_sphinx_engine */ public function set_options(searchEngine_options $options) @@ -254,9 +254,9 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i /** * - * @param string $query - * @param int $offset - * @param int $perPage + * @param string $query + * @param int $offset + * @param int $perPage * @return searchEngine_results */ public function results($query, $offset, $perPage) @@ -307,8 +307,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i if ( ! $found) $index .= 'documents' . implode(', documents', $index_keys); $index .= ', docs_realtime' . implode(', docs_realtime', $index_keys); - } - else { + } else { $index = ''; $found = false; if ($this->query !== '' && $this->options->get_use_stemming() && $session->get_I18n() == 'fr') { @@ -372,10 +371,10 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i /** * - * @param string $keyword + * @param string $keyword * @return string */ - function BuildTrigrams($keyword) + public function BuildTrigrams($keyword) { $t = "__" . $keyword . "__"; @@ -480,7 +479,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i /** * - * @param Session_Handler $session + * @param Session_Handler $session * @return array */ public function get_suggestions(Session_Handler $session, $only_last_word = false) @@ -645,9 +644,9 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i /** * - * @param string $query - * @param array $fields - * @param int $selected_sbas_id + * @param string $query + * @param array $fields + * @param int $selected_sbas_id * @return array */ public function build_excerpt($query, array $fields, record_adapter $record) @@ -682,8 +681,7 @@ class searchEngine_adapter_sphinx_engine extends searchEngine_adapter_abstract i } if ( ! $found) $index .= 'documents' . implode(', documents', $index_keys); - } - else { + } else { $index = ''; $found = false; if ($this->options->get_use_stemming() && $session->get_I18n() == 'fr') { diff --git a/lib/classes/searchEngine/options.class.php b/lib/classes/searchEngine/options.class.php index 54195555b7..681beb9fd2 100644 --- a/lib/classes/searchEngine/options.class.php +++ b/lib/classes/searchEngine/options.class.php @@ -134,8 +134,8 @@ class searchEngine_options implements Serializable /** * - * @param const $sort_by - * @param const $sort_ord + * @param const $sort_by + * @param const $sort_ord * @return searchEngine_options */ public function set_sort($sort_by, $sort_ord = self::SORT_MODE_DESC) @@ -178,7 +178,7 @@ class searchEngine_options implements Serializable /** * - * @param boolean $boolean + * @param boolean $boolean * @return searchEngine_options */ public function set_use_stemming($boolean) @@ -199,7 +199,7 @@ class searchEngine_options implements Serializable /** * - * @param int $search_type + * @param int $search_type * @return searchEngine_options */ public function set_search_type($search_type) @@ -228,8 +228,8 @@ class searchEngine_options implements Serializable /** * - * @param array $base_ids - * @param ACL $ACL + * @param array $base_ids + * @param ACL $ACL * @return searchEngine_options */ public function set_bases(Array $base_ids, ACL $ACL) @@ -253,7 +253,7 @@ class searchEngine_options implements Serializable /** * - * @param array $fields + * @param array $fields * @return searchEngine_options */ public function set_fields(Array $fields) @@ -274,7 +274,7 @@ class searchEngine_options implements Serializable /** * - * @param array $status + * @param array $status * @return searchEngine_options */ public function set_status(Array $status) @@ -309,7 +309,7 @@ class searchEngine_options implements Serializable /** * - * @param string $record_type + * @param string $record_type * @return searchEngine_options */ public function set_record_type($record_type) @@ -350,7 +350,7 @@ class searchEngine_options implements Serializable /** * - * @param string $min_date + * @param string $min_date * @return searchEngine_options */ public function set_min_date($min_date) @@ -373,7 +373,7 @@ class searchEngine_options implements Serializable /** * - * @param string $max_date + * @param string $max_date * @return searchEngine_options */ public function set_max_date($max_date) @@ -396,7 +396,7 @@ class searchEngine_options implements Serializable /** * - * @param array $fields + * @param array $fields * @return searchEngine_options */ public function set_date_fields(Array $fields) @@ -434,7 +434,7 @@ class searchEngine_options implements Serializable /** * - * @param string $serialized + * @param string $serialized * @return searchEngine_options */ public function unserialize($serialized) diff --git a/lib/classes/searchEngine/results.class.php b/lib/classes/searchEngine/results.class.php index 515da7cf5b..040bb98dd7 100644 --- a/lib/classes/searchEngine/results.class.php +++ b/lib/classes/searchEngine/results.class.php @@ -31,8 +31,8 @@ class searchEngine_results /** * - * @param set $result - * @param searchEngine_adapter_interface $engine + * @param set $result + * @param searchEngine_adapter_interface $engine * @return searchEngine_results */ public function __construct(set_abstract $result, searchEngine_adapter_interface $engine) diff --git a/lib/classes/set/abstract.class.php b/lib/classes/set/abstract.class.php index 4fba2f5283..0b1b3ee9e7 100644 --- a/lib/classes/set/abstract.class.php +++ b/lib/classes/set/abstract.class.php @@ -45,8 +45,8 @@ abstract class set_abstract implements IteratorAggregate /** * - * @param string $offset - * @param string $value + * @param string $offset + * @param string $value * @return Void */ public function offsetSet($offset, $value) @@ -60,7 +60,7 @@ abstract class set_abstract implements IteratorAggregate /** * - * @param string $offset + * @param string $offset * @return boolean */ public function offsetExists($offset) @@ -70,7 +70,7 @@ abstract class set_abstract implements IteratorAggregate /** * - * @param string $offset + * @param string $offset * @return Void */ public function offsetUnset($offset) @@ -80,7 +80,7 @@ abstract class set_abstract implements IteratorAggregate /** * - * @param string $offset + * @param string $offset * @return record_adapter */ public function offsetGet($offset) @@ -145,7 +145,7 @@ abstract class set_abstract implements IteratorAggregate /** * - * @param record_Interface $record + * @param record_Interface $record * @return set */ public function add_element(record_Interface &$record) @@ -157,7 +157,7 @@ abstract class set_abstract implements IteratorAggregate /** * - * @param record_Interface $record + * @param record_Interface $record * @return set */ public function remove_element(record_Interface &$record) diff --git a/lib/classes/set/export.class.php b/lib/classes/set/export.class.php index 9a1f8f391b..1859c237dd 100644 --- a/lib/classes/set/export.class.php +++ b/lib/classes/set/export.class.php @@ -30,8 +30,8 @@ class set_export extends set_abstract /** * - * @param string $lst - * @param int $sstid + * @param string $lst + * @param int $sstid * @return set_export */ public function __construct($lst, $sstid, $storyWZid = null) @@ -381,8 +381,8 @@ class set_export extends set_abstract /** * - * @param Array $subdefs - * @param boolean $rename_title + * @param Array $subdefs + * @param boolean $rename_title * @return Array */ public function prepare_export(Array $subdefs, $rename_title, $includeBusinessFields) @@ -694,9 +694,9 @@ class set_export extends set_abstract /** * - * @param String $token - * @param Array $list - * @param string $zipFile + * @param String $token + * @param Array $list + * @param string $zipFile * @return string */ public static function build_zip($token, Array $list, $zipFile) @@ -768,10 +768,10 @@ class set_export extends set_abstract /** * - * @param string $file - * @param string $exportname - * @param string $mime - * @param string $disposition + * @param string $file + * @param string $exportname + * @param string $mime + * @param string $disposition * @return \Symfony\Component\HttpFoundation\Response */ public static function stream_file( @@ -843,10 +843,10 @@ class set_export extends set_abstract /** * - * @param String $data - * @param String $exportname - * @param String $mime - * @param String $disposition + * @param String $data + * @param String $exportname + * @param String $mime + * @param String $disposition * @return Void */ public static function stream_data($data, $exportname, $mime, $disposition = 'attachment') @@ -871,9 +871,9 @@ class set_export extends set_abstract /** * @todo a revoir le cas anonymous * - * @param Array $list - * @param String> $type - * @param boolean $anonymous + * @param Array $list + * @param String> $type + * @param boolean $anonymous * @return Void */ public static function log_download(Array $list, $type, $anonymous = false, $comment = '') diff --git a/lib/classes/set/exportftp.class.php b/lib/classes/set/exportftp.class.php index a03f633554..9f43d5ad86 100644 --- a/lib/classes/set/exportftp.class.php +++ b/lib/classes/set/exportftp.class.php @@ -20,15 +20,15 @@ class set_exportftp extends set_export /** * - * @param Int $usr_to - * @param String $host - * @param String $login - * @param String $password - * @param Int $ssl - * @param Int $retry - * @param Int $passif - * @param String $destfolder - * @param String $makedirectory + * @param Int $usr_to + * @param String $host + * @param String $login + * @param String $password + * @param Int $ssl + * @param Int $retry + * @param Int $passif + * @param String $destfolder + * @param String $makedirectory * @return boolean */ public function export_ftp($usr_to, $host, $login, $password, $ssl, $retry, $passif, $destfolder, $makedirectory, $logfile) diff --git a/lib/classes/set/exportorder.class.php b/lib/classes/set/exportorder.class.php index b3fd81b6af..9a6abab9d6 100644 --- a/lib/classes/set/exportorder.class.php +++ b/lib/classes/set/exportorder.class.php @@ -20,9 +20,9 @@ class set_exportorder extends set_export /** * - * @param Int $from_usr_id - * @param String $usage - * @param String $deadline + * @param Int $from_usr_id + * @param String $usage + * @param String $deadline * @return boolean * @return $order_id */ @@ -120,8 +120,8 @@ class set_exportorder extends set_export /** * - * @param Int $admins - * @param Int $base_id + * @param Int $admins + * @param Int $base_id * @return Void */ public static function set_order_admins($admins, $base_id) diff --git a/lib/classes/set/order.class.php b/lib/classes/set/order.class.php index 261d37e51e..f96c953b5c 100644 --- a/lib/classes/set/order.class.php +++ b/lib/classes/set/order.class.php @@ -67,7 +67,7 @@ class set_order extends set_abstract /** * - * @param int $id + * @param int $id * @return set_order */ public function __construct($id) @@ -201,8 +201,8 @@ class set_order extends set_abstract /** * - * @param Array $elements_ids - * @param boolean $force + * @param Array $elements_ids + * @param boolean $force * @return set_order */ public function send_elements(Array $elements_ids, $force) @@ -319,7 +319,7 @@ class set_order extends set_abstract /** * - * @param Array $elements_ids + * @param Array $elements_ids * @return set_order */ public function deny_elements(Array $elements_ids) diff --git a/lib/classes/set/ordermanager.class.php b/lib/classes/set/ordermanager.class.php index 9c66159f7b..ab18f80641 100644 --- a/lib/classes/set/ordermanager.class.php +++ b/lib/classes/set/ordermanager.class.php @@ -128,8 +128,8 @@ class set_ordermanager extends set_abstract /** * - * @param string $a - * @param string $b + * @param string $a + * @param string $b * @return int */ protected static function usage_orders_sort($a, $b) @@ -145,8 +145,8 @@ class set_ordermanager extends set_abstract /** * - * @param string $a - * @param string $b + * @param string $a + * @param string $b * @return int */ protected static function user_orders_sort($a, $b) @@ -162,8 +162,8 @@ class set_ordermanager extends set_abstract /** * - * @param DateTime $a - * @param DateTime $b + * @param DateTime $a + * @param DateTime $b * @return int */ protected static function date_orders_sort(DateTime $a, DateTime $b) diff --git a/lib/classes/set/selection.class.php b/lib/classes/set/selection.class.php index 021a7a3139..96152c15c0 100644 --- a/lib/classes/set/selection.class.php +++ b/lib/classes/set/selection.class.php @@ -31,7 +31,7 @@ class set_selection extends set_abstract /** * - * @param \Entities\Basket $basket + * @param \Entities\Basket $basket * @return set_selection */ public function load_basket(\Entities\Basket $Basket) @@ -45,7 +45,7 @@ class set_selection extends set_abstract /** * - * @param array $rights + * @param array $rights * @return set_selection */ public function grep_authorized(Array $rights = array(), Array $sbas_rights = array()) @@ -118,7 +118,7 @@ class set_selection extends set_abstract /** * - * @param array $lst + * @param array $lst * @return set_selection */ public function load_list(Array $lst, $flatten_groupings = false) diff --git a/lib/classes/setup.class.php b/lib/classes/setup.class.php index 161d7398b8..892f8f8e70 100644 --- a/lib/classes/setup.class.php +++ b/lib/classes/setup.class.php @@ -81,7 +81,7 @@ class setup && is_file(__DIR__ . "/../../config/config.inc")); } - function create_global_values(registryInterface &$registry, $datas = array()) + public function create_global_values(registryInterface &$registry, $datas = array()) { require(__DIR__ . "/../../lib/conf.d/_GV_template.inc"); @@ -106,8 +106,7 @@ class setup $datas[$variable['name']] = '1'; else $datas[$variable['name']] = '0'; - } - else { + } else { $datas[$variable['name']] = $variable['default']; } } @@ -274,7 +273,7 @@ class setup return exec(sprintf('which %s', $binary)); } - function check_mod_auth_token() + public function check_mod_auth_token() { $registry = registry::get_instance(); @@ -300,7 +299,7 @@ class setup @@ -356,8 +355,7 @@ class setup function check_apache_mod(el,mod) { var url = '/admin/test-'; - switch(mod) - { + switch (mod) { case 'rewrite': url += 'rewrite'; break; @@ -531,8 +529,7 @@ class setup foreach ($availables_caches as $ext) { if (extension_loaded($ext) === true) { $constraints[] = new Setup_Constraint(sprintf('Extension %s', $ext), true, sprintf('%s loaded', $ext), false); - } - else + } else $constraints[] = new Setup_Constraint(sprintf('Extension %s', $ext), false, sprintf('%s not loaded', $ext), false); } diff --git a/lib/classes/sphinxrt.class.php b/lib/classes/sphinxrt.class.php index ac745400ae..2948ca5e52 100644 --- a/lib/classes/sphinxrt.class.php +++ b/lib/classes/sphinxrt.class.php @@ -35,7 +35,7 @@ class sphinxrt /** * - * @param registry $registry + * @param registry $registry * @return sphinxrt */ public static function get_instance(registry $registry, $retry_on_failure = false) @@ -53,9 +53,9 @@ class sphinxrt /** * Delete an index * - * @param array $index_ids - * @param $rt_id - * @param $meta_id + * @param array $index_ids + * @param $rt_id + * @param $meta_id * @return sphinxrt */ public function delete(Array $index_ids, $rt_id, $id) diff --git a/lib/classes/system/server.class.php b/lib/classes/system/server.class.php index 99541404a4..0d0e561f6f 100644 --- a/lib/classes/system/server.class.php +++ b/lib/classes/system/server.class.php @@ -27,7 +27,7 @@ class system_server * * @return system_server */ - function __construct() + public function __construct() { $this->_server_software = isset($_SERVER['SERVER_SOFTWARE']) ? strtolower($_SERVER['SERVER_SOFTWARE']) : ""; diff --git a/lib/classes/system/url.class.php b/lib/classes/system/url.class.php index a66d0ca787..82c477b3b2 100644 --- a/lib/classes/system/url.class.php +++ b/lib/classes/system/url.class.php @@ -19,12 +19,12 @@ class system_url { protected $url; - function __construct($url) + public function __construct($url) { $this->url = $url; } - function get_url() + public function get_url() { return $this->url; } diff --git a/lib/classes/task/abstract.class.php b/lib/classes/task/abstract.class.php index 053cd17632..85a0cb3706 100755 --- a/lib/classes/task/abstract.class.php +++ b/lib/classes/task/abstract.class.php @@ -150,7 +150,7 @@ abstract class task_abstract /** * set the state of the task (task_abstract::STATE_*) * - * @param String $status + * @param String $status * @throws Exception_InvalidArgument */ public function setState($status) @@ -276,7 +276,7 @@ abstract class task_abstract abstract public function help(); - function __construct($taskid) + public function __construct($taskid) { $this->taskid = $taskid; @@ -656,7 +656,7 @@ abstract class task_abstract } } - function traceRam($msg = '') + public function traceRam($msg = '') { static $lastt = null; $t = explode(' ', ($ut = microtime())); @@ -701,9 +701,9 @@ abstract class task_abstract /** * - * @param appbox $appbox - * @param type $class_name - * @param type $settings + * @param appbox $appbox + * @param type $class_name + * @param type $settings * @return task_abstract */ public static function create(appbox $appbox, $class_name, $settings = null) @@ -757,7 +757,7 @@ abstract class task_abstract return $this->taskid; } - function setProgress($done, $todo) + public function setProgress($done, $todo) { $p = ($todo > 0) ? ((100 * $done) / $todo) : -1; diff --git a/lib/classes/task/appboxAbstract.class.php b/lib/classes/task/appboxAbstract.class.php index 8d0268c319..23109d0eb9 100755 --- a/lib/classes/task/appboxAbstract.class.php +++ b/lib/classes/task/appboxAbstract.class.php @@ -127,6 +127,7 @@ abstract class task_appboxAbstract extends task_abstract } catch (Exception $e) { $this->log('Error : ' . $e->getMessage()); } + return $ret; /* diff --git a/lib/classes/task/databoxAbstract.class.php b/lib/classes/task/databoxAbstract.class.php index e21154dd57..3346902a17 100755 --- a/lib/classes/task/databoxAbstract.class.php +++ b/lib/classes/task/databoxAbstract.class.php @@ -75,6 +75,7 @@ abstract class task_databoxAbstract extends task_abstract } catch (Exception $e) { // failed sql, simply return $this->running = FALSE; + return; } diff --git a/lib/classes/task/manager.class.php b/lib/classes/task/manager.class.php index 2fe14a3d5b..c248e7e627 100755 --- a/lib/classes/task/manager.class.php +++ b/lib/classes/task/manager.class.php @@ -83,7 +83,7 @@ class task_manager /** * - * @param int $task_id + * @param int $task_id * @return task_abstract */ public function getTask($task_id) diff --git a/lib/classes/task/period/apibridge.class.php b/lib/classes/task/period/apibridge.class.php index 54f6ef63f2..2c5eda860f 100755 --- a/lib/classes/task/period/apibridge.class.php +++ b/lib/classes/task/period/apibridge.class.php @@ -37,7 +37,7 @@ class task_period_apibridge extends task_appboxAbstract /** * - * @param appbox $appbox + * @param appbox $appbox * @return Array */ protected function retrieveContent(appbox $appbox) @@ -65,8 +65,8 @@ class task_period_apibridge extends task_appboxAbstract /** * - * @param appbox $appbox - * @param array $row + * @param appbox $appbox + * @param array $row * @return task_period_apibridge */ protected function processOneContent(appbox $appbox, Array $row) @@ -100,8 +100,8 @@ class task_period_apibridge extends task_appboxAbstract /** * - * @param appbox $appbox - * @param array $row + * @param appbox $appbox + * @param array $row * @return task_period_apibridge */ protected function postProcessOneContent(appbox $appbox, Array $row) @@ -111,7 +111,7 @@ class task_period_apibridge extends task_appboxAbstract /** * - * @param Bridge_Element $element + * @param Bridge_Element $element * @return task_period_apibridge */ private function upload_element(Bridge_Element $element) @@ -133,7 +133,7 @@ class task_period_apibridge extends task_appboxAbstract /** * - * @param Bridge_Element $element + * @param Bridge_Element $element * @return task_period_apibridge */ protected function update_element(Bridge_Element &$element) diff --git a/lib/classes/task/period/archive.class.php b/lib/classes/task/period/archive.class.php index 8546edc0c5..cfbae48277 100755 --- a/lib/classes/task/period/archive.class.php +++ b/lib/classes/task/period/archive.class.php @@ -86,7 +86,7 @@ class task_period_archive extends task_abstract /** * - * @param string $oldxml + * @param string $oldxml * @return string */ public function graphic2xml($oldxml) @@ -141,8 +141,8 @@ class task_period_archive extends task_abstract /** * xml2graphic : must fill the graphic form (using js) from xml * - * @param string $xml - * @param string $form + * @param string $xml + * @param string $form * @return Void */ public function xml2graphic($xml, $form) @@ -164,8 +164,7 @@ class task_period_archive extends task_abstract var i; var opts = .base_id.options; var basefound = 0; - for(i=1; basefound==0 && ibase_id, "form") ?>") basefound = i; } @@ -179,6 +178,7 @@ class task_period_archive extends task_abstract .copy_spe.checked = copy_spe) ? "true" : "false" ?>; log(sprintf(_('task::archive:Can\'t create or go to folder \'%s\''), $pathhd)); $this->running = false; + return; } } @@ -520,10 +522,10 @@ class task_period_archive extends task_abstract /** * - * @param $server_coll_id + * @param $server_coll_id * @return */ - function archiveHotFolder($server_coll_id) + public function archiveHotFolder($server_coll_id) { clearstatcache(); @@ -571,6 +573,7 @@ class task_period_archive extends task_abstract $this->log("=========== listFilesPhase1 ========== (returned " . $nnew . ")\n" . $dom->saveXML()); if ($nnew === 'TOSTOP') { // special case : status has changed to TOSTOP while listing files + return('TOSTOP'); } @@ -640,10 +643,10 @@ class task_period_archive extends task_abstract /** * - * @param $f + * @param $f * @return */ - function isIgnoredFile($f) + public function isIgnoredFile($f) { $f = strtolower($f); @@ -653,11 +656,11 @@ class task_period_archive extends task_abstract /** * check if the file matches any mask, and flag the 'caption' file if found * - * @param $dom - * @param $node + * @param $dom + * @param $node * @return */ - function checkMatch($dom, $node) + public function checkMatch($dom, $node) { $file = $node->getAttribute('name'); @@ -695,13 +698,13 @@ class task_period_archive extends task_abstract * list every file, all 'hot' * read .phrasea.xml files * - * @param $dom - * @param $node - * @param $path - * @param $server_coll_id + * @param $dom + * @param $node + * @param $path + * @param $server_coll_id * @return */ - function listFilesPhase1($dom, $node, $path, $server_coll_id) + public function listFilesPhase1($dom, $node, $path, $server_coll_id) { // $this->traceRam(); $nnew = 0; @@ -789,13 +792,13 @@ class task_period_archive extends task_abstract * list again and flag dead files as 'cold' * * @staticvar int $iloop - * @param $dom - * @param $node - * @param $path - * @param $depth + * @param $dom + * @param $node + * @param $path + * @param $depth * @return */ - function listFilesPhase2($dom, $node, $path, $depth = 0) + public function listFilesPhase2($dom, $node, $path, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -889,16 +892,16 @@ class task_period_archive extends task_abstract * declare uncomplete grp as error * * @staticvar int $iloop - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $inGrp - * @param $depth + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $inGrp + * @param $depth * @return */ - function makePairs($dom, $node, $path, $path_archived, $path_error, $inGrp = false, $depth = 0) + public function makePairs($dom, $node, $path, $path_archived, $path_error, $inGrp = false, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -992,8 +995,7 @@ class task_period_archive extends task_abstract } } } - } - else { + } else { // not a grp folder, recurse $this->makePairs($dom, $n, $path . '/' . $name , $path_archived . '/' . $name @@ -1030,15 +1032,15 @@ class task_period_archive extends task_abstract * move files to archived or error dir * * @staticvar int $iloop - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $depth + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $depth * @return */ - function removeBadGroups($dom, $node, $path, $path_archived, $path_error, $depth = 0) + public function removeBadGroups($dom, $node, $path, $path_archived, $path_error, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -1048,6 +1050,7 @@ class task_period_archive extends task_abstract $ret = false; if ($depth == 0 && $node->getAttribute('temperature') == 'hot') // if root of hotfolder if hot, die... + return($ret); $nodesToDel = array(); @@ -1105,15 +1108,15 @@ class task_period_archive extends task_abstract * do special work on grp folders * * @staticvar int $iloop - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $depth + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $depth * @return */ - function archive($dom, $node, $path, $path_archived, $path_error, $depth = 0) + public function archive($dom, $node, $path, $path_archived, $path_error, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -1179,13 +1182,13 @@ class task_period_archive extends task_abstract * to help creation of result folders and cleaning of the hotfolder * * @staticvar int $iloop - * @param $dom - * @param $node - * @param $path - * @param $depth + * @param $dom + * @param $node + * @param $path + * @param $depth * @return */ - function bubbleResults($dom, $node, $path, $depth = 0) + public function bubbleResults($dom, $node, $path, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -1247,15 +1250,15 @@ class task_period_archive extends task_abstract * move files to archived or error dir * * @staticvar int $iloop - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $depth + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $depth * @return */ - function moveFiles($dom, $node, $path, $path_archived, $path_error, $depth = 0) + public function moveFiles($dom, $node, $path, $path_archived, $path_error, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -1265,6 +1268,7 @@ class task_period_archive extends task_abstract $ret = false; if ($depth == 0 && $node->getAttribute('temperature') == 'hot') { // if root of hotfolder if hot, die... + return($ret); } @@ -1341,11 +1345,11 @@ class task_period_archive extends task_abstract /** * - * @param $dom - * @param $node + * @param $dom + * @param $node * @return */ - function setBranchHot($dom, $node) + public function setBranchHot($dom, $node) { for ($n = $node; $n; $n = $n->parentNode) { if ($n->nodeType == XML_ELEMENT_NODE) { @@ -1365,15 +1369,15 @@ class task_period_archive extends task_abstract * create the grp if needed * archive files * - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $nodesToDel + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $nodesToDel * @return */ - function archiveGrp($dom, $node, $path, $path_archived, $path_error, &$nodesToDel) + public function archiveGrp($dom, $node, $path, $path_archived, $path_error, &$nodesToDel) { $xpath = new DOMXPath($dom); // useful @@ -1511,9 +1515,9 @@ class task_period_archive extends task_abstract * * @todo pathfile should be optionnal * - * @param \collection $collection The destination collection - * @param sring $pathfile The base file - * @param string $captionFile The optionnal Phrasea XML caption file + * @param \collection $collection The destination collection + * @param sring $pathfile The base file + * @param string $captionFile The optionnal Phrasea XML caption file * @return \record_adapter */ public function createStory(\collection $collection, $pathfile, $captionFile = null) @@ -1572,11 +1576,11 @@ class task_period_archive extends task_abstract /** * Creates a fecord * - * @param \collection $collection The destination collection - * @param string $pathfile The file to archive - * @param string $captionFile The Phrasea XML caption file - * @param integer $grp_rid Add the record to a story - * @param integer $force Force lazaret or record ; use \Alchemy\Phrasea\Border\Manager::FORCE_* constants + * @param \collection $collection The destination collection + * @param string $pathfile The file to archive + * @param string $captionFile The Phrasea XML caption file + * @param integer $grp_rid Add the record to a story + * @param integer $force Force lazaret or record ; use \Alchemy\Phrasea\Border\Manager::FORCE_* constants * @return null */ public function createRecord(\collection $collection, $pathfile, $captionFile, $grp_rid, $force = null) @@ -1652,15 +1656,15 @@ class task_period_archive extends task_abstract /** * - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $grp_rid + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $grp_rid * @return */ - function archiveFilesToGrp($dom, $node, $path, $path_archived, $path_error, $grp_rid) + public function archiveFilesToGrp($dom, $node, $path, $path_archived, $path_error, $grp_rid) { //usleep(1000); $nodesToDel = array(); @@ -1687,16 +1691,16 @@ class task_period_archive extends task_abstract /** * Archive File * - * @param $dom - * @param $node - * @param $path - * @param $path_archived - * @param $path_error - * @param $nodesToDel - * @param $grp_rid + * @param $dom + * @param $node + * @param $path + * @param $path_archived + * @param $path_error + * @param $nodesToDel + * @param $grp_rid * @return */ - function archiveFile($dom, $node, $path, $path_archived, $path_error, &$nodesToDel, $grp_rid = 0) + public function archiveFile($dom, $node, $path, $path_archived, $path_error, &$nodesToDel, $grp_rid = 0) { $match = $node->getAttribute('match'); @@ -1744,17 +1748,17 @@ class task_period_archive extends task_abstract /** * - * @param $dom - * @param $node - * @param $captionFileNode - * @param $path - * @param $path_archived - * @param $path_error - * @param $grp_rid - * @param $nodesToDel + * @param $dom + * @param $node + * @param $captionFileNode + * @param $path + * @param $path_archived + * @param $path_error + * @param $grp_rid + * @param $nodesToDel * @return Void */ - function archiveFileAndCaption($dom, $node, $captionFileNode, $path, $path_archived, $path_error, $grp_rid, &$nodesToDel) + public function archiveFileAndCaption($dom, $node, $captionFileNode, $path, $path_archived, $path_error, $grp_rid, &$nodesToDel) { $ret = false; @@ -1868,7 +1872,7 @@ class task_period_archive extends task_abstract * @param $attributes * @param $depth */ - function setAllChildren($dom, $node, $attributes, $depth = 0) + public function setAllChildren($dom, $node, $attributes, $depth = 0) { static $iloop = 0; if ($depth == 0) { @@ -1890,10 +1894,10 @@ class task_period_archive extends task_abstract /** * - * @param string $file + * @param string $file * @return */ - function getGrpSettings($file) + public function getGrpSettings($file) { $matched = FALSE; foreach ($this->tmaskgrp as $maskgrp) { @@ -1940,8 +1944,8 @@ class task_period_archive extends task_abstract * Map a Bag of metadatas indexed by **Tagnames** to a bag of metadatas * indexed by **FieldNames** * - * @param \databox_descriptionStructure $metadatasStructure The databox structure related - * @param MetadataBag $bag The metadata bag + * @param \databox_descriptionStructure $metadatasStructure The databox structure related + * @param MetadataBag $bag The metadata bag * @return \PHPExiftool\Driver\Metadata\MetadataBag */ protected function getIndexByFieldName(\databox_descriptionStructure $metadatasStructure, MetadataBag $bag) @@ -1961,8 +1965,8 @@ class task_period_archive extends task_abstract * Map a bag of metadatas indexed by **FieldNames** to an array ready for * \record_adapter metadatas submission * - * @param \databox_descriptionStructure $metadatasStructure The databox structure related - * @param MetadataBag $metadatas The metadata bag + * @param \databox_descriptionStructure $metadatasStructure The databox structure related + * @param MetadataBag $metadatas The metadata bag * @return array */ protected function bagToArray(\databox_descriptionStructure $metadatasStructure, MetadataBag $metadatas) @@ -2028,9 +2032,9 @@ class task_period_archive extends task_abstract * Merge two bags of metadatas indexed by **FieldNames** * Return a bag indexed by **FieldNames** * - * @param \databox_descriptionStructure $metadatasStructure The databox structure related - * @param MetadataBag $bag1 The first metadata bag - * @param MetadataBag $bag2 The second metadata bag + * @param \databox_descriptionStructure $metadatasStructure The databox structure related + * @param MetadataBag $bag1 The first metadata bag + * @param MetadataBag $bag2 The second metadata bag * @return \PHPExiftool\Driver\Metadata\MetadataBag */ protected function mergeForDatabox(\databox_descriptionStructure $metadatasStructure, MetadataBag $bag1, MetadataBag $bag2) @@ -2076,8 +2080,8 @@ class task_period_archive extends task_abstract * Read a Phrasea XML file for Phrasea metadatas * Returns a MetadataBag indexed by **FieldNames** * - * @param \databox_descriptionStructure $metadatasStructure The databox structure related - * @param type $pathfile The path file to the XML + * @param \databox_descriptionStructure $metadatasStructure The databox structure related + * @param type $pathfile The path file to the XML * @return \PHPExiftool\Driver\Metadata\MetadataBag * * @throws \InvalidArgumentException When the file is invalid or missing @@ -2137,7 +2141,7 @@ class task_period_archive extends task_abstract /** * Parse a Phrasea XML to find status tag * - * @param \SimpleXMLElement $sxcaption The SimpleXML related to the XML + * @param \SimpleXMLElement $sxcaption The SimpleXML related to the XML * @return string */ protected function parseStatusBit(\SimpleXMLElement $sxcaption) diff --git a/lib/classes/task/period/cindexer.class.php b/lib/classes/task/period/cindexer.class.php index c3384bed6b..23caea3c6c 100755 --- a/lib/classes/task/period/cindexer.class.php +++ b/lib/classes/task/period/cindexer.class.php @@ -117,7 +117,7 @@ class task_period_cindexer extends task_abstract /** * - * @param string $oldxml + * @param string $oldxml * @return string */ public function graphic2xml($oldxml) @@ -162,8 +162,8 @@ class task_period_cindexer extends task_abstract /** * - * @param string $xml - * @param string $form + * @param string $xml + * @param string $form * @return string */ public function xml2graphic($xml, $form) @@ -187,6 +187,7 @@ class task_period_cindexer extends task_abstract parent.calccmd(); setState(self::STATE_STOPPED); $this->log(sprintf(_('task::cindexer:file \'%s\' does not exists'), $cmd)); throw new Exception('cindexer executable not found', self::ERR_EXECUTABLE_NOT_FOUND); + return; } diff --git a/lib/classes/task/period/emptyColl.class.php b/lib/classes/task/period/emptyColl.class.php index f77322d806..4b4bb56c45 100755 --- a/lib/classes/task/period/emptyColl.class.php +++ b/lib/classes/task/period/emptyColl.class.php @@ -45,6 +45,7 @@ class task_period_emptyColl extends task_appboxAbstract { if ( ! $this->base_id) { $this->setState(self::STATE_STOPPED); + return array(); } $collection = collection::get_from_base_id($this->base_id); diff --git a/lib/classes/task/period/ftp.class.php b/lib/classes/task/period/ftp.class.php index e8c755c75a..55f875bb30 100755 --- a/lib/classes/task/period/ftp.class.php +++ b/lib/classes/task/period/ftp.class.php @@ -39,7 +39,7 @@ class task_period_ftp extends task_appboxAbstract /** * - * @param string $oldxml + * @param string $oldxml * @return string */ public function graphic2xml($oldxml) @@ -86,8 +86,8 @@ class task_period_ftp extends task_appboxAbstract /** * - * @param string $xml - * @param string $form + * @param string $xml + * @param string $form * @return string */ public function xml2graphic($xml, $form) @@ -101,6 +101,7 @@ class task_period_ftp extends task_appboxAbstract .period.value = "period, "js", '"') ?>"; get_connection(); @@ -622,7 +624,7 @@ class task_period_ftp extends task_appboxAbstract } } - function send_mails(appbox $appbox, $id) + public function send_mails(appbox $appbox, $id) { $conn = $appbox->get_connection(); $registry = registry::get_instance(); @@ -700,7 +702,7 @@ class task_period_ftp extends task_appboxAbstract mail::ftp_receive($mail, $receiver_message); } - function logexport(Session_Handler $session, record_adapter $record, $obj, $ftpLog) + public function logexport(Session_Handler $session, record_adapter $record, $obj, $ftpLog) { foreach ($obj as $oneObj) { $session->get_logger($record->get_databox()) diff --git a/lib/classes/task/period/ftpPull.class.php b/lib/classes/task/period/ftpPull.class.php index 1399540140..061e979da9 100755 --- a/lib/classes/task/period/ftpPull.class.php +++ b/lib/classes/task/period/ftpPull.class.php @@ -100,6 +100,7 @@ class task_period_ftpPull extends task_appboxAbstract mkdir($this->localpath, 0750); - + if ( ! is_dir($this->localpath)) { $this->log('\'' . $this->localpath . '\' does not exists'); $this->running = FALSE; diff --git a/lib/classes/task/period/outofdate.class.php b/lib/classes/task/period/outofdate.class.php index 19a3d3a3da..cbcb6d2ac5 100755 --- a/lib/classes/task/period/outofdate.class.php +++ b/lib/classes/task/period/outofdate.class.php @@ -138,12 +138,9 @@ class task_period_outofdate extends task_abstract {'name':"status2", 'val':"status2, "js") ?>"}, {'name':"coll2", 'val':"coll2, "js") ?>"} ]; - for(j in pops) - { - for(opts=[pops[j].name].options, i=0; i[pops[j].name].options, i=0; i \n":""); s += "
" + (data[i]["sql"]+'
\n') + "
\n"; var ptxt = ""; @@ -282,8 +277,7 @@ class task_period_outofdate extends task_abstract , dataType:'json' , type:"POST" , async:false - , success:function(data) - { + , success:function(data) { var html = ""; for(i in data.date_fields) html += "\n"; @@ -315,7 +309,7 @@ class task_period_outofdate extends task_abstract // callback : must return the name graphic form to submit // if not implemented, assume 'graphicForm' // ==================================================================== - function getGraphicForm() + public function getGraphicForm() { return true; } @@ -437,7 +431,7 @@ class task_period_outofdate extends task_abstract // ====================================================================================================== // ===== help() : text displayed if --help (optional) // ====================================================================================================== - function help() + public function help() { return(_("task::outofdate:deplacement de docs suivant valeurs de champs 'date'")); } @@ -562,7 +556,7 @@ class task_period_outofdate extends task_abstract } } - function doRecords() + public function doRecords() { $ndone = 0; $ret = 'NORECSTODO'; diff --git a/lib/classes/task/period/subdef.class.php b/lib/classes/task/period/subdef.class.php index 5ed224358a..48bbda710d 100755 --- a/lib/classes/task/period/subdef.class.php +++ b/lib/classes/task/period/subdef.class.php @@ -34,7 +34,7 @@ class task_period_subdef extends task_databoxAbstract * * @return */ - function help() + public function help() { return( _("task::subdef:creation des sous definitions des documents d'origine") @@ -54,7 +54,7 @@ class task_period_subdef extends task_databoxAbstract /** * must return the xml (text) version of the form * - * @param string $oldxml + * @param string $oldxml * @return string */ public function graphic2xml($oldxml) @@ -102,8 +102,8 @@ class task_period_subdef extends task_databoxAbstract /** * must fill the graphic form (using js) from xml * - * @param string $xml - * @param string $form + * @param string $xml + * @param string $form * @return string */ public function xml2graphic($xml, $form) @@ -149,6 +149,7 @@ class task_period_subdef extends task_databoxAbstract status1, "js") ?>"}, {'name':"coll1", 'val':"coll1, "js") ?>"} ]; - for(j in pops) - { - for(opts=[pops[j].name].options, i=0; i[pops[j].name].options, i=0; i >" + x[0] + ")&1=0"; @@ -190,8 +185,7 @@ class task_period_workflow01 extends task_databoxAbstract function chgxmltxt(textinput, fieldname) { var limits = { 'period':{min:1, 'max':1440} , 'delay':{min:0} } ; - if(typeof(limits[fieldname])!='undefined') - { + if (typeof(limits[fieldname])!='undefined') { var v = 0|textinput.value; if(limits[fieldname].min && v < limits[fieldname].min) v = limits[fieldname].min; @@ -217,8 +211,7 @@ class task_period_workflow01 extends task_databoxAbstract function chgsbas(sbaspopup) { - for(fld=0; fld<=1; fld++) - { + for (fld=0; fld<=1; fld++) { var p = document.getElementById("status"+fld); while( (f=p.firstChild) ) p.removeChild(f); @@ -233,18 +226,15 @@ class task_period_workflow01 extends task_databoxAbstract o.setAttribute('value', ''); o.appendChild(document.createTextNode("...")); } - if(sbaspopup.value > 0) - { + if (sbaspopup.value > 0) { $.ajax({ url:"/admin/taskfacility.php" , async:false , data:{'cls':'workflow01', 'taskid':getID() ?>, 'bid':sbaspopup.value} , success:function(data){ - for(fld=0; fld<=1; fld++) - { + for (fld=0; fld<=1; fld++) { var p = document.getElementById("status"+fld); - for(i in data.status_bits) - { + for (i in data.status_bits) { var o = p.appendChild(document.createElement('option')); o.setAttribute('value', data.status_bits[i].n + "_" + data.status_bits[i].value); o.appendChild(document.createTextNode(data.status_bits[i].label)); @@ -252,11 +242,9 @@ class task_period_workflow01 extends task_databoxAbstract } } - for(fld=0; fld<=1; fld++) - { + for (fld=0; fld<=1; fld++) { var p = document.getElementById("coll"+fld); - for(i in data.collections) - { + for (i in data.collections) { var o = p.appendChild(document.createElement('option')); o.setAttribute('value', ""+data.collections[i].id); o.appendChild(document.createTextNode(data.collections[i].name)); @@ -271,7 +259,7 @@ class task_period_workflow01 extends task_databoxAbstract .maxmegs.value = "maxmegs, "js", '"') ?>"; uuid2 */ @@ -143,7 +143,7 @@ class uuid /** * @desc Check wheter an UUID is the NULL UUID 00000000-0000-0000-0000-000000000000 - * @return string + * @return string */ public static function is_null($uuid) { diff --git a/lib/conf.d/PhraseaFixture/Basket/LoadFiveBaskets.php b/lib/conf.d/PhraseaFixture/Basket/LoadFiveBaskets.php index 9d00fd4598..74566de0e3 100644 --- a/lib/conf.d/PhraseaFixture/Basket/LoadFiveBaskets.php +++ b/lib/conf.d/PhraseaFixture/Basket/LoadFiveBaskets.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\Basket; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/Basket/LoadOneBasket.php b/lib/conf.d/PhraseaFixture/Basket/LoadOneBasket.php index cfa4cd9ff7..36ee38afed 100644 --- a/lib/conf.d/PhraseaFixture/Basket/LoadOneBasket.php +++ b/lib/conf.d/PhraseaFixture/Basket/LoadOneBasket.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\Basket; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/Story/LoadOneStory.php b/lib/conf.d/PhraseaFixture/Story/LoadOneStory.php index 19ad4b3256..53cba4ce1d 100644 --- a/lib/conf.d/PhraseaFixture/Story/LoadOneStory.php +++ b/lib/conf.d/PhraseaFixture/Story/LoadOneStory.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\Story; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/UsrLists/ListAbstract.php b/lib/conf.d/PhraseaFixture/UsrLists/ListAbstract.php index e20df8423f..b47b06ad6c 100644 --- a/lib/conf.d/PhraseaFixture/UsrLists/ListAbstract.php +++ b/lib/conf.d/PhraseaFixture/UsrLists/ListAbstract.php @@ -11,9 +11,6 @@ namespace PhraseaFixture\UsrLists; -use Doctrine\ORM\EntityManager; -use Doctrine\Common\DataFixtures\FixtureInterface; -use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\DataFixtures\AbstractFixture; /** diff --git a/lib/conf.d/PhraseaFixture/UsrLists/UsrList.php b/lib/conf.d/PhraseaFixture/UsrLists/UsrList.php index 8a5ac5a9b5..5c0b58f32e 100644 --- a/lib/conf.d/PhraseaFixture/UsrLists/UsrList.php +++ b/lib/conf.d/PhraseaFixture/UsrLists/UsrList.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\UsrLists; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/UsrLists/UsrListEntry.php b/lib/conf.d/PhraseaFixture/UsrLists/UsrListEntry.php index 0a54460388..a4e43eb80f 100644 --- a/lib/conf.d/PhraseaFixture/UsrLists/UsrListEntry.php +++ b/lib/conf.d/PhraseaFixture/UsrLists/UsrListEntry.php @@ -17,7 +17,6 @@ namespace PhraseaFixture\UsrLists; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/UsrLists/UsrListOwner.php b/lib/conf.d/PhraseaFixture/UsrLists/UsrListOwner.php index 334c6b8469..583b4ceb12 100644 --- a/lib/conf.d/PhraseaFixture/UsrLists/UsrListOwner.php +++ b/lib/conf.d/PhraseaFixture/UsrLists/UsrListOwner.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\UsrLists; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadOneParticipant.php b/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadOneParticipant.php index f2a8d16e4a..ef49954f42 100644 --- a/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadOneParticipant.php +++ b/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadOneParticipant.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\ValidationParticipant; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadParticipantWithSession.php b/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadParticipantWithSession.php index 7820394e8f..4cdfb29a96 100644 --- a/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadParticipantWithSession.php +++ b/lib/conf.d/PhraseaFixture/ValidationParticipant/LoadParticipantWithSession.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\ValidationParticipant; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager; diff --git a/lib/conf.d/PhraseaFixture/ValidationSession/LoadOneValidationSession.php b/lib/conf.d/PhraseaFixture/ValidationSession/LoadOneValidationSession.php index 2d7966afe6..0dcfcab42d 100644 --- a/lib/conf.d/PhraseaFixture/ValidationSession/LoadOneValidationSession.php +++ b/lib/conf.d/PhraseaFixture/ValidationSession/LoadOneValidationSession.php @@ -11,7 +11,6 @@ namespace PhraseaFixture\ValidationSession; -use Doctrine\ORM\EntityManager; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\Persistence\ObjectManager;