diff options
Diffstat (limited to 'lib/private/ContactsManager.php')
-rw-r--r-- | lib/private/ContactsManager.php | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php index 6ccedca77b9..c28e7f6ad4b 100644 --- a/lib/private/ContactsManager.php +++ b/lib/private/ContactsManager.php @@ -45,10 +45,10 @@ namespace OC { public function search($pattern, $searchProperties = [], $options = []) { $this->loadAddressBooks(); $result = []; - foreach($this->addressBooks as $addressBook) { + foreach ($this->addressBooks as $addressBook) { $r = $addressBook->search($pattern, $searchProperties, $options); $contacts = []; - foreach($r as $c){ + foreach ($r as $c) { $c['addressbook-key'] = $addressBook->getKey(); $contacts[] = $c; } @@ -133,7 +133,7 @@ namespace OC { public function getAddressBooks() { $this->loadAddressBooks(); $result = []; - foreach($this->addressBooks as $addressBook) { + foreach ($this->addressBooks as $addressBook) { $result[$addressBook->getKey()] = $addressBook->getDisplayName(); } @@ -175,8 +175,7 @@ namespace OC { * * @param \Closure $callable */ - public function register(\Closure $callable) - { + public function register(\Closure $callable) { $this->addressBookLoaders[] = $callable; } @@ -186,8 +185,7 @@ namespace OC { * @param string $addressBookKey * @return \OCP\IAddressBook */ - protected function getAddressBook($addressBookKey) - { + protected function getAddressBook($addressBookKey) { $this->loadAddressBooks(); if (!array_key_exists($addressBookKey, $this->addressBooks)) { return null; @@ -199,9 +197,8 @@ namespace OC { /** * Load all address books registered with 'register' */ - protected function loadAddressBooks() - { - foreach($this->addressBookLoaders as $callable) { + protected function loadAddressBooks() { + foreach ($this->addressBookLoaders as $callable) { $callable($this); } $this->addressBookLoaders = []; |