| 1 | <?php |
||
| 16 | class X509Credential extends AbstractCredential implements X509CredentialInterface |
||
| 17 | { |
||
| 18 | /** @var X509Certificate */ |
||
| 19 | protected $certificate; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param X509Certificate $certificate |
||
| 23 | * @param XMLSecurityKey $privateKey |
||
| 24 | */ |
||
| 25 | 22 | public function __construct(X509Certificate $certificate, XMLSecurityKey $privateKey = null) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @return X509Certificate |
||
| 41 | */ |
||
| 42 | 22 | public function getCertificate() |
|
| 46 | } |
||
| 47 |
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: