summaryrefslogtreecommitdiffstats
path: root/app/classes/PlanetItem.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/classes/PlanetItem.php')
-rw-r--r--app/classes/PlanetItem.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/app/classes/PlanetItem.php b/app/classes/PlanetItem.php
index b3f1fb9..039d0ca 100644
--- a/app/classes/PlanetItem.php
+++ b/app/classes/PlanetItem.php
@@ -3,20 +3,25 @@
/**
* Planet item
*/
-class PlanetItem{
- function __construct($feed, $data){
+
+class PlanetItem
+{
+ public function __construct($feed, $data)
+ {
parent::SimplePie_Item($feed, $data);
}
- function compare($item1, $item2){
+ public function compare($item1, $item2)
+ {
$item1_date = $item1->get_date('U');
$item2_date = $item2->get_date('U');
- if ($item1_date == $item2_date){
+
+ if ($item1_date == $item2_date) {
return 0;
- }
- else if ($item1_date < $item2_date){
+ } elseif ($item1_date < $item2_date) {
return 1;
}
+
return -1;
}
-} \ No newline at end of file
+}