diff --git a/lib/classes/ACL.class.php b/lib/classes/ACL.class.php index ba2bd03ff8..1add39cc48 100644 --- a/lib/classes/ACL.class.php +++ b/lib/classes/ACL.class.php @@ -189,8 +189,9 @@ class ACL implements cache_cacheableInterface $key = $record->get_serialize_key(); - if (array_key_exists($key, $this->_rights_records_preview)) + if (array_key_exists($key, $this->_rights_records_preview)) { return true; + } return false; } diff --git a/lib/classes/API/OAuth2/Adapter.class.php b/lib/classes/API/OAuth2/Adapter.class.php index ece19af220..9993fe00ac 100644 --- a/lib/classes/API/OAuth2/Adapter.class.php +++ b/lib/classes/API/OAuth2/Adapter.class.php @@ -610,8 +610,8 @@ class API_OAuth2_Adapter extends OAuth2 { $token_param = $this->getAccessTokenParams(); - - if ($token_param === FALSE) { // Access token was not provided + // Access token was not provided + if ($token_param === false) { return $exit_not_present ? $this->errorWWWAuthenticateResponseHeader(OAUTH2_HTTP_BAD_REQUEST, $realm, OAUTH2_ERROR_INVALID_REQUEST, 'The request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, uses more than one method for including an access token, or is otherwise malformed.', NULL, $scope) : FALSE; } diff --git a/lib/classes/Bridge/Api/Dailymotion.class.php b/lib/classes/Bridge/Api/Dailymotion.class.php index 1d5b8ab5f3..0c737d8e43 100644 --- a/lib/classes/Bridge/Api/Dailymotion.class.php +++ b/lib/classes/Bridge/Api/Dailymotion.class.php @@ -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: diff --git a/lib/classes/Bridge/Api/Flickr.class.php b/lib/classes/Bridge/Api/Flickr.class.php index 0a1753c3bd..a62c9b4305 100644 --- a/lib/classes/Bridge/Api/Flickr.class.php +++ b/lib/classes/Bridge/Api/Flickr.class.php @@ -353,7 +353,8 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf $response = $this->_api->executeMethod('flickr.photosets.addPhoto', $params); if ( ! $response->isOk()) { - if ($response->err_code === 3) { //Already exists in photoset + //Already exists in photoset + if ($response->err_code === 3) { return; } diff --git a/lib/classes/Bridge/Api/Youtube.class.php b/lib/classes/Bridge/Api/Youtube.class.php index b2d86303a6..4d36c2e813 100644 --- a/lib/classes/Bridge/Api/Youtube.class.php +++ b/lib/classes/Bridge/Api/Youtube.class.php @@ -871,8 +871,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter protected function get_PlaylistEntry_from_Id($element_id) { foreach ($this->_api->getPlaylistListFeed('default') as $playlist_entry) { - if ($element_id == $playlist_entry->getPlaylistId()->getText()) + if ($element_id == $playlist_entry->getPlaylistId()->getText()) { return $playlist_entry; + } } return null; @@ -891,8 +892,9 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter ); if ( ! is_null($this->locale)) { $youtube_format_locale = str_replace('_', '-', $this->locale); - if (in_array(trim($youtube_format_locale), $youtube_available_locale)) + if (in_array(trim($youtube_format_locale), $youtube_available_locale)) { return $this->locale; + } } return "en-US"; diff --git a/lib/classes/Feed/Adapter.class.php b/lib/classes/Feed/Adapter.class.php index f4161523de..905f55ba1d 100644 --- a/lib/classes/Feed/Adapter.class.php +++ b/lib/classes/Feed/Adapter.class.php @@ -243,8 +243,10 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea */ public function has_access(User_Adapter $user) { - if ($this->get_collection() instanceof collection) + if ($this->get_collection() instanceof collection) { return $user->ACL()->has_access_to_base($this->collection->get_base_id()); + } + return true; } @@ -286,8 +288,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea */ public function add_publisher(User_Adapter $user) { - if (in_array($user->get_id(), array_keys($this->get_publishers()))) + if (in_array($user->get_id(), array_keys($this->get_publishers()))) { return $this; + } Feed_Publisher_Adapter::create($this->appbox, $user, $this, false); $this->publishers = null; @@ -301,8 +304,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea */ protected function load_publishers() { - if (is_array($this->publishers)) + if (is_array($this->publishers)) { return $this->publishers; + } $sql = 'SELECT id, usr_id, owner FROM feed_publishers WHERE feed_id = :feed_id'; @@ -581,8 +585,10 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea */ public function get_homepage_link(registryInterface $registry, $format, $page = null) { - if ( ! $this->is_public()) + if ( ! $this->is_public()) { return null; + } + switch ($format) { case self::FORMAT_ATOM: return new Feed_Link( diff --git a/lib/classes/Session/Handler.class.php b/lib/classes/Session/Handler.class.php index 914220ef35..144f5b6e00 100644 --- a/lib/classes/Session/Handler.class.php +++ b/lib/classes/Session/Handler.class.php @@ -228,8 +228,10 @@ class Session_Handler public function get_session_prefs($key) { $datas = $this->storage()->get('temp_prefs'); - if (isset($datas[$key])) + if (isset($datas[$key])) { return $datas[$key]; + } + return null; } @@ -248,6 +250,7 @@ class Session_Handler } elseif ($default_value !== null) { return $default_value; } + return null; } diff --git a/lib/classes/setup.class.php b/lib/classes/setup.class.php index bddec87e62..9988e4e5fa 100644 --- a/lib/classes/setup.class.php +++ b/lib/classes/setup.class.php @@ -486,6 +486,7 @@ class setup