From 76a0276682de799fe3c5fee52f6f7ea6082a1125 Mon Sep 17 00:00:00 2001 From: Nicolas Eeckeloo Date: Mon, 29 Apr 2013 09:38:13 +0200 Subject: [PATCH] Fix coding standards PSR-2 --- src/Reader/Extension/Atom/Feed.php | 2 +- src/Reader/Feed/Atom.php | 2 +- src/Reader/Feed/Rss.php | 2 +- src/Writer/Extension/ITunes/Entry.php | 2 +- src/Writer/Extension/ITunes/Feed.php | 6 +++--- src/Writer/Extension/ITunes/Renderer/Feed.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Reader/Extension/Atom/Feed.php b/src/Reader/Extension/Atom/Feed.php index 4f91b6f3..9429f573 100644 --- a/src/Reader/Extension/Atom/Feed.php +++ b/src/Reader/Extension/Atom/Feed.php @@ -276,7 +276,7 @@ public function getImage() if (!$imageUrl) { $image = null; } else { - $image = array('uri'=>$imageUrl); + $image = array('uri' => $imageUrl); } $this->data['image'] = $image; diff --git a/src/Reader/Feed/Atom.php b/src/Reader/Feed/Atom.php index fd95cd61..cc394385 100644 --- a/src/Reader/Feed/Atom.php +++ b/src/Reader/Feed/Atom.php @@ -386,7 +386,7 @@ protected function indexEntries() $entries = array(); $entries = $this->xpath->evaluate('//atom:entry'); - foreach ($entries as $index=>$entry) { + foreach ($entries as $index => $entry) { $this->entries[$index] = $entry; } } diff --git a/src/Reader/Feed/Rss.php b/src/Reader/Feed/Rss.php index 8b89262e..61ce229b 100644 --- a/src/Reader/Feed/Rss.php +++ b/src/Reader/Feed/Rss.php @@ -683,7 +683,7 @@ protected function indexEntries() $entries = $this->xpath->evaluate('//rss:item'); } - foreach ($entries as $index=>$entry) { + foreach ($entries as $index => $entry) { $this->entries[$index] = $entry; } } diff --git a/src/Writer/Extension/ITunes/Entry.php b/src/Writer/Extension/ITunes/Entry.php index f5b3982c..f136293e 100644 --- a/src/Writer/Extension/ITunes/Entry.php +++ b/src/Writer/Extension/ITunes/Entry.php @@ -152,7 +152,7 @@ public function setItunesDuration($value) */ public function setItunesExplicit($value) { - if (!in_array($value, array('yes','no','clean'))) { + if (!in_array($value, array('yes', 'no', 'clean'))) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "explicit" may only' . ' be one of "yes", "no" or "clean"'); } diff --git a/src/Writer/Extension/ITunes/Feed.php b/src/Writer/Extension/ITunes/Feed.php index 7444d3a4..7737ce46 100644 --- a/src/Writer/Extension/ITunes/Feed.php +++ b/src/Writer/Extension/ITunes/Feed.php @@ -137,7 +137,7 @@ public function setItunesCategories(array $values) if (!isset($this->data['categories'])) { $this->data['categories'] = array(); } - foreach ($values as $key=>$value) { + foreach ($values as $key => $value) { if (!is_array($value)) { if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only' @@ -175,7 +175,7 @@ public function setItunesImage($value) throw new Writer\Exception\InvalidArgumentException('invalid parameter: "image" may only' . ' be a valid URI/IRI'); } - if (!in_array(substr($value, -3), array('jpg','png'))) { + if (!in_array(substr($value, -3), array('jpg', 'png'))) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "image" may only' . ' use file extension "jpg" or "png" which must be the last three' . ' characters of the URI (i.e. no query string or fragment)'); @@ -214,7 +214,7 @@ public function setItunesDuration($value) */ public function setItunesExplicit($value) { - if (!in_array($value, array('yes','no','clean'))) { + if (!in_array($value, array('yes', 'no', 'clean'))) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "explicit" may only' . ' be one of "yes", "no" or "clean"'); } diff --git a/src/Writer/Extension/ITunes/Renderer/Feed.php b/src/Writer/Extension/ITunes/Renderer/Feed.php index b27da627..9799681a 100644 --- a/src/Writer/Extension/ITunes/Renderer/Feed.php +++ b/src/Writer/Extension/ITunes/Renderer/Feed.php @@ -116,7 +116,7 @@ protected function _setCategories(DOMDocument $dom, DOMElement $root) if (!$cats || empty($cats)) { return; } - foreach ($cats as $key=>$cat) { + foreach ($cats as $key => $cat) { if (!is_array($cat)) { $el = $dom->createElement('itunes:category'); $el->setAttribute('text', $cat);