Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | private function _setHeaders($method, $url, $body = null) |
||
24 | { |
||
25 | if ($method != HttpRequest::GET) { |
||
26 | $cType = 'application/json'; |
||
27 | } else { |
||
28 | $cType = null; |
||
29 | } |
||
30 | $macToken = $this->_mac->MACToken($method, $url, $cType, $body); |
||
31 | $ua = Utils::getUserAgent(Config::SDK_USER_AGENT, Config::SDK_VERSION); |
||
32 | return array( |
||
33 | 'Content-Type' => $cType, |
||
34 | 'User-Agent' => $ua, |
||
35 | 'Authorization' => $macToken, |
||
36 | ); |
||
37 | } |
||
38 | } |
||
39 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.