1 | <?php |
||
30 | abstract class AbstractPusher implements PusherInterface |
||
31 | { |
||
32 | /** |
||
33 | * $client. |
||
34 | * |
||
35 | * @var SdkClient |
||
36 | */ |
||
37 | protected $client; |
||
38 | |||
39 | /** |
||
40 | * $options. |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $options; |
||
45 | |||
46 | /** |
||
47 | * $io. |
||
48 | * |
||
49 | * @var IO |
||
50 | */ |
||
51 | protected $io; |
||
52 | |||
53 | /** |
||
54 | * Constructor. |
||
55 | * |
||
56 | * @param array $options |
||
57 | * @param IO $io |
||
58 | * @param Client $client |
||
59 | */ |
||
60 | public function __construct(array $options, IO $io, SdkClient $client = null) |
||
66 | |||
67 | /** |
||
68 | * getDefaultFailedIncidentMessage. |
||
69 | * |
||
70 | * @return string Default message used to create a incident when a failure as occured |
||
71 | */ |
||
72 | public function getDefaultFailedIncidentMessage() |
||
76 | |||
77 | /** |
||
78 | * getDefaultResolvedIncidentMessage. |
||
79 | * |
||
80 | * @return string Default message used to create a incident when a service is resolved as occured |
||
81 | */ |
||
82 | public function getDefaultResolvedIncidentMessage() |
||
86 | |||
87 | /** |
||
88 | * getClient. |
||
89 | * |
||
90 | * @return SdkClient |
||
91 | */ |
||
92 | protected function createClient() |
||
112 | |||
113 | /** |
||
114 | * push. |
||
115 | * |
||
116 | * @param Result $result |
||
117 | * |
||
118 | * @throws \Exception |
||
119 | * |
||
120 | * @return mixed |
||
121 | */ |
||
122 | abstract public function push(Result $result); |
||
123 | } |
||
124 |
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: