@@ -161,7 +161,7 @@ public function get_growth_stats(\DateTime $starting = null, \DateTime $ending =
161
161
*
162
162
* @see https://developers.convertkit.com/v4.html#convertkit-api-forms
163
163
*
164
- * @return false |array<int,\stdClass>
164
+ * @return mixed |array<int,\stdClass>
165
165
*/
166
166
public function get_forms (
167
167
string $ status = 'active ' ,
@@ -198,7 +198,7 @@ public function get_forms(
198
198
*
199
199
* @see https://developers.convertkit.com/v4.html#convertkit-api-forms
200
200
*
201
- * @return false |array<int,\stdClass>
201
+ * @return mixed |array<int,\stdClass>
202
202
*/
203
203
public function get_landing_pages (
204
204
string $ status = 'active ' ,
@@ -456,7 +456,7 @@ public function get_sequence_subscriptions(
456
456
*
457
457
* @see https://developers.convertkit.com/v4.html#list-tags
458
458
*
459
- * @return false |array<int,\stdClass>
459
+ * @return mixed |array<int,\stdClass>
460
460
*/
461
461
public function get_tags (
462
462
bool $ include_total_count = false ,
@@ -863,6 +863,10 @@ public function get_subscriber_id(string $email_address)
863
863
['email_address ' => $ email_address ]
864
864
);
865
865
866
+ if (!$ subscribers instanceof \stdClass) {
867
+ return false ;
868
+ }
869
+
866
870
if (!count ($ subscribers ->subscribers )) {
867
871
return false ;
868
872
}
@@ -878,7 +882,7 @@ public function get_subscriber_id(string $email_address)
878
882
*
879
883
* @see https://developers.convertkit.com/v4.html#get-a-subscriber
880
884
*
881
- * @return false |integer
885
+ * @return mixed |integer
882
886
*/
883
887
public function get_subscriber (int $ subscriber_id )
884
888
{
@@ -895,7 +899,7 @@ public function get_subscriber(int $subscriber_id)
895
899
*
896
900
* @see https://developers.convertkit.com/v4.html#update-a-subscriber
897
901
*
898
- * @return false| mixed
902
+ * @return mixed
899
903
*/
900
904
public function update_subscriber (
901
905
int $ subscriber_id ,
@@ -930,7 +934,7 @@ public function update_subscriber(
930
934
*
931
935
* @see https://developers.convertkit.com/v4.html#unsubscribe-subscriber
932
936
*
933
- * @return false |object
937
+ * @return mixed |object
934
938
*/
935
939
public function unsubscribe_by_email (string $ email_address )
936
940
{
@@ -949,7 +953,7 @@ public function unsubscribe_by_email(string $email_address)
949
953
*
950
954
* @see https://developers.convertkit.com/v4.html#unsubscribe-subscriber
951
955
*
952
- * @return false |object
956
+ * @return mixed |object
953
957
*/
954
958
public function unsubscribe (int $ subscriber_id )
955
959
{
@@ -967,7 +971,7 @@ public function unsubscribe(int $subscriber_id)
967
971
*
968
972
* @see https://developers.convertkit.com/v4.html#list-tags-for-a-subscriber
969
973
*
970
- * @return false |array<int,\stdClass>
974
+ * @return mixed |array<int,\stdClass>
971
975
*/
972
976
public function get_subscriber_tags (
973
977
int $ subscriber_id ,
@@ -1044,7 +1048,7 @@ public function get_broadcasts(
1044
1048
*
1045
1049
* @see https://developers.convertkit.com/v4.html#create-a-broadcast
1046
1050
*
1047
- * @return false |object
1051
+ * @return mixed |object
1048
1052
*/
1049
1053
public function create_broadcast (
1050
1054
string $ subject = '' ,
@@ -1103,7 +1107,7 @@ public function create_broadcast(
1103
1107
*
1104
1108
* @see https://developers.convertkit.com/v4.html#get-a-broadcast
1105
1109
*
1106
- * @return false |object
1110
+ * @return mixed |object
1107
1111
*/
1108
1112
public function get_broadcast (int $ id )
1109
1113
{
@@ -1118,7 +1122,7 @@ public function get_broadcast(int $id)
1118
1122
*
1119
1123
* @see https://developers.convertkit.com/v4.html#get-stats
1120
1124
*
1121
- * @return false |object
1125
+ * @return mixed |object
1122
1126
*/
1123
1127
public function get_broadcast_stats (int $ id )
1124
1128
{
@@ -1151,7 +1155,7 @@ public function get_broadcast_stats(int $id)
1151
1155
*
1152
1156
* @see https://developers.convertkit.com/#create-a-broadcast
1153
1157
*
1154
- * @return false |object
1158
+ * @return mixed |object
1155
1159
*/
1156
1160
public function update_broadcast (
1157
1161
int $ id ,
@@ -1213,7 +1217,7 @@ public function update_broadcast(
1213
1217
*
1214
1218
* @see https://developers.convertkit.com/v4.html#delete-a-broadcast
1215
1219
*
1216
- * @return false |object
1220
+ * @return mixed |object
1217
1221
*/
1218
1222
public function delete_broadcast (int $ id )
1219
1223
{
@@ -1266,7 +1270,7 @@ public function get_webhooks(
1266
1270
*
1267
1271
* @throws \InvalidArgumentException If the event is not supported.
1268
1272
*
1269
- * @return false |object
1273
+ * @return mixed |object
1270
1274
*/
1271
1275
public function create_webhook (string $ url , string $ event , string $ parameter = '' )
1272
1276
{
@@ -1340,7 +1344,7 @@ public function create_webhook(string $url, string $event, string $parameter = '
1340
1344
*
1341
1345
* @see https://developers.convertkit.com/v4.html#delete-a-webhook
1342
1346
*
1343
- * @return false |object
1347
+ * @return mixed |object
1344
1348
*/
1345
1349
public function delete_webhook (int $ id )
1346
1350
{
@@ -1389,7 +1393,7 @@ public function get_custom_fields(
1389
1393
*
1390
1394
* @see https://developers.convertkit.com/v4.html#create-a-custom-field
1391
1395
*
1392
- * @return false |object
1396
+ * @return mixed |object
1393
1397
*/
1394
1398
public function create_custom_field (string $ label )
1395
1399
{
@@ -1409,7 +1413,7 @@ public function create_custom_field(string $label)
1409
1413
*
1410
1414
* @see https://developers.convertkit.com/v4.html#bulk-create-custom-fields
1411
1415
*
1412
- * @return false |object
1416
+ * @return mixed |object
1413
1417
*/
1414
1418
public function create_custom_fields (array $ labels , string $ callback_url = '' )
1415
1419
{
@@ -1444,7 +1448,7 @@ public function create_custom_fields(array $labels, string $callback_url = '')
1444
1448
*
1445
1449
* @see https://developers.convertkit.com/v4.html#update-a-custom-field
1446
1450
*
1447
- * @return false |object
1451
+ * @return mixed |object
1448
1452
*/
1449
1453
public function update_custom_field (int $ id , string $ label )
1450
1454
{
@@ -1463,7 +1467,7 @@ public function update_custom_field(int $id, string $label)
1463
1467
*
1464
1468
* @see https://developers.convertkit.com/#destroy-field
1465
1469
*
1466
- * @return false |object
1470
+ * @return mixed |object
1467
1471
*/
1468
1472
public function delete_custom_field (int $ id )
1469
1473
{
@@ -1510,7 +1514,7 @@ public function get_purchases(
1510
1514
*
1511
1515
* @see https://developers.convertkit.com/v4.html#get-a-purchase
1512
1516
*
1513
- * @return false |object
1517
+ * @return mixed |object
1514
1518
*/
1515
1519
public function get_purchase (int $ purchase_id )
1516
1520
{
@@ -1535,7 +1539,7 @@ public function get_purchase(int $purchase_id)
1535
1539
*
1536
1540
* @see https://developers.convertkit.com/v4.html#create-a-purchase
1537
1541
*
1538
- * @return false |object
1542
+ * @return mixed |object
1539
1543
*/
1540
1544
public function create_purchase (
1541
1545
string $ email_address ,
0 commit comments