@@ -4,5 +4,5 @@ |
||
4 | 4 | require_once 'Vendor/autoload.php'; |
5 | 5 | |
6 | 6 | // Load test target classes |
7 | -spl_autoload_register(function($c) { @include_once strtr($c, '\\_', '//').'.php'; }); |
|
8 | -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__).'/Source'); |
|
9 | 7 | \ No newline at end of file |
8 | +spl_autoload_register(function($c) { @include_once strtr($c, '\\_', '//') . '.php'; }); |
|
9 | +set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/Source'); |
|
10 | 10 | \ No newline at end of file |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Load test target classes |
4 | -spl_autoload_register(function($c) { @include_once strtr($c, '\\_', '//').'.php'; }); |
|
5 | -set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__.'/Source'); |
|
4 | +spl_autoload_register(function($c) { @include_once strtr($c, '\\_', '//') . '.php'; }); |
|
5 | +set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/Source'); |
|
6 | 6 | |
7 | 7 | use \Bhaktaraz\RSSGenerator\Feed; |
8 | 8 | use \Bhaktaraz\RSSGenerator\Channel; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function addChild($name, $value = null, $namespace = null) |
8 | 8 | { |
9 | - if ( $value !== null and is_string($value) === true ) |
|
9 | + if ($value !== null and is_string($value) === true) |
|
10 | 10 | { |
11 | 11 | $value = str_replace('&', '&', $value); |
12 | 12 | } |
@@ -127,27 +127,27 @@ |
||
127 | 127 | $xml->addChild('link', $this->url); |
128 | 128 | $xml->addChild('description', $this->description); |
129 | 129 | |
130 | - foreach ( $this->categories as $category ) |
|
130 | + foreach ($this->categories as $category) |
|
131 | 131 | { |
132 | 132 | $element = $xml->addChild('category', $category[0]); |
133 | 133 | |
134 | - if ( isset($category[1]) ) |
|
134 | + if (isset($category[1])) |
|
135 | 135 | { |
136 | 136 | $element->addAttribute('domain', $category[1]); |
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
140 | - if ( $this->guid ) |
|
140 | + if ($this->guid) |
|
141 | 141 | { |
142 | 142 | $guid = $xml->addChild('guid', $this->guid); |
143 | 143 | |
144 | - if ( $this->isPermalink ) |
|
144 | + if ($this->isPermalink) |
|
145 | 145 | { |
146 | 146 | $guid->addAttribute('isPermaLink', 'true'); |
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | - if ( $this->pubDate !== null ) |
|
150 | + if ($this->pubDate !== null) |
|
151 | 151 | { |
152 | 152 | $xml->addChild('pubDate', date(DATE_RSS, $this->pubDate)); |
153 | 153 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" />', LIBXML_NOERROR|LIBXML_ERR_NONE|LIBXML_ERR_FATAL); |
32 | 32 | |
33 | - foreach ( $this->channels as $channel ) |
|
33 | + foreach ($this->channels as $channel) |
|
34 | 34 | { |
35 | 35 | $toDom = dom_import_simplexml($xml); |
36 | 36 | $fromDom = dom_import_simplexml($channel->asXML()); |
@@ -152,32 +152,32 @@ |
||
152 | 152 | $xml->addChild('link', $this->url); |
153 | 153 | $xml->addChild('description', $this->description); |
154 | 154 | |
155 | - if ( $this->language !== null ) |
|
155 | + if ($this->language !== null) |
|
156 | 156 | { |
157 | 157 | $xml->addChild('language', $this->language); |
158 | 158 | } |
159 | 159 | |
160 | - if ( $this->copyright !== null ) |
|
160 | + if ($this->copyright !== null) |
|
161 | 161 | { |
162 | 162 | $xml->addChild('copyright', $this->copyright); |
163 | 163 | } |
164 | 164 | |
165 | - if ( $this->pubDate !== null ) |
|
165 | + if ($this->pubDate !== null) |
|
166 | 166 | { |
167 | 167 | $xml->addChild('pubDate', date(DATE_RSS, $this->pubDate)); |
168 | 168 | } |
169 | 169 | |
170 | - if ( $this->lastBuildDate !== null ) |
|
170 | + if ($this->lastBuildDate !== null) |
|
171 | 171 | { |
172 | 172 | $xml->addChild('lastBuildDate', date(DATE_RSS, $this->lastBuildDate)); |
173 | 173 | } |
174 | 174 | |
175 | - if ( $this->ttl !== null ) |
|
175 | + if ($this->ttl !== null) |
|
176 | 176 | { |
177 | 177 | $xml->addChild('ttl', $this->ttl); |
178 | 178 | } |
179 | 179 | |
180 | - foreach ( $this->items as $item ) |
|
180 | + foreach ($this->items as $item) |
|
181 | 181 | { |
182 | 182 | $toDom = dom_import_simplexml($xml); |
183 | 183 | $fromDom = dom_import_simplexml($item->asXML()); |