1 | <?php |
||
9 | class Signature implements SignatureInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var Credentials |
||
13 | */ |
||
14 | protected $credentials; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $algorithm; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $tokenSecret = null; |
||
25 | |||
26 | /** |
||
27 | * @param CredentialsInterface $credentials |
||
28 | */ |
||
29 | public function __construct(CredentialsInterface $credentials) |
||
33 | |||
34 | /** |
||
35 | * @param string $algorithm |
||
36 | */ |
||
37 | public function setHashingAlgorithm($algorithm) |
||
41 | |||
42 | /** |
||
43 | * @param string $token |
||
44 | */ |
||
45 | public function setTokenSecret($token) |
||
49 | |||
50 | /** |
||
51 | * @param UriInterface $uri |
||
52 | * @param array $params |
||
53 | * @param string $method |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getSignature(UriInterface $uri, array $params, $method = 'POST') |
||
78 | |||
79 | /** |
||
80 | * @param array $signatureData |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | protected function buildSignatureDataString(array $signatureData) |
||
88 | |||
89 | /** |
||
90 | * Convert booleans to strings, removed unset parameters, and sorts the array |
||
91 | * |
||
92 | * @param array $data Data array |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | public function prepareParameters($data) |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | protected function getSigningKey() |
||
127 | |||
128 | /** |
||
129 | * @param string $data |
||
130 | * |
||
131 | * @return string |
||
132 | * |
||
133 | * @throws UnsupportedHashAlgorithmException |
||
134 | */ |
||
135 | protected function hash($data) |
||
146 | } |
||
147 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..