aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Search.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 09:30:18 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 16:34:56 +0100
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Search.php
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
downloadnextcloud-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/Search.php')
-rw-r--r--lib/private/Search.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/Search.php b/lib/private/Search.php
index db533ff182a..e8f012c5469 100644
--- a/lib/private/Search.php
+++ b/lib/private/Search.php
@@ -35,8 +35,8 @@ use OCP\Search\Provider;
*/
class Search implements ISearch {
- private $providers = array();
- private $registeredProviders = array();
+ private $providers = [];
+ private $registeredProviders = [];
/**
* Search all providers for $query
@@ -46,9 +46,9 @@ class Search implements ISearch {
* @param int $size, 0 = all
* @return array An array of OC\Search\Result's
*/
- public function searchPaged($query, array $inApps = array(), $page = 1, $size = 30) {
+ public function searchPaged($query, array $inApps = [], $page = 1, $size = 30) {
$this->initProviders();
- $results = array();
+ $results = [];
foreach($this->providers as $provider) {
/** @var $provider Provider */
if ( ! $provider->providesResultsFor($inApps) ) {
@@ -65,7 +65,7 @@ class Search implements ISearch {
$results = array_merge($results, $providerResults);
}
} else {
- \OC::$server->getLogger()->warning('Ignoring Unknown search provider', array('provider' => $provider));
+ \OC::$server->getLogger()->warning('Ignoring Unknown search provider', ['provider' => $provider]);
}
}
return $results;
@@ -75,8 +75,8 @@ class Search implements ISearch {
* Remove all registered search providers
*/
public function clearProviders() {
- $this->providers = array();
- $this->registeredProviders = array();
+ $this->providers = [];
+ $this->registeredProviders = [];
}
/**
@@ -91,7 +91,7 @@ class Search implements ISearch {
}
);
// force regeneration of providers on next search
- $this->providers = array();
+ $this->providers = [];
}
/**
@@ -99,8 +99,8 @@ class Search implements ISearch {
* @param string $class class name of a OC\Search\Provider
* @param array $options optional
*/
- public function registerProvider($class, array $options = array()) {
- $this->registeredProviders[] = array('class' => $class, 'options' => $options);
+ public function registerProvider($class, array $options = []) {
+ $this->registeredProviders[] = ['class' => $class, 'options' => $options];
}
/**