1 | <?php |
||
14 | abstract class SubscribableObject extends ApiObject |
||
15 | { |
||
16 | /** |
||
17 | * The objects's unique identifier. |
||
18 | * |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $id; |
||
22 | |||
23 | /** |
||
24 | * The objects's unique identifier. |
||
25 | * |
||
26 | * @return int |
||
27 | */ |
||
28 | public function getId () |
||
32 | |||
33 | /** |
||
34 | * Get the users who are subscribed to this object |
||
35 | * |
||
36 | * @api |
||
37 | * |
||
38 | * @param array $params |
||
39 | * |
||
40 | * @since 0.1.0 |
||
41 | * |
||
42 | * @return PulseUser[] |
||
43 | */ |
||
44 | public function getSubscribers ($params = array()) |
||
50 | |||
51 | /** |
||
52 | * Subscriber a user to a object |
||
53 | * |
||
54 | * @api |
||
55 | * |
||
56 | * @param int|PulseUser $userId The user that will be subscribed to the board |
||
57 | * @param bool|null $asAdmin Set to true if the user will be an admin of the board |
||
58 | * |
||
59 | * @since 0.1.0 |
||
60 | */ |
||
61 | public function addSubscriber ($userId, $asAdmin = NULL) |
||
76 | |||
77 | /** |
||
78 | * Unsubscribe a user from this object |
||
79 | * |
||
80 | * @api |
||
81 | * |
||
82 | * @param int|PulseUser $userId The user that will be unsubscribed from the board |
||
83 | * |
||
84 | * @since 0.1.0 |
||
85 | */ |
||
86 | public function removeSubscriber ($userId) |
||
97 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: