Skip to content

Commit

Permalink
fix(src): removal utf8_encode method from request results
Browse files Browse the repository at this point in the history
  • Loading branch information
dorianneto committed Jul 15, 2017
1 parent 1d6f0e2 commit 016fafd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podcastcrawler/podcastcrawler",
"version": "1.1.0",
"version": "1.1.1",
"type": "library",
"description": "PHP library to find podcasts",
"keywords": ["framework", "rest", "api", "itunes", "digitalpodcast", "provider", "mp3", "podcast", "library"],
Expand Down
8 changes: 4 additions & 4 deletions src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ abstract class AbstractProvider
public function buildFeed(SimpleXMLElement $feed)
{
$output = [
'title' => (string) utf8_decode($feed->channel->title),
'description' => (string) utf8_decode($feed->channel->description),
'title' => (string) $feed->channel->title,
'description' => (string) $feed->channel->description,
'image' => (string) $feed->channel->image->url,
'site' => (string) $feed->channel->link,
'language' => (string) $feed->channel->language,
Expand All @@ -47,9 +47,9 @@ public function buildFeed(SimpleXMLElement $feed)
$published_at = $published_at->format('Y-m-d');

$output['episodes'][] = [
'title' => (string) utf8_decode($value->title),
'title' => (string) $value->title,
'mp3' => isset($value->enclosure) ? (string) $value->enclosure->attributes()->url : null,
'description' => (string) utf8_decode($value->description),
'description' => (string) $value->description,
'link' => (string) $value->link,
'published_at' => $published_at,
];
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/DigitalPodcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function build(array $response)

foreach($xml->item as $value) {
$output['podcasts'][] = [
'title' => utf8_decode($value->title),
'title' => $value->title,
'rss' => (string) $value->source,
'link' => (string) $value->link,
];
Expand Down
4 changes: 2 additions & 2 deletions src/Provider/Itunes.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public function build(array $response)
foreach($response->results as $value) {
$output['podcasts'][] = [
'itunes_id' => $value->collectionId,
'author' => utf8_decode($value->artistName),
'title' => utf8_decode($value->collectionName),
'author' => $value->artistName,
'title' => $value->collectionName,
'episodes' => $value->trackCount,
'image' => $value->artworkUrl100,
'rss' => $value->feedUrl,
Expand Down

0 comments on commit 016fafd

Please sign in to comment.