Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 7c073ca

Browse files
committed
Fixes DocBlocks in Zend_Feed_Pubsubhubbub
Closes zendframework#456 and Closes zendframework#457
1 parent 9b9fda8 commit 7c073ca

File tree

6 files changed

+52
-26
lines changed

6 files changed

+52
-26
lines changed

library/Zend/Feed/Pubsubhubbub/CallbackAbstract.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ abstract class Zend_Feed_Pubsubhubbub_CallbackAbstract
7070
* options for the Subscriber without calling all supported setter
7171
* methods in turn.
7272
*
73-
* @param array|Zend_Config $options Options array or Zend_Config instance
73+
* @param array|Zend_Config|null $config Options array or Zend_Config instance
7474
*/
7575
public function __construct($config = null)
7676
{
@@ -82,7 +82,8 @@ public function __construct($config = null)
8282
/**
8383
* Process any injected configuration options
8484
*
85-
* @param array|Zend_Config $options Options array or Zend_Config instance
85+
* @param array|Zend_Config $config Options array or Zend_Config instance
86+
* @throws Zend_Feed_Pubsubhubbub_Exception
8687
* @return Zend_Feed_Pubsubhubbub_CallbackAbstract
8788
*/
8889
public function setConfig($config)
@@ -132,6 +133,7 @@ public function setStorage(Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $s
132133
* to background save any verification tokens associated with a subscription
133134
* or other.
134135
*
136+
* @throws Zend_Feed_Pubsubhubbub_Exception
135137
* @return Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
136138
*/
137139
public function getStorage()
@@ -150,6 +152,7 @@ public function getStorage()
150152
* (i.e. not inherited from) Zend_Controller_Response_Http.
151153
*
152154
* @param Zend_Feed_Pubsubhubbub_HttpResponse|Zend_Controller_Response_Http $httpResponse
155+
* @throws Zend_Feed_Pubsubhubbub_Exception
153156
* @return Zend_Feed_Pubsubhubbub_CallbackAbstract
154157
*/
155158
public function setHttpResponse($httpResponse)
@@ -188,6 +191,7 @@ public function getHttpResponse()
188191
* Defaults to 1 if left unchanged.
189192
*
190193
* @param string|int $count
194+
* @throws Zend_Feed_Pubsubhubbub_Exception
191195
* @return Zend_Feed_Pubsubhubbub_CallbackAbstract
192196
*/
193197
public function setSubscriberCount($count)
@@ -270,7 +274,8 @@ protected function _getHttpHost()
270274
/**
271275
* Retrieve a Header value from either $_SERVER or Apache
272276
*
273-
* @param string $header
277+
* @param string $header
278+
* @return bool
274279
*/
275280
protected function _getHeader($header)
276281
{

library/Zend/Feed/Pubsubhubbub/HttpResponse.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ public function canSendHeaders($throw = false)
172172
* Set HTTP response code to use with headers
173173
*
174174
* @param int $code
175+
* @throws Zend_Feed_Pubsubhubbub_Exception
175176
* @return Zend_Feed_Pubsubhubbub_HttpResponse
176177
*/
177178
public function setHttpResponseCode($code)

library/Zend/Feed/Pubsubhubbub/Model/ModelAbstract.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class Zend_Feed_Pubsubhubbub_Model_ModelAbstract
4747
/**
4848
* Constructor
4949
*
50-
* @param array $data
5150
* @param Zend_Db_Table_Abstract $tableGateway
52-
* @return void
5351
*/
5452
public function __construct(Zend_Db_Table_Abstract $tableGateway = null)
5553
{

library/Zend/Feed/Pubsubhubbub/Model/Subscription.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ class Zend_Feed_Pubsubhubbub_Model_Subscription
4444
/**
4545
* Save subscription to RDMBS
4646
*
47-
* @param array $data
47+
* @param array $data
48+
* @throws Zend_Db_Table_Exception
49+
* @throws Zend_Feed_Pubsubhubbub_Exception
4850
* @return bool
4951
*/
5052
public function setSubscription(array $data)
@@ -78,6 +80,8 @@ public function setSubscription(array $data)
7880
* Get subscription by ID/key
7981
*
8082
* @param string $key
83+
* @throws Zend_Db_Table_Exception
84+
* @throws Zend_Feed_Pubsubhubbub_Exception
8185
* @return array
8286
*/
8387
public function getSubscription($key)
@@ -98,6 +102,8 @@ public function getSubscription($key)
98102
* Determine if a subscription matching the key exists
99103
*
100104
* @param string $key
105+
* @throws Zend_Db_Table_Exception
106+
* @throws Zend_Feed_Pubsubhubbub_Exception
101107
* @return bool
102108
*/
103109
public function hasSubscription($key)
@@ -117,7 +123,7 @@ public function hasSubscription($key)
117123
/**
118124
* Delete a subscription
119125
*
120-
* @param string $key
126+
* @param string $key
121127
* @return bool
122128
*/
123129
public function deleteSubscription($key)

library/Zend/Feed/Pubsubhubbub/Publisher.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class Zend_Feed_Pubsubhubbub_Publisher
6969
* options for the Publisher without calling all supported setter
7070
* methods in turn.
7171
*
72-
* @param array|Zend_Config $options Options array or Zend_Config instance
73-
* @return void
72+
* @param array|Zend_Config $config Options array or Zend_Config instance
73+
* @throws Zend_Feed_Pubsubhubbub_Exception
7474
*/
7575
public function __construct($config = null)
7676
{
@@ -82,7 +82,8 @@ public function __construct($config = null)
8282
/**
8383
* Process any injected configuration options
8484
*
85-
* @param array|Zend_Config $options Options array or Zend_Config instance
85+
* @param array|Zend_Config $config Options array or Zend_Config instance
86+
* @throws Zend_Feed_Pubsubhubbub_Exception
8687
* @return Zend_Feed_Pubsubhubbub_Publisher
8788
*/
8889
public function setConfig($config)
@@ -110,6 +111,7 @@ public function setConfig($config)
110111
* Add a Hub Server URL supported by Publisher
111112
*
112113
* @param string $url
114+
* @throws Zend_Feed_Pubsubhubbub_Exception
113115
* @return Zend_Feed_Pubsubhubbub_Publisher
114116
*/
115117
public function addHubUrl($url)
@@ -169,6 +171,7 @@ public function getHubUrls()
169171
* Add a URL to a topic (Atom or RSS feed) which has been updated
170172
*
171173
* @param string $url
174+
* @throws Zend_Feed_Pubsubhubbub_Exception
172175
* @return Zend_Feed_Pubsubhubbub_Publisher
173176
*/
174177
public function addUpdatedTopicUrl($url)
@@ -287,8 +290,9 @@ public function notifyAll()
287290
/**
288291
* Add an optional parameter to the update notification requests
289292
*
290-
* @param string $name
293+
* @param string $name
291294
* @param string|null $value
295+
* @throws Zend_Feed_Pubsubhubbub_Exception
292296
* @return Zend_Feed_Pubsubhubbub_Publisher
293297
*/
294298
public function setParameter($name, $value = null)
@@ -333,6 +337,7 @@ public function setParameters(array $parameters)
333337
* Remove an optional parameter for the notification requests
334338
*
335339
* @param string $name
340+
* @throws Zend_Feed_Pubsubhubbub_Exception
336341
* @return Zend_Feed_Pubsubhubbub_Publisher
337342
*/
338343
public function removeParameter($name)
@@ -387,6 +392,8 @@ public function getErrors()
387392
/**
388393
* Get a basic prepared HTTP client for use
389394
*
395+
* @throws Zend_Feed_Pubsubhubbub_Exception
396+
* @throws Zend_Http_Client_Exception
390397
* @return Zend_Http_Client
391398
*/
392399
protected function _getHttpClient()

library/Zend/Feed/Pubsubhubbub/Subscriber.php

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ class Zend_Feed_Pubsubhubbub_Subscriber
145145
* options for the Subscriber without calling all supported setter
146146
* methods in turn.
147147
*
148-
* @param array|Zend_Config $options Options array or Zend_Config instance
149-
* @return void
148+
* @param array|Zend_Config|null $config Options array or Zend_Config instance
149+
* @throws Zend_Feed_Pubsubhubbub_Exception
150150
*/
151151
public function __construct($config = null)
152152
{
@@ -158,7 +158,8 @@ public function __construct($config = null)
158158
/**
159159
* Process any injected configuration options
160160
*
161-
* @param array|Zend_Config $options Options array or Zend_Config instance
161+
* @param array|Zend_Config $config Options array or Zend_Config instance
162+
* @throws Zend_Feed_Pubsubhubbub_Exception
162163
* @return Zend_Feed_Pubsubhubbub_Subscriber
163164
*/
164165
public function setConfig($config)
@@ -207,6 +208,7 @@ public function setConfig($config)
207208
* event will relate
208209
*
209210
* @param string $url
211+
* @throws Zend_Feed_Pubsubhubbub_Exception
210212
* @return Zend_Feed_Pubsubhubbub_Subscriber
211213
*/
212214
public function setTopicUrl($url)
@@ -225,6 +227,7 @@ public function setTopicUrl($url)
225227
* Set the topic URL (RSS or Atom feed) to which the intended (un)subscribe
226228
* event will relate
227229
*
230+
* @throws Zend_Feed_Pubsubhubbub_Exception
228231
* @return string
229232
*/
230233
public function getTopicUrl()
@@ -241,6 +244,7 @@ public function getTopicUrl()
241244
* Set the number of seconds for which any subscription will remain valid
242245
*
243246
* @param int $seconds
247+
* @throws Zend_Feed_Pubsubhubbub_Exception
244248
* @return Zend_Feed_Pubsubhubbub_Subscriber
245249
*/
246250
public function setLeaseSeconds($seconds)
@@ -270,6 +274,7 @@ public function getLeaseSeconds()
270274
* this Subscriber
271275
*
272276
* @param string $url
277+
* @throws Zend_Feed_Pubsubhubbub_Exception
273278
* @return Zend_Feed_Pubsubhubbub_Subscriber
274279
*/
275280
public function setCallbackUrl($url)
@@ -288,6 +293,7 @@ public function setCallbackUrl($url)
288293
* Get the callback URL to be used by Hub Servers when communicating with
289294
* this Subscriber
290295
*
296+
* @throws Zend_Feed_Pubsubhubbub_Exception
291297
* @return string
292298
*/
293299
public function getCallbackUrl()
@@ -309,6 +315,7 @@ public function getCallbackUrl()
309315
* order of occurance in the parameter list determines this preference.
310316
*
311317
* @param string $mode Should be 'sync' or 'async'
318+
* @throws Zend_Feed_Pubsubhubbub_Exception
312319
* @return Zend_Feed_Pubsubhubbub_Subscriber
313320
*/
314321
public function setPreferredVerificationMode($mode)
@@ -339,6 +346,7 @@ public function getPreferredVerificationMode()
339346
* Add a Hub Server URL supported by Publisher
340347
*
341348
* @param string $url
349+
* @throws Zend_Feed_Pubsubhubbub_Exception
342350
* @return Zend_Feed_Pubsubhubbub_Subscriber
343351
*/
344352
public function addHubUrl($url)
@@ -398,7 +406,8 @@ public function getHubUrls()
398406
* Add authentication credentials for a given URL
399407
*
400408
* @param string $url
401-
* @param array $authentication
409+
* @param array $authentication
410+
* @throws Zend_Feed_Pubsubhubbub_Exception
402411
* @return Zend_Feed_Pubsubhubbub_Subscriber
403412
*/
404413
public function addAuthentication($url, array $authentication)
@@ -452,8 +461,9 @@ public function usePathParameter($bool = true)
452461
/**
453462
* Add an optional parameter to the (un)subscribe requests
454463
*
455-
* @param string $name
464+
* @param string $name
456465
* @param string|null $value
466+
* @throws Zend_Feed_Pubsubhubbub_Exception
457467
* @return Zend_Feed_Pubsubhubbub_Subscriber
458468
*/
459469
public function setParameter($name, $value = null)
@@ -483,8 +493,8 @@ public function setParameter($name, $value = null)
483493
/**
484494
* Add an optional parameter to the (un)subscribe requests
485495
*
486-
* @param string $name
487-
* @param string|null $value
496+
* @param array $parameters
497+
* @throws Zend_Feed_Pubsubhubbub_Exception
488498
* @return Zend_Feed_Pubsubhubbub_Subscriber
489499
*/
490500
public function setParameters(array $parameters)
@@ -499,6 +509,7 @@ public function setParameters(array $parameters)
499509
* Remove an optional parameter for the (un)subscribe requests
500510
*
501511
* @param string $name
512+
* @throws Zend_Feed_Pubsubhubbub_Exception
502513
* @return Zend_Feed_Pubsubhubbub_Subscriber
503514
*/
504515
public function removeParameter($name)
@@ -542,6 +553,7 @@ public function setStorage(Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface $s
542553
* to background save any verification tokens associated with a subscription
543554
* or other.
544555
*
556+
* @throws Zend_Feed_Pubsubhubbub_Exception
545557
* @return Zend_Feed_Pubsubhubbub_Model_SubscriptionInterface
546558
*/
547559
public function getStorage()
@@ -557,8 +569,6 @@ public function getStorage()
557569
/**
558570
* Subscribe to one or more Hub Servers using the stored Hub URLs
559571
* for the given Topic URL (RSS or Atom feed)
560-
*
561-
* @return void
562572
*/
563573
public function subscribeAll()
564574
{
@@ -568,8 +578,6 @@ public function subscribeAll()
568578
/**
569579
* Unsubscribe from one or more Hub Servers using the stored Hub URLs
570580
* for the given Topic URL (RSS or Atom feed)
571-
*
572-
* @return void
573581
*/
574582
public function unsubscribeAll()
575583
{
@@ -619,7 +627,8 @@ public function getAsyncHubs()
619627
* Executes an (un)subscribe request
620628
*
621629
* @param string $mode
622-
* @return void
630+
* @throws Zend_Feed_Pubsubhubbub_Exception
631+
* @throws Zend_Http_Client_Exception
623632
*/
624633
protected function _doRequest($mode)
625634
{
@@ -669,7 +678,6 @@ protected function _doRequest($mode)
669678
/**
670679
* Get a basic prepared HTTP client for use
671680
*
672-
* @param string $mode Must be "subscribe" or "unsubscribe"
673681
* @return Zend_Http_Client
674682
*/
675683
protected function _getHttpClient()
@@ -686,7 +694,8 @@ protected function _getHttpClient()
686694
* client's POST body that are specific to the current Hub Server URL
687695
*
688696
* @param string $hubUrl
689-
* @param mode $hubUrl
697+
* @param string $mode
698+
* @throws Zend_Feed_Pubsubhubbub_Exception
690699
* @return string
691700
*/
692701
protected function _getRequestParameters($hubUrl, $mode)
@@ -776,7 +785,6 @@ protected function _getRequestParameters($hubUrl, $mode)
776785
* requests to a Hub Server. Follows no particular method, which means
777786
* it might be improved/changed in future.
778787
*
779-
* @param string $hubUrl The Hub Server URL for which this token will apply
780788
* @return string
781789
*/
782790
protected function _generateVerifyToken()
@@ -791,6 +799,7 @@ protected function _generateVerifyToken()
791799
* Simple helper to generate a verification token used in (un)subscribe
792800
* requests to a Hub Server.
793801
*
802+
* @param array $params
794803
* @param string $hubUrl The Hub Server URL for which this token will apply
795804
* @return string
796805
*/

0 commit comments

Comments
 (0)