1 | <?php |
||
18 | class NamshiAsymmetric implements JwtEncoderInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var JWS |
||
22 | */ |
||
23 | private $jws; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $algo; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $privateKey; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $publicKey; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $passPhrase; |
||
44 | |||
45 | /** |
||
46 | * @Algo("algo") |
||
47 | * @PrivateKey("privateKey") |
||
48 | * @PublicKey("publicKey") |
||
49 | * @PassPhrase("passPhrase") |
||
50 | */ |
||
51 | 4 | public function __construct(string $algo, string $privateKey, string $publicKey, string $passPhrase) |
|
59 | |||
60 | 1 | public function encode(array $payload) : string |
|
70 | |||
71 | 2 | public function decode(string $token) : array |
|
85 | } |
||
86 |
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: