diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-25 22:36:03 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-25 22:36:03 +0100 |
commit | 870fe20acc90cbfb89bf710f441d62f8bcf92f9d (patch) | |
tree | 5550c1b7a663c3b440d2566c8aaf3b87da0131bf /lib/private/AppFramework | |
parent | b9bbb894f8b01e000bb5e3a8a82db7bebad3ea00 (diff) | |
download | nextcloud-server-870fe20acc90cbfb89bf710f441d62f8bcf92f9d.tar.gz nextcloud-server-870fe20acc90cbfb89bf710f441d62f8bcf92f9d.zip |
Use $var[] = $a instead of array_push - 2x faster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 2 | ||||
-rw-r--r-- | lib/private/AppFramework/Middleware/MiddlewareDispatcher.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 94c725f3fbc..d9e82819d14 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -335,7 +335,7 @@ class DIContainer extends SimpleContainer implements IAppContainer { * @return boolean|null */ public function registerMiddleWare($middleWare) { - array_push($this->middleWares, $middleWare); + $this->middleWares[] = $middleWare; } /** diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php index 306b8095a97..60d2ae8b5c9 100644 --- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php +++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php @@ -63,7 +63,7 @@ class MiddlewareDispatcher { * @param Middleware $middleWare the middleware which will be added */ public function registerMiddleware(Middleware $middleWare){ - array_push($this->middlewares, $middleWare); + $this->middlewares[] = $middleWare; } |