diff --git a/lib/classes/API/OAuth2/Account.php b/lib/classes/API/OAuth2/Account.php
index 11adf87cba..66fe695f8a 100644
--- a/lib/classes/API/OAuth2/Account.php
+++ b/lib/classes/API/OAuth2/Account.php
@@ -176,7 +176,7 @@ class API_OAuth2_Account
*/
public function get_token()
{
- if ( ! $this->token) {
+ if (! $this->token) {
try {
$this->token = new API_OAuth2_Token($this->app['phraseanet.appbox'], $this);
} catch (Exception_NotFound $e) {
@@ -262,7 +262,7 @@ class API_OAuth2_Account
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
- if ( ! $row) {
+ if (! $row) {
throw new Exception_NotFound();
}
diff --git a/lib/classes/API/OAuth2/Adapter.php b/lib/classes/API/OAuth2/Adapter.php
index 5926bb471d..a31aa35edb 100644
--- a/lib/classes/API/OAuth2/Adapter.php
+++ b/lib/classes/API/OAuth2/Adapter.php
@@ -85,7 +85,7 @@ class API_OAuth2_Adapter extends OAuth2
/**
*
- * @param Application $app
+ * @param Application $app
* @return API_OAuth2_Adapter
*/
public function __construct(Application $app)
@@ -418,7 +418,7 @@ class API_OAuth2_Adapter extends OAuth2
* check for valid client_id
* check for valid redirect_uri
*/
- if ( ! $input["client_id"]) {
+ if (! $input["client_id"]) {
if ($input["redirect_uri"])
$this->errorDoRedirectUriCallback(
$input["redirect_uri"], OAUTH2_ERROR_INVALID_CLIENT, NULL, NULL, $input["state"]
@@ -472,7 +472,7 @@ class API_OAuth2_Adapter extends OAuth2
/**
* Check response_type
*/
- if ( ! $input["response_type"]) {
+ if (! $input["response_type"]) {
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_INVALID_REQUEST, 'Invalid response type.', NULL, $input["state"]);
}
diff --git a/lib/classes/API/OAuth2/Application.php b/lib/classes/API/OAuth2/Application.php
index 97adc70150..f1dab4c24c 100644
--- a/lib/classes/API/OAuth2/Application.php
+++ b/lib/classes/API/OAuth2/Application.php
@@ -128,7 +128,7 @@ class API_OAuth2_Application
/**
*
- * @param Application $app
+ * @param Application $app
* @param int $application_id
* @return API_OAuth2_Application
*/
@@ -596,7 +596,7 @@ class API_OAuth2_Application
/**
*
- * @param Application $app
+ * @param Application $app
* @param User_Adapter $user
* @param type $name
* @return API_OAuth2_Application
@@ -644,7 +644,7 @@ class API_OAuth2_Application
/**
*
- * @param Application $app
+ * @param Application $app
* @param type $client_id
* @return API_OAuth2_Application
*/
diff --git a/lib/classes/API/OAuth2/AuthCode.php b/lib/classes/API/OAuth2/AuthCode.php
index 49c16a32e6..1f2ece6450 100644
--- a/lib/classes/API/OAuth2/AuthCode.php
+++ b/lib/classes/API/OAuth2/AuthCode.php
@@ -135,7 +135,7 @@ class API_OAuth2_AuthCode
/**
*
- * @param Application $app
+ * @param Application $app
* @param API_OAuth2_Account $account
* @return array
*/
@@ -162,7 +162,7 @@ class API_OAuth2_AuthCode
/**
*
- * @param Application $app
+ * @param Application $app
* @param API_OAuth2_Account $account
* @param type $code
* @param int $expires
diff --git a/lib/classes/API/OAuth2/RefreshToken.php b/lib/classes/API/OAuth2/RefreshToken.php
index ee713c40ec..c1b66d4c6e 100644
--- a/lib/classes/API/OAuth2/RefreshToken.php
+++ b/lib/classes/API/OAuth2/RefreshToken.php
@@ -61,7 +61,7 @@ class API_OAuth2_RefreshToken
*/
public function get_account()
{
- if ( ! $this->account) {
+ if (! $this->account) {
$this->account = new API_OAuth2_Account($this->app, $this->account_id);
}
@@ -96,7 +96,7 @@ class API_OAuth2_RefreshToken
/**
*
- * @param Application $app
+ * @param Application $app
* @param API_OAuth2_Account $account
* @return array
*/
@@ -121,7 +121,7 @@ class API_OAuth2_RefreshToken
/**
*
- * @param Application $app
+ * @param Application $app
* @param API_OAuth2_Account $account
* @param int $expires
* @param type $refresh_token
diff --git a/lib/classes/API/V1/Log.php b/lib/classes/API/V1/Log.php
index ae02d05351..dd452b4d22 100644
--- a/lib/classes/API/V1/Log.php
+++ b/lib/classes/API/V1/Log.php
@@ -83,7 +83,7 @@ class API_V1_Log
/**
*
- * @param Application $app
+ * @param Application $app
* @param Request $request
* @param API_OAuth2_Account $account
*/
diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php
index ae22d99df3..9a73cd29c1 100644
--- a/lib/classes/API/V1/adapter.php
+++ b/lib/classes/API/V1/adapter.php
@@ -43,7 +43,7 @@ class API_V1_adapter extends API_V1_Abstract
/**
* API constructor
*
- * @param Application $app The application context
+ * @param Application $app The application context
* @return API_V1_adapter
*/
public function __construct(Application $app)
@@ -94,7 +94,7 @@ class API_V1_adapter extends API_V1_Abstract
/**
* Return an array of key-values informations about scheduler
*
- * @param Application $app The silex application
+ * @param Application $app The silex application
* @return \API_V1_result
*/
public function get_scheduler(Application $app)
@@ -825,7 +825,7 @@ class API_V1_adapter extends API_V1_Abstract
/**
* Search for results
*
- * @param Request $request
+ * @param Request $request
* @return \API_V1_result
*/
public function search(Request $request)
@@ -885,7 +885,7 @@ class API_V1_adapter extends API_V1_Abstract
$options = SearchEngineOptions::fromRequest($this->app, $request);
$offsetStart = (int) ($request->get('offset_start') ? : 0);
- $perPage = (int) $request->get('per_page') ? : 10;
+ $perPage = (int) $request->get('per_page') ? : 10;
$query = (string) $request->request->get('query');
diff --git a/lib/classes/Bridge/Account.php b/lib/classes/Bridge/Account.php
index 457000a94f..a4036f5989 100644
--- a/lib/classes/Bridge/Account.php
+++ b/lib/classes/Bridge/Account.php
@@ -313,7 +313,7 @@ class Bridge_Account
/**
*
- * @param Application $app
+ * @param Application $app
* @param user_adapter $user
* @return Bridge_Account
*/
diff --git a/lib/classes/Bridge/Api.php b/lib/classes/Bridge/Api.php
index a26d6b635c..a546b691be 100644
--- a/lib/classes/Bridge/Api.php
+++ b/lib/classes/Bridge/Api.php
@@ -59,7 +59,7 @@ class Bridge_Api
/**
*
* @param Application $app
- * @param int $id
+ * @param int $id
* @return Bridge_Api
*/
public function __construct(Application $app, $id)
diff --git a/lib/classes/Bridge/Api/Auth/Flickr.php b/lib/classes/Bridge/Api/Auth/Flickr.php
index 66ff56873a..1e579fb38e 100644
--- a/lib/classes/Bridge/Api/Auth/Flickr.php
+++ b/lib/classes/Bridge/Api/Auth/Flickr.php
@@ -47,7 +47,7 @@ class Bridge_Api_Auth_Flickr extends Bridge_Api_Auth_Abstract implements Bridge_
*/
protected function get_api()
{
- if ( ! $this->_api) {
+ if (! $this->_api) {
$this->_api = new Phlickr_Api(
$this->flickr_client_id,
$this->flickr_client_secret
diff --git a/lib/classes/Bridge/Api/Dailymotion.php b/lib/classes/Bridge/Api/Dailymotion.php
index 75fef31bda..0e6cccca4c 100644
--- a/lib/classes/Bridge/Api/Dailymotion.php
+++ b/lib/classes/Bridge/Api/Dailymotion.php
@@ -305,7 +305,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
),
'page' => ! $offset_start ? 1 : $offset_start);
//add quantity
- if ( ! ! $quantity) {
+ if (! ! $quantity) {
$params["limit"] = $quantity;
}
$url = sprintf('/me/%ss', $object);
diff --git a/lib/classes/Bridge/Api/Flickr/Container.php b/lib/classes/Bridge/Api/Flickr/Container.php
index 29b5259ae2..f679b3561f 100644
--- a/lib/classes/Bridge/Api/Flickr/Container.php
+++ b/lib/classes/Bridge/Api/Flickr/Container.php
@@ -75,7 +75,6 @@ class Bridge_Api_Flickr_Container implements Bridge_Api_ContainerInterface
*/
public function get_thumbnail($width = 120, $height = 90)
{
-
return $this->thumbnail;
}
diff --git a/lib/classes/Bridge/Element.php b/lib/classes/Bridge/Element.php
index 2b2e1c8394..dc629427c3 100644
--- a/lib/classes/Bridge/Element.php
+++ b/lib/classes/Bridge/Element.php
@@ -298,7 +298,7 @@ class Bridge_Element
*/
public function build_connector_element()
{
- if ( ! $this->connector_element) {
+ if (! $this->connector_element) {
try {
$this->connector_element = $this->account->get_api()->get_element_from_id($this->dist_id, $this->type);
} catch (Exception $e) {
diff --git a/lib/classes/DailymotionWithoutOauth2.php b/lib/classes/DailymotionWithoutOauth2.php
index 423b9cc73e..efd6102f28 100644
--- a/lib/classes/DailymotionWithoutOauth2.php
+++ b/lib/classes/DailymotionWithoutOauth2.php
@@ -84,4 +84,3 @@ class DailymotionWithoutOauth2 extends Dailymotion
return $result['url'];
}
}
-
diff --git a/lib/classes/Feed/Collection.php b/lib/classes/Feed/Collection.php
index 2f4c49e698..10a16b6c46 100644
--- a/lib/classes/Feed/Collection.php
+++ b/lib/classes/Feed/Collection.php
@@ -49,7 +49,7 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf
/**
*
- * @param Application $app
+ * @param Application $app
* @param User_Adapter $user
* @return Feed_Collection
*/
@@ -102,7 +102,7 @@ class Feed_Collection implements Feed_CollectionInterface, cache_cacheableInterf
/**
*
- * @param Application $app
+ * @param Application $app
* @return Feed_Collection
*/
public static function load_public_feeds(Application $app)
diff --git a/lib/classes/Feed/Publisher/Adapter.php b/lib/classes/Feed/Publisher/Adapter.php
index be93b58d3b..0e7a34104e 100644
--- a/lib/classes/Feed/Publisher/Adapter.php
+++ b/lib/classes/Feed/Publisher/Adapter.php
@@ -177,7 +177,7 @@ class Feed_Publisher_Adapter implements Feed_Publisher_Interface, cache_cacheabl
/**
*
- * @param Application $app
+ * @param Application $app
* @param User_Adapter $user
* @param Feed_Adapter $feed
* @param boolean $owner
diff --git a/lib/classes/Feed/TokenAggregate.php b/lib/classes/Feed/TokenAggregate.php
index a3fcd37383..d3d5c951a8 100644
--- a/lib/classes/Feed/TokenAggregate.php
+++ b/lib/classes/Feed/TokenAggregate.php
@@ -56,10 +56,10 @@ class Feed_TokenAggregate extends Feed_Token
*/
public function get_feed()
{
- if ( ! $this->feed) {
+ if (! $this->feed) {
$this->feed = Feed_Aggregate::load_with_user($this->app, $this->get_user());
}
-
+
return $this->feed;
}
}
diff --git a/lib/classes/Feed/XML/Abstract.php b/lib/classes/Feed/XML/Abstract.php
index 6f2a88ab39..6535fed717 100644
--- a/lib/classes/Feed/XML/Abstract.php
+++ b/lib/classes/Feed/XML/Abstract.php
@@ -231,7 +231,7 @@ abstract class Feed_XML_Abstract
return $this;
}
- if ( ! $preview_permalink || ! $thumbnail_permalink) {
+ if (! $preview_permalink || ! $thumbnail_permalink) {
return $this;
}
diff --git a/lib/classes/Feed/XML/Cooliris.php b/lib/classes/Feed/XML/Cooliris.php
index a46860a93e..8b170f6392 100644
--- a/lib/classes/Feed/XML/Cooliris.php
+++ b/lib/classes/Feed/XML/Cooliris.php
@@ -360,7 +360,7 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface
return $this;
}
- if ( ! $preview_permalink || ! $thumbnail_permalink) {
+ if (! $preview_permalink || ! $thumbnail_permalink) {
return $this;
}
diff --git a/lib/classes/Session/Authentication/Guest.php b/lib/classes/Session/Authentication/Guest.php
index bbc509c414..b737add775 100644
--- a/lib/classes/Session/Authentication/Guest.php
+++ b/lib/classes/Session/Authentication/Guest.php
@@ -38,7 +38,7 @@ class Session_Authentication_Guest implements Session_Authentication_Interface
/**
*
- * @param Application $app
+ * @param Application $app
* @return Session_Authentication_Guest
*/
public function __construct(Application $app)
diff --git a/lib/classes/Session/Authentication/Native.php b/lib/classes/Session/Authentication/Native.php
index dcb34f191f..d703694658 100644
--- a/lib/classes/Session/Authentication/Native.php
+++ b/lib/classes/Session/Authentication/Native.php
@@ -52,7 +52,7 @@ class Session_Authentication_Native implements Session_Authentication_Interface
/**
*
- * @param Application $app
+ * @param Application $app
* @param string $login
* @param string $password
* @return Session_Authentication_Native
diff --git a/lib/classes/Session/Authentication/PersistentCookie.php b/lib/classes/Session/Authentication/PersistentCookie.php
index 45f62ed97e..0111851e9f 100644
--- a/lib/classes/Session/Authentication/PersistentCookie.php
+++ b/lib/classes/Session/Authentication/PersistentCookie.php
@@ -42,7 +42,6 @@ class Session_Authentication_PersistentCookie implements Session_Authentication_
$this->app= $app;
$this->persistent_cookie = $persistent_cookie;
-
$dql = 'SELECT s FROM Entities\Session s
WHERE s.token = :token';
@@ -50,7 +49,7 @@ class Session_Authentication_PersistentCookie implements Session_Authentication_
$query->setParameters(array('token' => $persistent_cookie));
$session = $query->getOneOrNullResult();
- if ( ! $session) {
+ if (! $session) {
throw new \Exception_Session_WrongToken('Persistent cookie value does not have any valid session');
}
diff --git a/lib/classes/Session/Authentication/Token.php b/lib/classes/Session/Authentication/Token.php
index edd21f0321..6812969867 100644
--- a/lib/classes/Session/Authentication/Token.php
+++ b/lib/classes/Session/Authentication/Token.php
@@ -63,7 +63,6 @@ class Session_Authentication_Token implements Session_Authentication_Interface
*/
public function signOn()
{
-
return $this->user;
}
@@ -73,7 +72,6 @@ class Session_Authentication_Token implements Session_Authentication_Interface
*/
public function get_user()
{
-
return $this->user;
}
diff --git a/lib/classes/Session/Logger.php b/lib/classes/Session/Logger.php
index 1a932712df..408c1b94d4 100644
--- a/lib/classes/Session/Logger.php
+++ b/lib/classes/Session/Logger.php
@@ -92,9 +92,9 @@ class Session_Logger
/**
*
- * @param databox $databox
- * @param User_Adapter $user
- * @param Browser $browser
+ * @param databox $databox
+ * @param User_Adapter $user
+ * @param Browser $browser
* @return Session_Logger
*/
public static function create(Application $app, databox $databox, Browser $browser)
diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php
index c47dcaf2be..75256b02d0 100644
--- a/lib/classes/User/Adapter.php
+++ b/lib/classes/User/Adapter.php
@@ -1243,7 +1243,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
public function get_applied_template()
{
-
return $this->applied_template;
}
@@ -1474,7 +1473,6 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
$app['EM']->flush();
}
-
$usr_id = $app['phraseanet.user']->get_id();
$user = User_Adapter::getInstance($usr_id, $app);
diff --git a/lib/classes/User/Query.php b/lib/classes/User/Query.php
index 2e54982834..cd25fead68 100644
--- a/lib/classes/User/Query.php
+++ b/lib/classes/User/Query.php
@@ -217,18 +217,18 @@ class User_Query implements User_QueryInterface
LEFT JOIN sbasusr ON (usr.usr_id = sbasusr.usr_id)
WHERE 1 ';
- if ( ! $this->include_special_users) {
+ if (! $this->include_special_users) {
$sql .= ' AND usr_login != "autoregister"
AND usr_login != "invite" ';
}
$sql .= ' AND usr_login NOT LIKE "(#deleted_%" ';
- if ( ! $this->include_invite) {
+ if (! $this->include_invite) {
$sql .= ' AND usr.invite=0 ';
}
- if ( ! $this->email_not_null) {
+ if (! $this->email_not_null) {
$sql .= ' AND usr.usr_mail IS NOT NULL ';
}
@@ -714,7 +714,7 @@ class User_Query implements User_QueryInterface
*/
public function on_base_ids(Array $base_ids = null)
{
- if ( ! $base_ids) {
+ if (! $base_ids) {
return $this;
}
@@ -739,7 +739,7 @@ class User_Query implements User_QueryInterface
*/
public function on_sbas_ids(Array $sbas_ids = null)
{
- if ( ! $sbas_ids) {
+ if (! $sbas_ids) {
return $this;
}
diff --git a/lib/classes/appbox.php b/lib/classes/appbox.php
index f21e1d2329..ad7d35360b 100644
--- a/lib/classes/appbox.php
+++ b/lib/classes/appbox.php
@@ -94,7 +94,7 @@ class appbox extends base
$media = $this->app['mediavorus']->guess($filename);
- if($media->getWidth() > 120 || $media->getHeight() > 24) {
+ if ($media->getWidth() > 120 || $media->getHeight() > 24) {
$imageSpec->setResizeMode(ImageSpecification::RESIZE_MODE_INBOUND_FIXEDRATIO);
$imageSpec->setDimensions(120, 24);
}
@@ -110,7 +110,7 @@ class appbox extends base
} catch (\MediaAlchemyst\Exception $e) {
}
- } else if ($pic_type === collection::PIC_PRESENTATION) {
+ } elseif ($pic_type === collection::PIC_PRESENTATION) {
//resize collection logo
$imageSpec = new ImageSpecification();
$imageSpec->setResizeMode(ImageSpecification::RESIZE_MODE_INBOUND_FIXEDRATIO);
diff --git a/lib/classes/cache/databox.php b/lib/classes/cache/databox.php
index fe06b1087b..9e6f41fc18 100644
--- a/lib/classes/cache/databox.php
+++ b/lib/classes/cache/databox.php
@@ -153,7 +153,6 @@ class cache_databox
$connbas = \connection::getPDOConnection($app, $sbas_id);
-
$sql = 'SELECT distinct site_id as site_id
FROM clients
WHERE site_id != :site_id';
@@ -181,7 +180,6 @@ class cache_databox
{
$connbas = $databox->get_connection();
-
$sql = 'SELECT site_id FROM clients WHERE site_id = :site_id';
$stmt = $connbas->prepare($sql);
$stmt->execute(array(':site_id' => $app['phraseanet.registry']->get('GV_ServerName')));
diff --git a/lib/classes/caption/Field/Value.php b/lib/classes/caption/Field/Value.php
index 2248a5d534..611294d855 100644
--- a/lib/classes/caption/Field/Value.php
+++ b/lib/classes/caption/Field/Value.php
@@ -293,7 +293,7 @@ class caption_Field_Value implements cache_cacheableInterface
/* @var $value \caption_Field_Value */
$caption_field_value->set_value($value);
- if ( ! $vocabulary || ! $vocabularyId) {
+ if (! $vocabulary || ! $vocabularyId) {
$caption_field_value->removeVocabulary();
} else {
$caption_field_value->setVocab($vocabulary, $vocabularyId);
@@ -348,7 +348,7 @@ class caption_Field_Value implements cache_cacheableInterface
$tbranch = $this->databox_field->get_tbranch();
- if ( ! $tbranch || ! $XPATH_thesaurus) {
+ if (! $tbranch || ! $XPATH_thesaurus) {
return $value;
}
@@ -402,7 +402,7 @@ class caption_Field_Value implements cache_cacheableInterface
}
}
}
- if ( ! $lngfound) {
+ if (! $lngfound) {
list($term, $context) = $this->splitTermAndContext($fvalue);
$term = str_replace(array("", ""), array("", ""), $term);
$context = str_replace(array("", ""), array("", ""), $context);
diff --git a/lib/classes/collection.php b/lib/classes/collection.php
index ac03f23413..eaaaf3e241 100644
--- a/lib/classes/collection.php
+++ b/lib/classes/collection.php
@@ -369,7 +369,7 @@ class collection implements cache_cacheableInterface
{
$coll_id = phrasea::collFromBas($app, $base_id);
$sbas_id = phrasea::sbasFromBas($app, $base_id);
- if ( ! $sbas_id || ! $coll_id) {
+ if (! $sbas_id || ! $coll_id) {
throw new Exception_Databox_CollectionNotFound(sprintf("Collection could not be found"));
}
$databox = $app['phraseanet.appbox']->get_databox($sbas_id);
diff --git a/lib/classes/databox.php b/lib/classes/databox.php
index 10524472ba..fb78eee2b8 100644
--- a/lib/classes/databox.php
+++ b/lib/classes/databox.php
@@ -570,7 +570,7 @@ class databox extends base
*/
public function get_subdef_structure()
{
- if ( ! $this->subdef_struct) {
+ if (! $this->subdef_struct) {
$this->subdef_struct = new databox_subdefsStructure($this);
}
@@ -579,7 +579,7 @@ class databox extends base
public static function dispatch(Filesystem $filesystem, $repository_path, $date = false)
{
- if ( ! $date) {
+ if (! $date) {
$date = date('Y-m-d H:i:s');
}
diff --git a/lib/classes/databox/cgu.php b/lib/classes/databox/cgu.php
index 73152fedd3..921b62ad96 100644
--- a/lib/classes/databox/cgu.php
+++ b/lib/classes/databox/cgu.php
@@ -63,7 +63,7 @@ class databox_cgu
$value = $cgus[$app['locale']]['value'];
$userValidation = true;
- if ( ! $home) {
+ if (! $home) {
if ( ! $app['phraseanet.user']->ACL()->has_access_to_sbas($databox->get_sbas_id())) {
continue;
}
diff --git a/lib/classes/databox/field.php b/lib/classes/databox/field.php
index 2d2400d978..6db5d72d05 100644
--- a/lib/classes/databox/field.php
+++ b/lib/classes/databox/field.php
@@ -581,7 +581,7 @@ class databox_field implements cache_cacheableInterface
{
$this->Business = ! ! $boolean;
- if($this->Business) {
+ if ($this->Business) {
$this->thumbtitle = '0';
}
@@ -657,7 +657,7 @@ class databox_field implements cache_cacheableInterface
*/
protected static function checkMultiSeparator($separator, $multi)
{
- if ( ! $multi) {
+ if (! $multi) {
return '';
}
@@ -677,7 +677,7 @@ class databox_field implements cache_cacheableInterface
{
$this->thumbtitle = $value;
- if($this->thumbtitle != '0') {
+ if ($this->thumbtitle != '0') {
$this->Business = false;
}
diff --git a/lib/classes/databox/status.php b/lib/classes/databox/status.php
index 3614b616d6..6d72f70e10 100644
--- a/lib/classes/databox/status.php
+++ b/lib/classes/databox/status.php
@@ -190,7 +190,7 @@ class databox_status
$set = true;
}
}
- if ( ! $set) {
+ if (! $set) {
$stats[$bit][] = array(
'sbas' => array($sbas_id),
'labeloff' => $props['labeloff'],
@@ -202,7 +202,7 @@ class databox_status
}
}
- if ( ! $set) {
+ if (! $set) {
$stats[$bit] = array(
array(
'sbas' => array($sbas_id),
@@ -360,7 +360,7 @@ class databox_status
$switch = in_array($switch, array('on', 'off')) ? $switch : false;
- if ( ! $switch) {
+ if (! $switch) {
return false;
}
@@ -380,7 +380,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/subdefsStructure.php b/lib/classes/databox/subdefsStructure.php
index 16c2a8e5af..aef47d261e 100644
--- a/lib/classes/databox/subdefsStructure.php
+++ b/lib/classes/databox/subdefsStructure.php
@@ -34,7 +34,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
public function count()
{
$n = 0;
- foreach($this->AvSubdefs as $subdefs) {
+ foreach ($this->AvSubdefs as $subdefs) {
$n += count($subdefs);
}
@@ -84,7 +84,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
'flash' => array()
);
- if ( ! $sx_struct) {
+ if (! $sx_struct) {
return $this;
}
@@ -160,7 +160,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
. 'subdef[@name="' . $name . '"]'
);
- for($i = 0; $i < $nodes->length; $i++) {
+ for ($i = 0; $i < $nodes->length; $i++) {
$node = $nodes->item($i);
$parent = $node->parentNode;
$parent->removeChild($node);
@@ -273,7 +273,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
$refNode = null;
if ($nodes->length > 0) {
- for ($i = 0; $i < $nodes->length; $i ++ ) {
+ for ($i = 0; $i < $nodes->length; $i ++) {
$refNode = $nodes->item($i)->nextSibling;
$dom_group->removeChild($nodes->item($i));
}
diff --git a/lib/classes/deprecated/inscript.api.php b/lib/classes/deprecated/inscript.api.php
index 74967d7649..59f131b769 100644
--- a/lib/classes/deprecated/inscript.api.php
+++ b/lib/classes/deprecated/inscript.api.php
@@ -157,7 +157,7 @@ function giveMeBases(Application $app, $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/notify/autoregister.php b/lib/classes/eventsmanager/notify/autoregister.php
index e92f771e30..9f604878d7 100644
--- a/lib/classes/eventsmanager/notify/autoregister.php
+++ b/lib/classes/eventsmanager/notify/autoregister.php
@@ -202,7 +202,7 @@ class eventsmanager_notify_autoregister extends eventsmanager_notifyAbstract
$receiver = Receiver::fromUser($to);
$readyToSend = true;
} catch (Exception $e) {
-
+
}
if ($readyToSend) {
diff --git a/lib/classes/eventsmanager/notify/feed.php b/lib/classes/eventsmanager/notify/feed.php
index 0f01a5222d..f4cd50f3ea 100644
--- a/lib/classes/eventsmanager/notify/feed.php
+++ b/lib/classes/eventsmanager/notify/feed.php
@@ -86,7 +86,7 @@ class eventsmanager_notify_feed extends eventsmanager_notifyAbstract
do {
$results = $Query->limit($start, $perLoop)->execute()->get_results();
-
+
foreach ($results as $user_to_notif) {
/* @var $user_to_notif \User_Adapter */
$mailed = false;
diff --git a/lib/classes/ftpclient.php b/lib/classes/ftpclient.php
index 96c34a2794..26464e03a1 100644
--- a/lib/classes/ftpclient.php
+++ b/lib/classes/ftpclient.php
@@ -73,7 +73,7 @@ class ftpclient
$done = true;
}
}
- if ( ! $done) {
+ if (! $done) {
throw new Exception('Impossible de s\'authentifier sur le serveur FTP');
}
@@ -312,7 +312,7 @@ class ftpclient
{
if ($this->debug)
echo "Fermeture de la connexion\n
";
- if ( ! $this->connexion) {
+ if (! $this->connexion) {
return $this;
}
@@ -384,7 +384,7 @@ class ftpclient
$file = $this->add_end_slash($current_dir) . $info[8];
$date = strtotime($info[6] . ' ' . $info[5] . ' ' . $info[7]);
- if ( ! $date) {
+ if (! $date) {
$date = strtotime($info[6] . ' ' . $info[5] . ' ' . date('Y') . ' ' . $info[7]);
}
@@ -396,4 +396,3 @@ class ftpclient
return $list;
}
}
-
diff --git a/lib/classes/gatekeeper.php b/lib/classes/gatekeeper.php
index 1bf0056fec..5b0c778ff8 100644
--- a/lib/classes/gatekeeper.php
+++ b/lib/classes/gatekeeper.php
@@ -161,7 +161,6 @@ class gatekeeper
return $this;
}
-
/**
* Checks if session is open
* Redirect if session is missing
diff --git a/lib/classes/http/request.php b/lib/classes/http/request.php
index d959cd770c..c022dacdca 100644
--- a/lib/classes/http/request.php
+++ b/lib/classes/http/request.php
@@ -162,7 +162,7 @@ class http_request
}
}
} else {
- for ($i = 0; $i < $nargs; $i ++ ) {
+ for ($i = 0; $i < $nargs; $i ++) {
$nom = func_get_arg($i);
$parm[$nom] = isset($_GET[$nom]) ?
$_GET[$nom] : (isset($_POST[$nom]) ? $_POST[$nom] : NULL);
diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php
index 70be884fb0..77d4b62b80 100644
--- a/lib/classes/media/subdef.php
+++ b/lib/classes/media/subdef.php
@@ -223,7 +223,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
throw new Exception_Media_SubdefNotFound($this->name . ' not found');
}
- if ( ! $row) {
+ if (! $row) {
$this->find_substitute_file();
}
@@ -529,14 +529,12 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
}
try {
-
return $this->record
->get_databox()
->get_subdef_structure()
->get_subdef($this->record->get_type(), $this->get_name())
->getDevices();
} catch (\Exception_Databox_SubdefNotFound $e) {
-
return array();
}
}
@@ -685,7 +683,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
- if ( ! $row) {
+ if (! $row) {
throw new \Exception_Media_SubdefNotFound('Require the real one');
}
@@ -719,6 +717,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
}
unset($media);
+
return $subdef;
}
@@ -777,4 +776,3 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
return $databox->delete_data_from_cache($this->get_cache_key($option));
}
}
-
diff --git a/lib/classes/module/console/fileEnsureDevSetting.php b/lib/classes/module/console/fileEnsureDevSetting.php
index 7b7197fb5e..67f954f061 100644
--- a/lib/classes/module/console/fileEnsureDevSetting.php
+++ b/lib/classes/module/console/fileEnsureDevSetting.php
@@ -14,7 +14,6 @@ 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 Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Service\Builder;
/**
diff --git a/lib/classes/module/console/fileEnsureProductionSetting.php b/lib/classes/module/console/fileEnsureProductionSetting.php
index f1c334b77f..aa8fb9e4fd 100644
--- a/lib/classes/module/console/fileEnsureProductionSetting.php
+++ b/lib/classes/module/console/fileEnsureProductionSetting.php
@@ -14,7 +14,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Alchemy\Phrasea\Command\Command;
-use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Service\Builder;
/**
diff --git a/lib/classes/module/console/schedulerStop.php b/lib/classes/module/console/schedulerStop.php
index 1f0ce93cd5..10b6350c3f 100644
--- a/lib/classes/module/console/schedulerStop.php
+++ b/lib/classes/module/console/schedulerStop.php
@@ -39,7 +39,6 @@ class module_console_schedulerStop extends Command
return 0;
} catch (\Exception $e) {
-
return 1;
}
diff --git a/lib/classes/module/console/systemExport.php b/lib/classes/module/console/systemExport.php
index dd84ac3fb6..853f1667d7 100644
--- a/lib/classes/module/console/systemExport.php
+++ b/lib/classes/module/console/systemExport.php
@@ -98,7 +98,7 @@ class module_console_systemExport extends Command
$export_directory = realpath(substr($directory, 0, 1) === '/' ? $directory : getcwd() . '/' . $directory . '/');
- if ( ! $export_directory) {
+ if (! $export_directory) {
throw new Exception('Export directory does not exists or is not accessible');
}
@@ -147,7 +147,7 @@ class module_console_systemExport extends Command
}
}
- if ( ! $go) {
+ if (! $go) {
$output->writeln(sprintf("Collections not selected, bypassing ..."));
continue;
}
diff --git a/lib/classes/module/console/systemMailCheck.php b/lib/classes/module/console/systemMailCheck.php
index 6033d2cc85..e67f882588 100644
--- a/lib/classes/module/console/systemMailCheck.php
+++ b/lib/classes/module/console/systemMailCheck.php
@@ -62,7 +62,7 @@ class module_console_systemMailCheck extends Command
{
$is_stopped = false;
- while ( ! $is_stopped) {
+ while (! $is_stopped) {
$this->write_infos($email, $users, $output, $appbox);
$dialog = $this->getHelperSet()->get('dialog');
diff --git a/lib/classes/module/console/taskState.php b/lib/classes/module/console/taskState.php
index 2c6531eee5..17b808da38 100644
--- a/lib/classes/module/console/taskState.php
+++ b/lib/classes/module/console/taskState.php
@@ -114,4 +114,3 @@ class module_console_taskState extends Command
return $exitCode;
}
}
-
diff --git a/lib/classes/module/console/taskrun.php b/lib/classes/module/console/taskrun.php
index 1ad3a4203b..a761707c60 100644
--- a/lib/classes/module/console/taskrun.php
+++ b/lib/classes/module/console/taskrun.php
@@ -95,7 +95,6 @@ class module_console_taskrun extends Command
}
}
-
if ($input->getOption('verbose')) {
$this->container['monolog']->pushHandler(new StreamHandler('php://stdout'));
}
diff --git a/lib/classes/module/report/activity.php b/lib/classes/module/report/activity.php
index 09104a8d78..cf85712e1c 100644
--- a/lib/classes/module/report/activity.php
+++ b/lib/classes/module/report/activity.php
@@ -77,7 +77,7 @@ class module_report_activity extends module_report
{
$hours = array();
- for ($i = 0; $i < 24; $i ++ ) {
+ for ($i = 0; $i < 24; $i ++) {
array_push($this->display, $i);
$hours[$i] = 0;
}
@@ -362,7 +362,6 @@ class module_report_activity extends module_report
{
$this->title = _('report:: telechargements par jour');
-
$s = new module_report_sql($this->app, $this);
$filter = $s->getFilters();
$conn = $s->getConnBas();
diff --git a/lib/classes/module/report/connexion.php b/lib/classes/module/report/connexion.php
index 818911f519..9193c8e74b 100644
--- a/lib/classes/module/report/connexion.php
+++ b/lib/classes/module/report/connexion.php
@@ -174,4 +174,3 @@ class module_report_connexion extends module_report
return (int) $row['nb'];
}
}
-
diff --git a/lib/classes/module/report/dashboard.php b/lib/classes/module/report/dashboard.php
index 23af875b25..d8ecd4ef9a 100644
--- a/lib/classes/module/report/dashboard.php
+++ b/lib/classes/module/report/dashboard.php
@@ -180,7 +180,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
*/
protected function getPlotLegendDay($dmin, $dmax = false)
{
- if ( ! $dmax) {
+ if (! $dmax) {
$date = new Datetime();
$dmax = $date->format('d-m-Y');
} else {
diff --git a/lib/classes/module/report/dashboard/feed.php b/lib/classes/module/report/dashboard/feed.php
index 2af1c27635..485d43216b 100644
--- a/lib/classes/module/report/dashboard/feed.php
+++ b/lib/classes/module/report/dashboard/feed.php
@@ -237,4 +237,3 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
}
}
}
-
diff --git a/lib/classes/module/report/dashboard/group.php b/lib/classes/module/report/dashboard/group.php
index abe0ba58b6..e4af08f937 100644
--- a/lib/classes/module/report/dashboard/group.php
+++ b/lib/classes/module/report/dashboard/group.php
@@ -94,4 +94,3 @@ class module_report_dashboard_group implements module_report_dashboard_component
return new module_report_dashboard_merge($this);
}
}
-
diff --git a/lib/classes/module/report/dashboard/merge.php b/lib/classes/module/report/dashboard/merge.php
index 2914cbc7cf..8cec65ab61 100644
--- a/lib/classes/module/report/dashboard/merge.php
+++ b/lib/classes/module/report/dashboard/merge.php
@@ -205,4 +205,3 @@ class module_report_dashboard_merge implements module_report_dashboard_component
return new module_report_dashboard_sort($this);
}
}
-
diff --git a/lib/classes/module/report/dashboard/sort.php b/lib/classes/module/report/dashboard/sort.php
index 73bf8e9169..4c3163efa7 100644
--- a/lib/classes/module/report/dashboard/sort.php
+++ b/lib/classes/module/report/dashboard/sort.php
@@ -158,4 +158,3 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
return $tmp;
}
}
-
diff --git a/lib/classes/module/report/download.php b/lib/classes/module/report/download.php
index d4945c4a39..a6f9e08643 100644
--- a/lib/classes/module/report/download.php
+++ b/lib/classes/module/report/download.php
@@ -272,4 +272,3 @@ class module_report_download extends module_report
return $array;
}
}
-
diff --git a/lib/classes/module/report/edit.php b/lib/classes/module/report/edit.php
index 8c0d906437..a242a417d9 100644
--- a/lib/classes/module/report/edit.php
+++ b/lib/classes/module/report/edit.php
@@ -127,4 +127,3 @@ class module_report_edit extends module_report
}
}
}
-
diff --git a/lib/classes/module/report/push.php b/lib/classes/module/report/push.php
index 8da85bd5a0..0c96d7096d 100644
--- a/lib/classes/module/report/push.php
+++ b/lib/classes/module/report/push.php
@@ -130,4 +130,3 @@ class module_report_push extends module_report
}
}
}
-
diff --git a/lib/classes/module/report/question.php b/lib/classes/module/report/question.php
index 2be5bef0da..4438b1cc26 100644
--- a/lib/classes/module/report/question.php
+++ b/lib/classes/module/report/question.php
@@ -109,4 +109,3 @@ class module_report_question extends module_report
}
}
}
-
diff --git a/lib/classes/module/report/sqlReportInterface.php b/lib/classes/module/report/sqlReportInterface.php
index cdbc6a01e8..e3c68921df 100644
--- a/lib/classes/module/report/sqlReportInterface.php
+++ b/lib/classes/module/report/sqlReportInterface.php
@@ -15,7 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
-interface module_report_sqlReportinterface
+interface module_report_sqlReportInterface
{
public function buildSql();
diff --git a/lib/classes/module/report/sqlfilter.php b/lib/classes/module/report/sqlfilter.php
index 7a489745c6..c95265acea 100644
--- a/lib/classes/module/report/sqlfilter.php
+++ b/lib/classes/module/report/sqlfilter.php
@@ -258,4 +258,3 @@ class module_report_sqlfilter
return;
}
}
-
diff --git a/lib/classes/module/report/sqlquestion.php b/lib/classes/module/report/sqlquestion.php
index 7b49cf8ff7..6b44c70ecc 100644
--- a/lib/classes/module/report/sqlquestion.php
+++ b/lib/classes/module/report/sqlquestion.php
@@ -103,4 +103,3 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
return array('sql' => $sql, 'params' => $params);
}
}
-
diff --git a/lib/classes/module/report/validate.php b/lib/classes/module/report/validate.php
index 89608cbfd7..7aaa4a83db 100644
--- a/lib/classes/module/report/validate.php
+++ b/lib/classes/module/report/validate.php
@@ -130,4 +130,3 @@ class module_report_validate extends module_report
}
}
}
-
diff --git a/lib/classes/patch/320.php b/lib/classes/patch/320.php
index 95f0b2c9ce..725ef71ca5 100644
--- a/lib/classes/patch/320.php
+++ b/lib/classes/patch/320.php
@@ -65,4 +65,3 @@ class patch_320 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/320f.php b/lib/classes/patch/320f.php
index 515f010fcd..8982f295e6 100644
--- a/lib/classes/patch/320f.php
+++ b/lib/classes/patch/320f.php
@@ -82,7 +82,7 @@ class patch_320f implements patchInterface
$feed = $this->get_feed($appbox, $user, $row['pub_restrict'], $row['homelink']);
- if ( ! $feed instanceof Feed_Adapter) {
+ if (! $feed instanceof Feed_Adapter) {
continue;
}
diff --git a/lib/classes/patch/361.php b/lib/classes/patch/361.php
index 1da57741ed..16257dc120 100644
--- a/lib/classes/patch/361.php
+++ b/lib/classes/patch/361.php
@@ -128,4 +128,3 @@ class patch_361 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/370.php b/lib/classes/patch/370.php
index 24b1233ea7..a11cba3b35 100644
--- a/lib/classes/patch/370.php
+++ b/lib/classes/patch/370.php
@@ -63,7 +63,7 @@ class patch_370 implements patchInterface
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
- if ( ! $result) {
+ if (! $result) {
throw new \RuntimeException('Unable to find structure');
}
@@ -90,4 +90,3 @@ class patch_370 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/370a3.php b/lib/classes/patch/370a3.php
index ce7092c8ea..1c3ffca39f 100644
--- a/lib/classes/patch/370a3.php
+++ b/lib/classes/patch/370a3.php
@@ -70,4 +70,3 @@ class patch_370a3 implements patchInterface
}
}
}
-
diff --git a/lib/classes/patch/370a4.php b/lib/classes/patch/370a4.php
index a574771d77..477e6abf44 100644
--- a/lib/classes/patch/370a4.php
+++ b/lib/classes/patch/370a4.php
@@ -89,4 +89,3 @@ class patch_370a4 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/370a5.php b/lib/classes/patch/370a5.php
index 9d0e8ccd45..056f4aa34f 100644
--- a/lib/classes/patch/370a5.php
+++ b/lib/classes/patch/370a5.php
@@ -83,4 +83,3 @@ class patch_370a5 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/370a6.php b/lib/classes/patch/370a6.php
index 6e6c846df5..1d1e3dbc4a 100644
--- a/lib/classes/patch/370a6.php
+++ b/lib/classes/patch/370a6.php
@@ -196,4 +196,3 @@ class patch_370a6 implements patchInterface
$root->set_subdef($groupname, $baseSubdef->get_name() . '_OGG', $baseSubdef->get_class(), false, $newSubdefOptionsOgg);
}
}
-
diff --git a/lib/classes/patch/370a7.php b/lib/classes/patch/370a7.php
index 04d13080d6..9b6b10fd25 100644
--- a/lib/classes/patch/370a7.php
+++ b/lib/classes/patch/370a7.php
@@ -70,6 +70,7 @@ class patch_370a7 implements patchInterface
if ($e->getCode() == '42S02') {
}
+
return;
}
@@ -148,7 +149,6 @@ class patch_370a7 implements patchInterface
$app['EM']->close();
}
-
$stmt->closeCursor();
return;
@@ -160,4 +160,3 @@ class patch_370a7 implements patchInterface
$query->execute();
}
}
-
diff --git a/lib/classes/patch/370a8.php b/lib/classes/patch/370a8.php
index 38031318e6..5e2ee949ac 100644
--- a/lib/classes/patch/370a8.php
+++ b/lib/classes/patch/370a8.php
@@ -262,4 +262,3 @@ class patch_370a8 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/370a9.php b/lib/classes/patch/370a9.php
index 9a86b83a86..7661c0f168 100644
--- a/lib/classes/patch/370a9.php
+++ b/lib/classes/patch/370a9.php
@@ -142,4 +142,3 @@ class patch_370a9 implements patchInterface
$app['phraseanet.configuration']->setConfigurations($configs);
}
}
-
diff --git a/lib/classes/patch/371.php b/lib/classes/patch/371.php
index 9c389ea15e..626d5a6a36 100644
--- a/lib/classes/patch/371.php
+++ b/lib/classes/patch/371.php
@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
-use Alchemy\Phrasea\Border\Checker;
/**
*
@@ -59,9 +58,8 @@ class patch_371 implements patchInterface
*/
public function apply(base $databox, Application $app)
{
- foreach($databox->get_meta_structure() as $databox_field) {
+ foreach ($databox->get_meta_structure() as $databox_field) {
$databox_field->save();
}
}
}
-
diff --git a/lib/classes/patch/373.php b/lib/classes/patch/373.php
index fac79d09ce..99fca5e189 100644
--- a/lib/classes/patch/373.php
+++ b/lib/classes/patch/373.php
@@ -131,4 +131,3 @@ class patch_373 implements patchInterface
return true;
}
}
-
diff --git a/lib/classes/patch/380.php b/lib/classes/patch/380.php
index 1e4dc0c27b..8f0b0f6b43 100644
--- a/lib/classes/patch/380.php
+++ b/lib/classes/patch/380.php
@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
-use Alchemy\Phrasea\Border\Checker;
/**
*
@@ -68,4 +67,3 @@ class patch_380 implements patchInterface
$app['phraseanet.configuration']->setConnexions($connexions);
}
}
-
diff --git a/lib/classes/patch/3802.php b/lib/classes/patch/3802.php
index 5e3d91e237..cae9c51b12 100644
--- a/lib/classes/patch/3802.php
+++ b/lib/classes/patch/3802.php
@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
-use Alchemy\Phrasea\Border\Checker;
/**
*
@@ -73,4 +72,3 @@ class patch_3802 implements patchInterface
return;
}
}
-
diff --git a/lib/classes/patch/3803.php b/lib/classes/patch/3803.php
index 2bbefbff57..3d732686c0 100644
--- a/lib/classes/patch/3803.php
+++ b/lib/classes/patch/3803.php
@@ -116,4 +116,3 @@ class patch_3803 implements patchInterface
}
}
-
diff --git a/lib/classes/patch/3804.php b/lib/classes/patch/3804.php
index 820f2c034b..12e30b8a3c 100644
--- a/lib/classes/patch/3804.php
+++ b/lib/classes/patch/3804.php
@@ -81,4 +81,3 @@ class patch_3804 implements patchInterface
return false;
}
}
-
diff --git a/lib/classes/phraseadate.php b/lib/classes/phraseadate.php
index dda74af39f..eeee52ae97 100644
--- a/lib/classes/phraseadate.php
+++ b/lib/classes/phraseadate.php
@@ -211,7 +211,7 @@ class phraseadate
$patfound = false;
foreach ($paterns as $pat => $idx) {
if (substr($format, 0, ($l = strlen($pat))) == $pat) {
- for ($i = 0; $i < $l; $i ++ ) {
+ for ($i = 0; $i < $l; $i ++) {
$bal_out = "";
if (isset($tc[$idx + $i])) {
foreach ($tc[$idx + $i]["bals"] as $b) {
@@ -226,7 +226,7 @@ class phraseadate
break;
}
}
- if ( ! $patfound) {
+ if (! $patfound) {
$strdate .= $format[0];
$format = substr($format, 1);
}
diff --git a/lib/classes/queries.php b/lib/classes/queries.php
index dc12c5d23a..733b5ca85a 100644
--- a/lib/classes/queries.php
+++ b/lib/classes/queries.php
@@ -28,7 +28,7 @@ class queries
if (file_exists(__DIR__ . '/../../config/topics/topics_' . $I18N . '.xml'))
$xmlTopics = __DIR__ . '/../../config/topics/topics_' . $I18N . '.xml';
- if ( ! $xmlTopics) {
+ if (! $xmlTopics) {
if (file_exists(__DIR__ . '/../../config/topics/topics.xml')) {
$xmlTopics = __DIR__ . '/../../config/topics/topics.xml';
}
@@ -171,7 +171,7 @@ class queries
' . _('client::recherche: dans les categories') . '
';
- for ($i = 0; $i <= $maxdepth; $i ++ ) {
+ for ($i = 0; $i <= $maxdepth; $i ++) {
$out .= '
diff --git a/lib/classes/random.php b/lib/classes/random.php
index ccf3db1597..f148c98cfa 100644
--- a/lib/classes/random.php
+++ b/lib/classes/random.php
@@ -226,9 +226,9 @@ class random
/**
* Get the validation token for one user and one validation basket
*
- * @param integer $userId
- * @param integer $basketId
- * @return string The desired token
+ * @param integer $userId
+ * @param integer $basketId
+ * @return string The desired token
* @throws \Exception_NotFound
*/
public static function getValidationToken(Application $app, $userId, $basketId)
@@ -250,7 +250,7 @@ class random
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
- if ( ! $row) {
+ if (! $row) {
throw new \Exception_NotFound('Token not found');
}
diff --git a/lib/classes/record/Interface.php b/lib/classes/record/Interface.php
index 615617849e..56f31f76f1 100644
--- a/lib/classes/record/Interface.php
+++ b/lib/classes/record/Interface.php
@@ -13,10 +13,7 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
use Doctrine\ORM\EntityManager;
use MediaVorus\Media\MediaInterface;
-use Monolog\Logger;
-use MediaAlchemyst\Alchemyst;
use MediaVorus\MediaVorus;
-use Symfony\Component\Filesystem\Filesystem;
/**
*
diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php
index af5e6e28cb..b3d68a103f 100644
--- a/lib/classes/record/adapter.php
+++ b/lib/classes/record/adapter.php
@@ -1296,7 +1296,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
/**
*
- * @param File $file
+ * @param File $file
* @return \record_adapter
*/
public static function createFromFile(File $file, Application $app)
diff --git a/lib/classes/record/exportElement.php b/lib/classes/record/exportElement.php
index 009196ea41..c904dfb1cc 100644
--- a/lib/classes/record/exportElement.php
+++ b/lib/classes/record/exportElement.php
@@ -172,7 +172,7 @@ class record_exportElement extends record_adapter
$downloadable_settings = $subdef->is_downloadable();
- if ( ! $downloadable_settings || $go_dl[$class] === false) {
+ if (! $downloadable_settings || $go_dl[$class] === false) {
continue;
}
@@ -233,7 +233,7 @@ class record_exportElement extends record_adapter
*/
private function add_count($name, $size)
{
- if ( ! $this->size) {
+ if (! $this->size) {
$objectsize = array();
} else
$objectsize = $this->size;
diff --git a/lib/classes/record/preview.php b/lib/classes/record/preview.php
index 27fe49e252..5686d10535 100644
--- a/lib/classes/record/preview.php
+++ b/lib/classes/record/preview.php
@@ -95,7 +95,7 @@ class record_preview extends record_adapter
switch ($env) {
case "RESULT":
- if(null === $search_engine) {
+ if (null === $search_engine) {
throw new \LogicException('Search Engine should be provided');
}
@@ -329,7 +329,7 @@ class record_preview extends record_adapter
AND d.record_id = :record_id ';
$params = array(':record_id' => $this->get_record_id());
- if ( ! $report) {
+ if (! $report) {
$sql .= ' AND ((l.usrid = :usr_id AND l.site= :site) OR action="add")';
$params[':usr_id'] = $this->app['phraseanet.user']->get_id();
$params[':site'] = $this->app['phraseanet.registry']->get('GV_sit');
@@ -376,7 +376,7 @@ class record_preview extends record_adapter
}
if ( ! in_array($row['final'], $tab[$hour][$site][$action][$row['usr_id']]['final'])) {
- if($action == 'collection') {
+ if ($action == 'collection') {
$tab[$hour][$site][$action][$row['usr_id']]['final'][] = phrasea::baseFromColl($this->get_sbas_id(), $row['final'], $this->app);
} else {
$tab[$hour][$site][$action][$row['usr_id']]['final'][] = $row['final'];
diff --git a/lib/classes/recordutils.php b/lib/classes/recordutils.php
index 6bc44a1cde..95a370131c 100644
--- a/lib/classes/recordutils.php
+++ b/lib/classes/recordutils.php
@@ -41,7 +41,6 @@ class recordutils
public function binary_datas($type, $bas, $rec, $usr = false, $ses = false)
{
-
return false;
}
}
diff --git a/lib/classes/recordutils/image.php b/lib/classes/recordutils/image.php
index 7747296c61..0f8793b6cb 100644
--- a/lib/classes/recordutils/image.php
+++ b/lib/classes/recordutils/image.php
@@ -109,7 +109,7 @@ class recordutils_image extends recordutils
}
$vars = $xpprefs->query('/baseprefs/stamp/*/var');
- for ($i = 0; $i < $vars->length; $i ++ ) {
+ for ($i = 0; $i < $vars->length; $i ++) {
$varval = '';
$n = $vars->item($i);
switch (strtoupper($n->getAttribute('name'))) {
@@ -131,7 +131,7 @@ class recordutils_image extends recordutils
}
$fields = $xpprefs->query('/baseprefs/stamp/*/field');
- for ($i = 0; $i < $fields->length; $i ++ ) {
+ for ($i = 0; $i < $fields->length; $i ++) {
$fldval = '';
$n = $fields->item($i);
$fieldname = $n->getAttribute('name');
@@ -211,7 +211,7 @@ class recordutils_image extends recordutils
$txtblock = array();
$texts = $xpprefs->query('/baseprefs/stamp/text');
$fontsize = "100%";
- for ($i = 0; $i < $texts->length; $i ++ ) {
+ for ($i = 0; $i < $texts->length; $i ++) {
if (($tmpfontsize = trim($texts->item($i)->getAttribute('size'))) != '') {
if (substr($tmpfontsize, -1) == '%')
$tmpfontsize = (int) ($tmpfontsize * $image_width / 4000);
@@ -308,7 +308,7 @@ class recordutils_image extends recordutils
/**
*
- * @param \media_subdef $subdef
+ * @param \media_subdef $subdef
* @return boolean|string
*/
public static function watermark(Application $app, \media_subdef $subdef)
diff --git a/lib/classes/set/export.php b/lib/classes/set/export.php
index 74eddfcc57..0a8506a513 100644
--- a/lib/classes/set/export.php
+++ b/lib/classes/set/export.php
@@ -754,11 +754,11 @@ class set_export extends set_abstract
/**
*
- * @param Application $app
- * @param string $file
- * @param string $exportname
- * @param string $mime
- * @param string $disposition
+ * @param Application $app
+ * @param string $file
+ * @param string $exportname
+ * @param string $mime
+ * @param string $disposition
* @return Response
*/
public static function stream_file(Application $app, $file, $exportname, $mime, $disposition = 'inline')
@@ -828,7 +828,7 @@ class set_export extends set_abstract
public static function stream_data($data, $exportname, $mime, $disposition = 'attachment')
{
$unicode = new \unicode();
-
+
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
diff --git a/lib/classes/set/order.php b/lib/classes/set/order.php
index 7e4f2b6e10..22107d55c3 100644
--- a/lib/classes/set/order.php
+++ b/lib/classes/set/order.php
@@ -72,10 +72,10 @@ class set_order extends set_abstract
/**
* Create a new order entry
*
- * @param RecordsRequest $recordsRequest
- * @param integer $orderer
- * @param string $usage
- * @param \DateTime $deadline
+ * @param RecordsRequest $recordsRequest
+ * @param integer $orderer
+ * @param string $usage
+ * @param \DateTime $deadline
* @return boolean
*/
public static function create(Application $app, RecordsRequest $records, \User_Adapter $orderer, $usage, \DateTime $deadline = null)
@@ -130,11 +130,11 @@ class set_order extends set_abstract
/**
* List orders
*
- * @param appbox $appbox
- * @param array $baseIds
- * @param integer $offsetStart
- * @param integer $perPage
- * @return array
+ * @param appbox $appbox
+ * @param array $baseIds
+ * @param integer $offsetStart
+ * @param integer $perPage
+ * @return array
*/
public static function listOrders(Application $app, array $baseIds, $offsetStart = 0, $perPage = 10, $sort = null)
{
@@ -177,9 +177,9 @@ class set_order extends set_abstract
/**
* Get total orders for selected base ids
*
- * @param appbox $appbox
- * @param array $baseIds
- * @return integer
+ * @param appbox $appbox
+ * @param array $baseIds
+ * @return integer
*/
public static function countTotalOrder(appbox $appbox, array $baseIds = array())
{
@@ -367,7 +367,7 @@ class set_order extends set_abstract
}
}
- if ( ! $Basket) {
+ if (! $Basket) {
$Basket = new \Entities\Basket();
$Basket->setName(sprintf(_('Commande du %s'), $this->created_on->format('Y-m-d')));
$Basket->setOwner($this->user);
@@ -391,7 +391,7 @@ class set_order extends set_abstract
WHERE order_id = :order_id
AND id = :order_element_id';
- if ( ! $force) {
+ if (! $force) {
$sql .= ' AND ISNULL(order_master_id)';
}
@@ -471,7 +471,7 @@ class set_order extends set_abstract
$stmt->closeCursor();
$n ++;
}
-
+
if ($n > 0) {
$params = array(
'from' => $this->app['phraseanet.user']->get_id(),
diff --git a/lib/classes/set/selection.php b/lib/classes/set/selection.php
index 97ff480067..f3b46d00f5 100644
--- a/lib/classes/set/selection.php
+++ b/lib/classes/set/selection.php
@@ -59,7 +59,7 @@ class set_selection extends set_abstract
$base_id = $record->get_base_id();
$sbas_id = $record->get_sbas_id();
$record_id = $record->get_record_id();
- if ( ! $rights) {
+ if (! $rights) {
if ($this->app['phraseanet.user']->ACL()->has_hd_grant($record)) {
continue;
}
@@ -157,4 +157,3 @@ class set_selection extends set_abstract
return $ret;
}
}
-
diff --git a/lib/classes/system/url.php b/lib/classes/system/url.php
index 84923f8e01..c67aeaee6a 100644
--- a/lib/classes/system/url.php
+++ b/lib/classes/system/url.php
@@ -29,4 +29,3 @@ class system_url
return $this->url;
}
}
-
diff --git a/lib/classes/task/Scheduler.php b/lib/classes/task/Scheduler.php
index 5c56a1ddda..707c4c9b64 100644
--- a/lib/classes/task/Scheduler.php
+++ b/lib/classes/task/Scheduler.php
@@ -85,7 +85,7 @@ class task_Scheduler
$lockdir = $this->dependencyContainer['phraseanet.registry']->get('GV_RootPath') . 'tmp/locks/';
- for ($try = 1; true; $try ++ ) {
+ for ($try = 1; true; $try ++) {
$lockfile = ($lockdir . 'scheduler.lock');
if (($schedlock = fopen($lockfile, 'a+')) != FALSE) {
if (flock($schedlock, LOCK_EX | LOCK_NB) === FALSE) {
@@ -156,10 +156,10 @@ class task_Scheduler
}
unset($conn);
- if ( ! $connwaslost) {
+ if (! $connwaslost) {
$this->log(sprintf("Warning : abox connection lost, restarting in 10 min."));
}
- for ($i = 0; $i < 60 * 10; $i ++ ) {
+ for ($i = 0; $i < 60 * 10; $i ++) {
sleep(1);
}
try {
@@ -328,7 +328,7 @@ class task_Scheduler
$taskPoll[$tkey]["killat"] = NULL;
if ($this->method == self::METHOD_PROC_OPEN) {
- if ( ! $taskPoll[$tkey]["process"]) {
+ if (! $taskPoll[$tkey]["process"]) {
$nullfile = defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null';
@@ -429,7 +429,7 @@ class task_Scheduler
$crashed = true;
}
- if ( ! $crashed) {
+ if (! $crashed) {
$taskPoll[$tkey]["killat"] = NULL;
$runningtask ++;
} else {
@@ -469,7 +469,7 @@ class task_Scheduler
// send ctrl-c to tell the task to CLEAN quit
// (just in case the task doesn't pool his status 'tostop' fast enough)
if (function_exists('posix_kill')) {
- if ( ! $taskPoll[$tkey]['sigterm_sent']) {
+ if (! $taskPoll[$tkey]['sigterm_sent']) {
posix_kill($pid, SIGTERM);
$this->log(
sprintf(
@@ -551,7 +551,7 @@ class task_Scheduler
}
}
- for ($i = 0; $i < $sleeptime; $i ++ ) {
+ for ($i = 0; $i < $sleeptime; $i ++) {
sleep(1);
}
}
diff --git a/lib/classes/task/abstract.php b/lib/classes/task/abstract.php
index a8a14802a9..3d2625e3ba 100644
--- a/lib/classes/task/abstract.php
+++ b/lib/classes/task/abstract.php
@@ -1,6 +1,5 @@
execute(array(':taskid' => $this->getID()));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
- if ( ! $row) {
+ if (! $row) {
throw new Exception('Unknown task id');
}
$this->title = $row['name'];
@@ -183,14 +182,14 @@ abstract class task_abstract
{
static $stmt = NULL;
$conn = connection::getPDOConnection($this->dependencyContainer);
- if ( ! $stmt) {
+ if (! $stmt) {
$sql = 'SELECT status FROM task2 WHERE task_id = :taskid';
$stmt = $conn->prepare($sql);
}
$stmt->execute(array(':taskid' => $this->taskid));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
- if ( ! $row) {
+ if (! $row) {
throw new Exception('Unknown task id');
}
unset($conn);
@@ -303,8 +302,7 @@ abstract class task_abstract
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
- if(!@$dom->loadXML($settings))
- {
+ if (!@$dom->loadXML($settings)) {
throw new Exception_InvalidArgument('Bad XML');
}
@@ -539,7 +537,7 @@ abstract class task_abstract
if ($this->running) { // && $this->records_done == 0)
$when_started = time() - $when_started;
if ($when_started < $this->period) {
- for ($t = $this->period - $when_started; $this->running && $t > 0; $t -- ) { // DON'T do sleep($this->period - $when_started) because it prevents ticks !
+ for ($t = $this->period - $when_started; $this->running && $t > 0; $t --) { // DON'T do sleep($this->period - $when_started) because it prevents ticks !
$s = $this->getState();
if ($s == self::STATE_TOSTOP) {
$this->setState(self::STATE_STOPPED);
@@ -717,7 +715,7 @@ abstract class task_abstract
$this->running = FALSE;
}
- if ( ! $this->running) {
+ if (! $this->running) {
break;
}
}
@@ -851,7 +849,7 @@ abstract class task_abstract
$domdoc = new DOMDocument();
if ($settings && ! $domdoc->loadXML($settings)) {
throw new Exception('settings invalide');
- } elseif ( ! $settings) {
+ } elseif (! $settings) {
$settings = "\n