| Conditions | 5 |
| Paths | 7 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function isInGroupNamed($name) |
||
| 40 | { |
||
| 41 | if($this->groupData === null) |
||
| 42 | { |
||
| 43 | $resp = \Httpful\Request::get($this->apiUrl.'/users/me/groups')->authenticateWith($this->userData->uid, $this->userData->userPassword)->send(); |
||
| 44 | if($resp->hasErrors()) |
||
| 45 | { |
||
| 46 | return false; |
||
| 47 | } |
||
| 48 | $this->groupData = $resp->body; |
||
| 49 | } |
||
| 50 | $count = count($this->groupData); |
||
| 51 | for($i = 0; $i < $count; $i++) |
||
| 52 | { |
||
| 53 | if($this->groupData[$i]->cn === $name) |
||
| 54 | { |
||
| 55 | return true; |
||
| 56 | } |
||
| 57 | } |
||
| 58 | return false; |
||
| 59 | } |
||
| 60 | |||
| 76 |
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@propertyannotation 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.