summaryrefslogtreecommitdiff
path: root/plugins/RSSCloud/RSSCloudRequestNotify.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-12-14 21:24:49 +0000
committerZach Copley <zach@status.net>2010-01-05 23:21:57 -0800
commit3e6b80d3e99eee4fc916a714f34e7b95ad0455a6 (patch)
tree4d413b5d2c92646be0227724ce4485bb4f3df259 /plugins/RSSCloud/RSSCloudRequestNotify.php
parent655dbcedb327c79c655b928ba36140519e3b6daf (diff)
Some phpcs cleanup
Diffstat (limited to 'plugins/RSSCloud/RSSCloudRequestNotify.php')
-rw-r--r--plugins/RSSCloud/RSSCloudRequestNotify.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/plugins/RSSCloud/RSSCloudRequestNotify.php b/plugins/RSSCloud/RSSCloudRequestNotify.php
index 9643bf432..a648efff1 100644
--- a/plugins/RSSCloud/RSSCloudRequestNotify.php
+++ b/plugins/RSSCloud/RSSCloudRequestNotify.php
@@ -56,9 +56,9 @@ class RSSCloudRequestNotifyAction extends Action
{
parent::prepare($args);
- $this->ip = $_SERVER['REMOTE_ADDR'];
- $this->port = $this->arg('port');
- $this->path = $this->arg('path');
+ $this->ip = $_SERVER['REMOTE_ADDR'];
+ $this->port = $this->arg('port');
+ $this->path = $this->arg('path');
if ($this->path[0] != '/') {
$this->path = '/' . $this->path;
@@ -68,7 +68,7 @@ class RSSCloudRequestNotifyAction extends Action
$this->procedure = $this->arg('notifyProcedure');
$this->domain = $this->arg('domain');
- $this->feeds = $this->getFeeds();
+ $this->feeds = $this->getFeeds();
return true;
}
@@ -124,7 +124,8 @@ class RSSCloudRequestNotifyAction extends Action
}
if (empty($this->feeds)) {
- $msg = 'You must provide at least one valid profile feed url (url1, url2, url3 ... urlN).';
+ $msg = 'You must provide at least one valid profile feed url ' .
+ '(url1, url2, url3 ... urlN).';
$this->showResult(false, $msg);
return;
}
@@ -195,7 +196,7 @@ class RSSCloudRequestNotifyAction extends Action
{
$feeds = array();
- while (list($key, $feed) = each ($this->args)) {
+ while (list($key, $feed) = each($this->args)) {
if (preg_match('/^url\d*$/', $key)) {
$feeds[] = $feed;
}
@@ -251,7 +252,7 @@ class RSSCloudRequestNotifyAction extends Action
} else {
return 'http://' . $this->ip . ':' . $this->port . $this->path;
}
- }
+ }
/**
* Uses the nickname part of the subscribed feed URL to figure out
@@ -267,7 +268,7 @@ class RSSCloudRequestNotifyAction extends Action
{
// We only do profile feeds
- $path = common_path('api/statuses/user_timeline/');
+ $path = common_path('api/statuses/user_timeline/');
$valid = '%^' . $path . '(?<nickname>.*)\.rss$%';
if (preg_match($valid, $feed, $matches)) {
@@ -283,7 +284,7 @@ class RSSCloudRequestNotifyAction extends Action
/**
* Save an RSSCloud subscription
*
- * @param $feed a valid profile feed
+ * @param string $feed a valid profile feed
*
* @return boolean success result
*/
@@ -329,8 +330,9 @@ class RSSCloudRequestNotifyAction extends Action
function showResult($success, $msg)
{
$this->startXML();
- $this->elementStart('notifyResult', array('success' => ($success) ? 'true' : 'false',
- 'msg' => $msg));
+ $this->elementStart('notifyResult',
+ array('success' => ($success) ? 'true' : 'false',
+ 'msg' => $msg));
$this->endXML();
}