1 | <?php |
||
11 | final class JetSmsService |
||
12 | { |
||
13 | /** |
||
14 | * The jet sms client implementation. |
||
15 | * |
||
16 | * @var JetSmsClientInterface |
||
17 | */ |
||
18 | private $client; |
||
19 | |||
20 | /** |
||
21 | * The short message factory implementation. |
||
22 | * |
||
23 | * @var ShortMessageFactoryInterface |
||
24 | */ |
||
25 | private $factory; |
||
26 | |||
27 | /** |
||
28 | * The short message collection factory implementation. |
||
29 | * |
||
30 | * @var ShortMessageFactoryInterface |
||
31 | */ |
||
32 | private $collectionFactory; |
||
33 | |||
34 | /** |
||
35 | * The before callback which will be called before sending single messages. |
||
36 | * |
||
37 | * @var callable|null |
||
38 | */ |
||
39 | private $beforeSingleShortMessageCallback; |
||
40 | |||
41 | /** |
||
42 | * The after callback which will be called before sending single messages. |
||
43 | * |
||
44 | * @var callable|null |
||
45 | */ |
||
46 | private $afterSingleShortMessageCallback; |
||
47 | |||
48 | /** |
||
49 | * The before callback which will be called before sending multiple messages. |
||
50 | * |
||
51 | * @var callable|null |
||
52 | */ |
||
53 | private $beforeMultipleShortMessageCallback; |
||
54 | |||
55 | /** |
||
56 | * The after callback which will be called after sending multiple messages. |
||
57 | * |
||
58 | * @var callable|null |
||
59 | */ |
||
60 | private $afterMultipleShortMessageCallback; |
||
61 | |||
62 | /** |
||
63 | * JetSmsService constructor. |
||
64 | * |
||
65 | * @param JetSmsClientInterface $jetSmsClient |
||
66 | * @param ShortMessageFactoryInterface $shortMessageFactory |
||
67 | * @param ShortMessageCollectionFactoryInterface $shortMessageCollectionFactory |
||
68 | * @param callable|null $beforeSingleShortMessageCallback |
||
69 | * @param callable|null $afterSingleShortMessageCallback |
||
70 | * @param callable|null $beforeMultipleShortMessageCallback |
||
71 | * @param callable|null $afterMultipleShortMessageCallback |
||
72 | */ |
||
73 | public function __construct( |
||
90 | |||
91 | /** |
||
92 | * Send the given body to the given receivers. |
||
93 | * |
||
94 | * @param string $body The body of the short message. |
||
95 | * @param array|string $receivers The receiver(s) of the message. |
||
96 | * |
||
97 | * @return JetSmsResponseInterface The parsed JetSms response object. |
||
98 | */ |
||
99 | public function sendShortMessage($receivers, $body) |
||
115 | |||
116 | /** |
||
117 | * Send the given short messages. |
||
118 | * |
||
119 | * @param array $messages An array containing short message arrays. |
||
120 | * |
||
121 | * @return JetSmsResponseInterface The parsed JetSms response object. |
||
122 | */ |
||
123 | public function sendShortMessages(array $messages) |
||
146 | } |
||
147 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..