From d55a901d98cfc3373a42f2233f5ecf840269541b Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sun, 25 May 2014 17:00:45 +0300 Subject: [PATCH] Indenting and PSR2 styling --- xkcd-mailer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xkcd-mailer.php b/xkcd-mailer.php index 5670209..b9c1baa 100644 --- a/xkcd-mailer.php +++ b/xkcd-mailer.php @@ -14,8 +14,8 @@ // Use config.example.php as base for your configurations. $lastfile = "last.txt"; - $here = dirname( __FILE__ ); - if( !is_readable($here . '/config.php') ) { + $here = dirname(__FILE__); + if (! is_readable($here . '/config.php')) { die("Please configure me. I don't know where I should sent the comic. (Config file {$here}/config.php missing.)"); } else { include_once($here . '/config.php'); @@ -24,7 +24,7 @@ $feed = "http://xkcd.com/atom.xml"; // Check if http:// wrapper is allowed - if( ini_get('allow_url_fopen') ) { + if (ini_get('allow_url_fopen')) { $data = simplexml_load_file($feed); } else { // If http:// wrapper is disabled (by allow_url_fopen=0, for example), then fall back on cURL @@ -43,14 +43,14 @@ $item = $data->entry[0]; if (file_exists($lastfile)) { - $f = fopen($lastfile, 'r'); + $f = fopen($lastfile, 'r'); $last = (int) fread($f, 1024); fclose($f); } else { $last = 0; } - $parts = explode('/', $item->id); + $parts = explode('/', $item->id); $current = (int) $parts[3]; if ($current > $last) {