Skip to content

Commit 2d2bff9

Browse files
committed
Corrected indentation
1 parent 03f09be commit 2d2bff9

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

Source/Suin/RSSWriter/Feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function addChannel(ChannelInterface $channel)
2828
*/
2929
public function render()
3030
{
31-
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" />', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL);
31+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" />', LIBXML_NOERROR | LIBXML_ERR_NONE | LIBXML_ERR_FATAL);
3232

3333
foreach ( $this->channels as $channel )
3434
{

Source/Suin/RSSWriter/Item.php

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ class Item implements \Suin\RSSWriter\ItemInterface
2020
protected $isPermalink;
2121
/** @var int */
2222
protected $pubDate;
23-
/** @var array */
24-
protected $enclosure;
25-
/** @var string */
26-
protected $author;
23+
/** @var array */
24+
protected $enclosure;
25+
/** @var string */
26+
protected $author;
2727

2828
/**
2929
* Set item title
@@ -95,10 +95,10 @@ public function pubDate($pubDate)
9595
}
9696

9797
/**
98-
* Set enclosure
98+
* Set enclosure
9999
* @param var $url Url to media file
100-
* @param int $length Length in bytes of the media file
101-
* @param var $type Media type, default is audio/mpeg
100+
* @param int $length Length in bytes of the media file
101+
* @param var $type Media type, default is audio/mpeg
102102
* @return $this
103103
*/
104104
public function enclosure($url, $length = 0, $type = 'audio/mpeg')
@@ -118,7 +118,7 @@ public function author($author)
118118
return $this;
119119
}
120120

121-
/**
121+
/**
122122
* Append item to the channel
123123
* @param \Suin\RSSWriter\ChannelInterface $channel
124124
* @return $this
@@ -135,7 +135,7 @@ public function appendTo(ChannelInterface $channel)
135135
*/
136136
public function asXML()
137137
{
138-
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><item></item>', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL);
138+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><item></item>', LIBXML_NOERROR | LIBXML_ERR_NONE | LIBXML_ERR_FATAL);
139139
$xml->addChild('title', $this->title);
140140
$xml->addChild('link', $this->url);
141141
$xml->addChild('description', $this->description);
@@ -165,17 +165,16 @@ public function asXML()
165165
$xml->addChild('pubDate', date(DATE_RSS, $this->pubDate));
166166
}
167167

168-
169-
if (is_array($this->enclosure) && (count($this->enclosure) == 3))
168+
if (is_array($this->enclosure) && (count($this->enclosure) == 3))
170169
{
171170
$element = $xml->addChild('enclosure');
172-
$element->addAttribute('url', $this->enclosure['url']);
173-
$element->addAttribute('type', $this->enclosure['type']);
174-
175-
if ($this->enclosure['length'])
176-
{
177-
$element->addAttribute('length', $this->enclosure['length']);
178-
}
171+
$element->addAttribute('url', $this->enclosure['url']);
172+
$element->addAttribute('type', $this->enclosure['type']);
173+
174+
if ($this->enclosure['length'])
175+
{
176+
$element->addAttribute('length', $this->enclosure['length']);
177+
}
179178
}
180179

181180
if ( ! empty($this->author) )

0 commit comments

Comments
 (0)