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') |
||
82 | |||
83 | /** |
||
84 | * @param array $signatureData |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | protected function buildSignatureDataString(array $signatureData) |
||
92 | |||
93 | /** |
||
94 | * Convert booleans to strings, removed unset parameters, and sorts the array |
||
95 | * |
||
96 | * @param array $data Data array |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | public function prepareParameters($data) |
||
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | protected function getSigningKey() |
||
131 | |||
132 | /** |
||
133 | * @param string $data |
||
134 | * |
||
135 | * @return string |
||
136 | * |
||
137 | * @throws UnsupportedHashAlgorithmException |
||
138 | */ |
||
139 | protected function hash($data) |
||
150 | } |
||
151 |
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..