1 | <?php |
||
18 | abstract class ECDSA implements SignerInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var ECDSAAdapterInterface |
||
22 | */ |
||
23 | private $adapter; |
||
24 | |||
25 | /** |
||
26 | * @var $private |
||
27 | */ |
||
28 | private $private; |
||
29 | |||
30 | /** |
||
31 | * @var $public |
||
32 | */ |
||
33 | private $public; |
||
34 | |||
35 | public function __construct(ECDSAAdapterInterface $adapter) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function sign($payload, KeyManagerInterface $key) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function verify($expected, $payload, KeyManagerInterface $key) |
||
69 | |||
70 | /** |
||
71 | * Get private key object from given certificate. |
||
72 | * |
||
73 | * @param string $key |
||
74 | * @return PrivateKeyInterface |
||
75 | */ |
||
76 | public function getPrivateKey(KeyManagerInterface $key) |
||
80 | |||
81 | /** |
||
82 | * Get public key object from given certificate. |
||
83 | * |
||
84 | * @param string $key |
||
85 | * @return PublicKeyInterface |
||
86 | */ |
||
87 | public function getPublicKey(KeyManagerInterface $key) |
||
91 | } |
||
92 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.