1 | <?php |
||
29 | class Hmac |
||
30 | { |
||
31 | /** |
||
32 | * The prefix authentication keys will be named after |
||
33 | * @var string |
||
34 | */ |
||
35 | private $prefix = 'm62_auth_'; |
||
36 | |||
37 | /** |
||
38 | * The REQUEST method we're working with |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $method = 'get'; |
||
42 | |||
43 | /** |
||
44 | * The route being requested |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $route = ''; |
||
48 | |||
49 | /** |
||
50 | * The data to compare |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $data = ''; |
||
54 | |||
55 | /** |
||
56 | * Authenticates a request |
||
57 | * @param string $key |
||
58 | * @param string $secret |
||
59 | */ |
||
60 | public function auth($key, $secret) |
||
88 | |||
89 | /** |
||
90 | * Sets the HTTP method to use |
||
91 | * @param string $method |
||
92 | * @return \JaegerApp\Rest\Hmac |
||
93 | */ |
||
94 | public function setMethod($method) |
||
99 | |||
100 | /** |
||
101 | * Returns the HTTP method |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getMethod() |
||
108 | |||
109 | /** |
||
110 | * Sets the route to use |
||
111 | * @param string $route |
||
112 | * @return \JaegerApp\Rest\Hmac |
||
113 | */ |
||
114 | public function setRoute($route) |
||
119 | |||
120 | /** |
||
121 | * Returns the route |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getRoute() |
||
128 | |||
129 | /** |
||
130 | * Sets the data payload to use |
||
131 | * @param string $data |
||
132 | * @return \JaegerApp\Rest\Hmac |
||
133 | */ |
||
134 | public function setData($data) |
||
139 | |||
140 | /** |
||
141 | * Returns the data |
||
142 | * @return string |
||
143 | */ |
||
144 | public function getData() |
||
148 | |||
149 | public function getPrefix() |
||
153 | } |
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: