Skip to content

Commit e74079f

Browse files
authored
Merge pull request #64 from nicklaw5/phpdoc-use-string-instead-of-json
Use string instead of json in PHPDoc.
2 parents f204fa5 + ff87c41 commit e74079f

17 files changed

+93
-93
lines changed

Diff for: src/Api/Authentication.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function getAuthenticationUrl($state = null, $forceVerify = false)
2929
*
3030
* @param string $code
3131
* @param string $state
32-
* @return array|json
32+
* @return array|string
3333
*/
3434
public function getAccessCredentials($code, $state = null)
3535
{
@@ -47,7 +47,7 @@ public function getAccessCredentials($code, $state = null)
4747
* Get a new access token
4848
*
4949
* @param string $refreshToken
50-
* @return array|json
50+
* @return array|string
5151
*/
5252
public function refreshToken($refreshToken)
5353
{
@@ -63,7 +63,7 @@ public function refreshToken($refreshToken)
6363
* Revoke an access token
6464
*
6565
* @param string $accessToken
66-
* @return array|json
66+
* @return array|string
6767
*/
6868
public function revokeToken($accessToken)
6969
{

Diff for: src/Api/Bits.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait Bits
1313
* @param string|int $channelIdentifier
1414
* @throws InvalidIdentifierException
1515
* @throws EndpointNotSupportedByApiVersionException
16-
* @return array|json
16+
* @return array|string
1717
*/
1818
public function getCheermotes($channelIdentifier = null)
1919
{

Diff for: src/Api/ChannelFeed.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait ChannelFeed
1919
* @throws InvalidIdentifierException
2020
* @throws InvalidLimitException
2121
* @throws InvalidTypeException
22-
* @return array|json
22+
* @return array|string
2323
*/
2424
public function getMultipleFeedPosts($channelIdentifier, $accessToken, $limit = 10, $cursor = null, $comments = 5)
2525
{
@@ -57,7 +57,7 @@ public function getMultipleFeedPosts($channelIdentifier, $accessToken, $limit =
5757
* @param int $comments
5858
* @throws InvalidIdentifierException
5959
* @throws InvalidTypeException
60-
* @return array|json
60+
* @return array|string
6161
*/
6262
public function getFeedPost($channelIdentifier, $postId, $accessToken, $comments = 5)
6363
{
@@ -89,7 +89,7 @@ public function getFeedPost($channelIdentifier, $postId, $accessToken, $comments
8989
* @param boolean $share
9090
* @throws InvalidIdentifierException
9191
* @throws InvalidTypeException
92-
* @return array|json
92+
* @return array|string
9393
*/
9494
public function createFeedPost($channelIdentifier, $accessToken, $content, $share = false)
9595
{
@@ -121,7 +121,7 @@ public function createFeedPost($channelIdentifier, $accessToken, $content, $shar
121121
* @param string $accessToken
122122
* @throws InvalidIdentifierException
123123
* @throws InvalidTypeException
124-
* @return array|json
124+
* @return array|string
125125
*/
126126
public function deleteFeedPost($channelIdentifier, $postId, $accessToken)
127127
{
@@ -145,7 +145,7 @@ public function deleteFeedPost($channelIdentifier, $postId, $accessToken)
145145
* @param string $emoteId
146146
* @throws InvalidIdentifierException
147147
* @throws InvalidTypeException
148-
* @return array|json
148+
* @return array|string
149149
*/
150150
public function createFeedPostReaction($channelIdentifier, $postId, $accessToken, $emoteId)
151151
{
@@ -177,7 +177,7 @@ public function createFeedPostReaction($channelIdentifier, $postId, $accessToken
177177
* @param string $emoteId
178178
* @throws InvalidIdentifierException
179179
* @throws InvalidTypeException
180-
* @return array|json
180+
* @return array|string
181181
*/
182182
public function deleteFeedPostReaction($channelIdentifier, $postId, $accessToken, $emoteId)
183183
{
@@ -211,7 +211,7 @@ public function deleteFeedPostReaction($channelIdentifier, $postId, $accessToken
211211
* @throws InvalidIdentifierException
212212
* @throws InvalidTypeException
213213
* @throws InvalidLimitException
214-
* @return array|json
214+
* @return array|string
215215
*/
216216
public function getFeedComments($channelIdentifier, $postId, $accessToken, $limit = 10, $cursor = null)
217217
{
@@ -248,7 +248,7 @@ public function getFeedComments($channelIdentifier, $postId, $accessToken, $limi
248248
* @param string $comment
249249
* @throws InvalidIdentifierException
250250
* @throws InvalidTypeException
251-
* @return array|json
251+
* @return array|string
252252
*/
253253
public function createFeedComment($channelIdentifier, $postId, $accessToken, $comment)
254254
{
@@ -276,7 +276,7 @@ public function createFeedComment($channelIdentifier, $postId, $accessToken, $co
276276
* @param string|int $commentId
277277
* @throws InvalidIdentifierException
278278
* @throws InvalidTypeException
279-
* @return array|json
279+
* @return array|string
280280
*/
281281
public function deleteFeedComment($channelIdentifier, $postId, $commentId, $accessToken)
282282
{
@@ -297,7 +297,7 @@ public function deleteFeedComment($channelIdentifier, $postId, $commentId, $acce
297297
* @param string $emoteId
298298
* @throws InvalidIdentifierException
299299
* @throws InvalidTypeException
300-
* @return array|json
300+
* @return array|string
301301
*/
302302
public function createFeedCommentReaction($channelIdentifier, $postId, $commentId, $accessToken, $emoteId)
303303
{
@@ -330,7 +330,7 @@ public function createFeedCommentReaction($channelIdentifier, $postId, $commentI
330330
* @param string $emoteId
331331
* @throws InvalidIdentifierException
332332
* @throws InvalidTypeException
333-
* @return array|json
333+
* @return array|string
334334
*/
335335
public function deleteFeedCommentReaction($channelIdentifier, $postId, $commentId, $accessToken, $emoteId)
336336
{

Diff for: src/Api/Channels.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trait Channels
1717
* Get a user's own channel
1818
*
1919
* @param string $accessToken
20-
* @return array|json
20+
* @return array|string
2121
*/
2222
public function getAuthenticatedChannel($accessToken)
2323
{
@@ -29,7 +29,7 @@ public function getAuthenticatedChannel($accessToken)
2929
*
3030
* @param string|int $channelIdentifier
3131
* @throws InvalidIdentifierException
32-
* @return array|json
32+
* @return array|string
3333
*/
3434
public function getChannel($channelIdentifier)
3535
{
@@ -52,7 +52,7 @@ public function getChannel($channelIdentifier)
5252
* @throws InvalidIdentifierException
5353
* @throws InvalidTypeException
5454
* @throws TwitchApiException
55-
* @return array|json
55+
* @return array|string
5656
*/
5757
public function updateChannel($channelIdentifier, $accessToken, $status = null, $game = null, $delay = null, $channelFeedEnabled = null)
5858
{
@@ -104,7 +104,7 @@ public function updateChannel($channelIdentifier, $accessToken, $status = null,
104104
* @param string|int $channelIdentifier
105105
* @param string $accessToken
106106
* @throws InvalidIdentifierException
107-
* @return array|json
107+
* @return array|string
108108
*/
109109
public function getChannelEditors($channelIdentifier, $accessToken)
110110
{
@@ -128,7 +128,7 @@ public function getChannelEditors($channelIdentifier, $accessToken)
128128
* @throws InvalidOffsetException
129129
* @throws InvalidTypeException
130130
* @throws InvalidDirectionException
131-
* @return array|json
131+
* @return array|string
132132
*/
133133
public function getChannelFollowers($channelIdentifier, $limit = 25, $offset = 0, $cursor = null, $direction = 'desc')
134134
{
@@ -167,7 +167,7 @@ public function getChannelFollowers($channelIdentifier, $limit = 25, $offset = 0
167167
*
168168
* @param string|int $channelIdentifier
169169
* @throws InvalidIdentifierException
170-
* @return array|json
170+
* @return array|string
171171
*/
172172
public function getChannelTeams($channelIdentifier)
173173
{
@@ -190,7 +190,7 @@ public function getChannelTeams($channelIdentifier)
190190
* @throws InvalidLimitException
191191
* @throws InvalidOffsetException
192192
* @throws InvalidDirectionException
193-
* @return array|json
193+
* @return array|string
194194
*/
195195
public function getChannelSubscribers($channelIdentifier, $accessToken, $limit = 25, $offset = 0, $direction = 'desc')
196196
{
@@ -226,7 +226,7 @@ public function getChannelSubscribers($channelIdentifier, $accessToken, $limit =
226226
* @param string|int $userIdentifier
227227
* @param string $accessToken
228228
* @throws InvalidIdentifierException
229-
* @return array|json
229+
* @return array|string
230230
*/
231231
public function checkChannelSubscriptionByUser($channelIdentifier, $userIdentifier, $accessToken)
232232
{
@@ -257,7 +257,7 @@ public function checkChannelSubscriptionByUser($channelIdentifier, $userIdentifi
257257
* @throws InvalidOffsetException
258258
* @throws UnsupportedOptionException
259259
* @throws InvalidTypeException
260-
* @return array|json
260+
* @return array|string
261261
*/
262262
public function getChannelVideos($channelIdentifier, $limit = 10, $offset = 0, $broadcastType = 'highlight', $language = null, $sort = 'time')
263263
{
@@ -307,7 +307,7 @@ public function getChannelVideos($channelIdentifier, $limit = 10, $offset = 0, $
307307
* @param int $length
308308
* @throws InvalidIdentifierException
309309
* @throws UnsupportedOptionException
310-
* @return array|json
310+
* @return array|string
311311
*/
312312
public function startChannelCommercial($channelIdentifier, $accessToken, $length = 30)
313313
{
@@ -330,7 +330,7 @@ public function startChannelCommercial($channelIdentifier, $accessToken, $length
330330
* @param string|int $channelIdentifier
331331
* @param string $accessToken
332332
* @throws InvalidIdentifierException
333-
* @return array|json
333+
* @return array|string
334334
*/
335335
public function resetChannelStreamKey($channelIdentifier, $accessToken)
336336
{
@@ -347,7 +347,7 @@ public function resetChannelStreamKey($channelIdentifier, $accessToken)
347347
* @param string|int $channelIdentifier
348348
* @throws InvalidIdentifierException
349349
* @throws EndpointNotSupportedByApiVersionException
350-
* @return null|array|json
350+
* @return null|array|string
351351
*/
352352
public function getChannelCommunity($channelIdentifier)
353353
{

Diff for: src/Api/Chat.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trait Chat
1212
*
1313
* @param string|int $channelIdentifier
1414
* @throws InvalidIdentifierException
15-
* @return array|json
15+
* @return array|string
1616
*/
1717
public function getChannelChatBadges($channelIdentifier)
1818
{
@@ -28,7 +28,7 @@ public function getChannelChatBadges($channelIdentifier)
2828
*
2929
* @param string $emotesets (comma-seperated list)
3030
* @throws InvalidTypeException
31-
* @return array|json
31+
* @return array|string
3232
*/
3333
public function getChatEmoticonSets($emotesets = null)
3434
{
@@ -44,7 +44,7 @@ public function getChatEmoticonSets($emotesets = null)
4444
/**
4545
* Get all chat emotes
4646
*
47-
* @return array|json
47+
* @return array|string
4848
*/
4949
public function getAllChatEmoticons()
5050
{

Diff for: src/Api/Clips.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait Clips
1414
*
1515
* @param string $slug
1616
* @throws InvalidTypeException
17-
* @return array|json
17+
* @return array|string
1818
*/
1919
public function getClip($slug)
2020
{
@@ -39,7 +39,7 @@ public function getClip($slug)
3939
* @throws TwitchApiException
4040
* @throws InvalidLimitException
4141
* @throws UnsupportedOptionException
42-
* @return array|json
42+
* @return array|string
4343
*/
4444
public function getTopClips($channel = null, $cursor = null, $game = null, $limit = 10, $period = 'day', $trending = false, $language = null)
4545
{
@@ -116,7 +116,7 @@ public function getTopClips($channel = null, $cursor = null, $game = null, $limi
116116
* @param boolean $trending
117117
* @throws InvalidTypeException
118118
* @throws InvalidLimitException
119-
* @return array|json
119+
* @return array|string
120120
*/
121121
public function getFollowedClips($accessToken, $limit = 10, $cursor = null, $trending = false)
122122
{

Diff for: src/Api/Collections.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait Collections
1515
*
1616
* @param string $collectionId
1717
* @throws EndpointNotSupportedByApiVersionException
18-
* @return array|json
18+
* @return array|string
1919
*/
2020
public function getCollectionMetadata($collectionId)
2121
{
@@ -33,7 +33,7 @@ public function getCollectionMetadata($collectionId)
3333
* @param bool $includeAllItems
3434
* @throws EndpointNotSupportedByApiVersionException
3535
* @throws InvalidTypeException
36-
* @return array|json
36+
* @return array|string
3737
*/
3838
public function getCollection($collectionId, $includeAllItems = false)
3939
{
@@ -63,7 +63,7 @@ public function getCollection($collectionId, $includeAllItems = false)
6363
* @throws InvalidIdentifierException
6464
* @throws InvalidLimitException
6565
* @throws InvalidTypeException
66-
* @return array|json
66+
* @return array|string
6767
*/
6868
public function getChannelCollection($channelIdentifier, $limit = 10, $cursor = null, $containingItem = null)
6969
{
@@ -105,7 +105,7 @@ public function getChannelCollection($channelIdentifier, $limit = 10, $cursor =
105105
* @throws EndpointNotSupportedByApiVersionException
106106
* @throws InvalidIdentifierException
107107
* @throws InvalidTypeException
108-
* @return array|json
108+
* @return array|string
109109
*/
110110
public function createCollection($channelIdentifier, $title, $accessToken)
111111
{
@@ -208,7 +208,7 @@ public function deleteCollection($collectionId, $accessToken)
208208
* @param string $accessToken
209209
* @throws EndpointNotSupportedByApiVersionException
210210
* @throws InvalidTypeException
211-
* @return array|json
211+
* @return array|string
212212
*/
213213
public function addCollectionItem($collectionId, $itemId, $itemType = 'video', $accessToken)
214214
{

0 commit comments

Comments
 (0)