Completed
Push — master ( b323d3...7d68cb )
by Johan
07:06
created
autoloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @param string $class The fully-qualified class name.
12 12
  * @return void
13 13
  */
14
-spl_autoload_register(function ($class) {
14
+spl_autoload_register(function($class) {
15 15
 
16 16
         // project-specific namespace prefix
17 17
         //$prefix = 'Foo\\Bar\\';
Please login to merge, or discard this patch.
webroot/test-rss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  */
6 6
 
7 7
 // Get environment & autoloader and the $app-object.
8
-require __DIR__.'/config_with_app.php'; 
8
+require __DIR__ . '/config_with_app.php'; 
9 9
 
10 10
 // Prepare the page content
11 11
 $rss = new Anax\Rssfeed\CRssfeed([ 
Please login to merge, or discard this patch.
src/Rssfeed/CRssfeed.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,26 +20,26 @@
 block discarded – undo
20 20
      *
21 21
      * @param array $options to alter the default behaviour.
22 22
      */
23
-    public function __construct($options=array()) {
23
+    public function __construct($options = array()) {
24 24
        $this->url = $options['url'];
25 25
        $this->heading = $options['heading']; 
26 26
        $this->items = $options['items'];
27 27
     }
28 28
 	
29
-    public function readRSS(){
29
+    public function readRSS() {
30 30
     	
31 31
        $html = "<article>";
32 32
        $heading = $this->heading; 
33 33
        $html .= "<h1>$heading</h1>";
34 34
        $xml = simplexml_load_file($this->url);
35
-       for($i = 0; $i < $this->items; $i++){
35
+       for ($i = 0; $i < $this->items; $i++) {
36 36
 	       $title = $xml->channel->item[$i]->title;
37 37
 	       $link = $xml->channel->item[$i]->link;
38 38
 	       $description = $xml->channel->item[$i]->description;
39 39
 	       $pubDate = $xml->channel->item[$i]->pubDate;
40 40
 	       
41 41
 	       // Formatting the date
42
-           $pubDate= date("D, d M Y H:i:s T", strtotime($pubDate));
42
+           $pubDate = date("D, d M Y H:i:s T", strtotime($pubDate));
43 43
 	       
44 44
            $html .= "<a href='$link'><h3>$title</h3></a>";
45 45
 	       $html .= "<small>$pubDate</small><br /><br />";
Please login to merge, or discard this patch.