Add curly braces

This commit is contained in:
Romain Neutron
2012-04-26 01:55:12 +02:00
parent ade22295ad
commit 33b10d6746
86 changed files with 2969 additions and 2698 deletions

View File

@@ -130,8 +130,9 @@ class Feed_Adapter extends Feed_Abstract implements Feed_Interface, cache_cachea
*/
public function get_icon_url()
{
if ($this->icon_url)
if ($this->icon_url) {
return $this->icon_url;
}
$url = '/skins/icons/rss32.gif';

View File

@@ -83,8 +83,9 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface
{
$result = new Feed_Entry_Collection();
if (count($this->feeds) === 0)
if (count($this->feeds) === 0) {
return $result;
}
$offset_start = (int) $offset_start;
$how_many = $how_many > 20 ? 20 : (int) $how_many;
@@ -117,8 +118,10 @@ class Feed_Aggregate extends Feed_Abstract implements Feed_Interface
*/
public function get_count_total_entries()
{
if (count($this->feeds) === 0)
if (count($this->feeds) === 0) {
return 0;
}
$sql = 'SELECT count(id) as number
FROM feed_entries
WHERE feed_id

View File

@@ -406,8 +406,9 @@ class Feed_Entry_Adapter implements Feed_Entry_Interface, cache_cacheableInterfa
*/
public function get_content()
{
if ($this->items)
if ($this->items) {
return $this->items;
}
$rs = $this->retrieve_elements();
$items = array();

View File

@@ -210,7 +210,9 @@ class Feed_Publisher_Adapter implements Feed_Publisher_Interface, cache_cacheabl
{
foreach ($feed->get_publishers() as $publisher) {
if ($publisher->get_user()->get_id() === $user->get_id())
{
return $publisher;
}
}
throw new Exception_Feed_PublisherNotFound('Publisher not found');
}

View File

@@ -227,11 +227,13 @@ abstract class Feed_XML_Abstract
$medium = strtolower($content->get_record()->get_type());
if ( ! in_array($medium, array('image', 'audio', 'video')))
if ( ! in_array($medium, array('image', 'audio', 'video'))) {
return $this;
}
if ( ! $preview_permalink || ! $thumbnail_permalink)
if ( ! $preview_permalink || ! $thumbnail_permalink) {
return $this;
}
$group = $this->addTag($document, $item, 'media:group');

View File

@@ -357,11 +357,13 @@ class Feed_XML_Cooliris extends Feed_XML_Abstract implements Feed_XML_Interface
$medium = strtolower($content->get_record()->get_type());
if ( ! in_array($medium, array('image', 'audio', 'video')))
if ( ! in_array($medium, array('image', 'audio', 'video'))) {
return $this;
}
if ( ! $preview_permalink || ! $thumbnail_permalink)
if ( ! $preview_permalink || ! $thumbnail_permalink) {
return $this;
}
//add item node to channel node
$item = $this->addTag($document, $node, 'item');