From 870fe20acc90cbfb89bf710f441d62f8bcf92f9d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 22:36:03 +0100 Subject: Use $var[] = $a instead of array_push - 2x faster Signed-off-by: Morris Jobke --- lib/private/Activity/Manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/Activity') diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php index 792dea4cff5..1b64fa59a91 100644 --- a/lib/private/Activity/Manager.php +++ b/lib/private/Activity/Manager.php @@ -231,7 +231,7 @@ class Manager implements IManager { * @param \Closure $callable */ public function registerConsumer(\Closure $callable) { - array_push($this->consumersClosures, $callable); + $this->consumersClosures[] = $callable; $this->consumers = []; } @@ -244,7 +244,7 @@ class Manager implements IManager { * @param \Closure $callable */ public function registerExtension(\Closure $callable) { - array_push($this->extensionsClosures, $callable); + $this->extensionsClosures[] = $callable; $this->extensions = []; } -- cgit v1.2.3