summaryrefslogtreecommitdiffstats
path: root/lib/private/Hooks
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-09-17 10:43:23 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-11-22 11:42:53 +0100
commitea8f9a7e841061ed96f291aa3c9a413fe2402b5c (patch)
tree74097b752215fe63b583c2b239abc4f1d4d53089 /lib/private/Hooks
parentba1af2b22e5409c62ea2bdf7eb0e13c282ed70e8 (diff)
downloadnextcloud-server-ea8f9a7e841061ed96f291aa3c9a413fe2402b5c.tar.gz
nextcloud-server-ea8f9a7e841061ed96f291aa3c9a413fe2402b5c.zip
refactor: Repalce array_search with in_array in lib/
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Hooks')
-rw-r--r--lib/private/Hooks/EmitterTrait.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Hooks/EmitterTrait.php b/lib/private/Hooks/EmitterTrait.php
index da4e3da2bd6..fe9cba893de 100644
--- a/lib/private/Hooks/EmitterTrait.php
+++ b/lib/private/Hooks/EmitterTrait.php
@@ -43,7 +43,7 @@ trait EmitterTrait {
if (!isset($this->listeners[$eventName])) {
$this->listeners[$eventName] = [];
}
- if (array_search($callback, $this->listeners[$eventName], true) === false) {
+ if (!in_array($callback, $this->listeners[$eventName], true)) {
$this->listeners[$eventName][] = $callback;
}
}