1 | <?php |
||
10 | class RsaSha1Signature extends Signature implements SignatureInterface |
||
11 | { |
||
12 | /** |
||
13 | * {@inheritdoc} |
||
14 | */ |
||
15 | public function method() |
||
19 | |||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | public function sign($uri, array $parameters = array(), $method = 'POST') |
||
34 | |||
35 | /** |
||
36 | * Create a Guzzle url for the given URI. |
||
37 | * |
||
38 | * @param string $uri |
||
39 | * |
||
40 | * @return Url |
||
41 | */ |
||
42 | protected function createUrl($uri) |
||
46 | |||
47 | /** |
||
48 | * Generate a base string for a RSA-SHA1 signature |
||
49 | * based on the given a url, method, and any parameters. |
||
50 | * |
||
51 | * @param Url $url |
||
52 | * @param string $method |
||
53 | * @param array $parameters |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | protected function baseString(Uri $url, $method = 'POST', array $parameters = array()) |
||
84 | |||
85 | /** |
||
86 | * Creates an array of rawurlencoded strings out of each array key/value pair |
||
87 | * Handles multi-demensional arrays recursively. |
||
88 | * |
||
89 | * @param array $data Array of parameters to convert. |
||
90 | * @param array $queryParams Array to extend. False by default. |
||
91 | * @param string $prevKey Optional Array key to append |
||
92 | * |
||
93 | * @return string rawurlencoded string version of data |
||
94 | */ |
||
95 | protected function queryStringFromData($data, $queryParams = false, $prevKey = '') |
||
118 | } |
||
119 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.