]> git.mxchange.org Git - friendica.git/commitdiff
Refactor dependency for $basepath
authorArt4 <art4@wlabs.de>
Mon, 23 Dec 2024 14:22:52 +0000 (14:22 +0000)
committerArt4 <art4@wlabs.de>
Mon, 23 Dec 2024 14:22:52 +0000 (14:22 +0000)
static/dependencies.config.php

index 60a63ff63408809b3c1f4c162ba47d969353d6c3..67c7194c30568aa2a88045ac2d9b707c8f74b92a 100644 (file)
@@ -36,12 +36,10 @@ use Friendica\Model\Log\ParsedLogIterator;
 use Friendica\Network;
 use Friendica\Util;
 
-return (function(array $getVars, array $serverVars): array {
-       /**
-        * @var string $basepath The base path of the Friendica installation without trailing slash
-        */
-       $basepath = dirname(__FILE__, 2);
-
+/**
+ * @param string $basepath The base path of the Friendica installation without trailing slash
+ */
+return (function(string $basepath, array $getVars, array $serverVars): array {
        return [
        '*'                             => [
                // marks all class result as shared for other creations, so there's just
@@ -310,4 +308,8 @@ return (function(array $getVars, array $serverVars): array {
                ],
        ],
        ];
-})($_GET, $_SERVER);
+})(
+       dirname(__FILE__, 2),
+       $_GET,
+       $_SERVER
+);