Conditions | 2 |
Paths | 3 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function build(): JWS |
||
38 | { |
||
39 | try { |
||
40 | $jws = parent::build(); |
||
41 | $this->eventDispatcher->dispatch(new JWSBuiltSuccessEvent($jws)); |
||
|
|||
42 | |||
43 | return $jws; |
||
44 | } catch (Throwable $throwable) { |
||
45 | $this->eventDispatcher->dispatch(new JWSBuiltFailureEvent( |
||
46 | $this->payload, |
||
47 | $this->signatures, |
||
48 | $this->isPayloadDetached, |
||
49 | $this->isPayloadEncoded, |
||
50 | $throwable |
||
51 | )); |
||
52 | |||
53 | throw $throwable; |
||
54 | } |
||
55 | } |
||
56 | } |
||
57 |
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: