Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
40 | public function getContacts($folderId = null, $options = array()) |
||
41 | { |
||
42 | if (!$folderId) { |
||
43 | $folderId = $this->getFolderId(); |
||
44 | } |
||
45 | |||
46 | $request = array( |
||
47 | 'Traversal' => 'Shallow', |
||
48 | 'ItemShape' => array( |
||
49 | 'BaseShape' => 'AllProperties' |
||
50 | ), |
||
51 | 'ParentFolderIds' => array( |
||
52 | 'FolderId' => $folderId->toXmlObject() |
||
53 | ) |
||
54 | ); |
||
55 | |||
56 | $request = array_replace_recursive($request, $options); |
||
57 | |||
58 | $request = Type::buildFromArray($request); |
||
59 | return $this->getClient()->FindItem($request); |
||
60 | } |
||
61 | } |
||
62 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: