diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/ContactsManager.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/ContactsManager.php')
-rw-r--r-- | lib/private/ContactsManager.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php index ba709baefe5..ca4a7d885cd 100644 --- a/lib/private/ContactsManager.php +++ b/lib/private/ContactsManager.php @@ -41,12 +41,12 @@ namespace OC { * - 'escape_like_param' - If set to false wildcards _ and % are not escaped * @return array an array of contacts which are arrays of key-value-pairs */ - public function search($pattern, $searchProperties = array(), $options = array()) { + public function search($pattern, $searchProperties = [], $options = []) { $this->loadAddressBooks(); - $result = array(); + $result = []; foreach($this->addressBooks as $addressBook) { $r = $addressBook->search($pattern, $searchProperties, $options); - $contacts = array(); + $contacts = []; foreach($r as $c){ $c['addressbook-key'] = $addressBook->getKey(); $contacts[] = $c; @@ -131,7 +131,7 @@ namespace OC { */ public function getAddressBooks() { $this->loadAddressBooks(); - $result = array(); + $result = []; foreach($this->addressBooks as $addressBook) { $result[$addressBook->getKey()] = $addressBook->getDisplayName(); } @@ -154,19 +154,19 @@ namespace OC { * removes all registered address book instances */ public function clear() { - $this->addressBooks = array(); - $this->addressBookLoaders = array(); + $this->addressBooks = []; + $this->addressBookLoaders = []; } /** * @var \OCP\IAddressBook[] which holds all registered address books */ - private $addressBooks = array(); + private $addressBooks = []; /** * @var \Closure[] to call to load/register address books */ - private $addressBookLoaders = array(); + private $addressBookLoaders = []; /** * In order to improve lazy loading a closure can be registered which will be called in case @@ -203,7 +203,7 @@ namespace OC { foreach($this->addressBookLoaders as $callable) { $callable($this); } - $this->addressBookLoaders = array(); + $this->addressBookLoaders = []; } } } |