]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Addon.php
Funkwhale context file moved
[friendica.git] / src / Core / Addon.php
index f6d0d49740f5be46b14de93b52b78396895b0dd4..37ef335a47d9a97c3a5967bfd60111e7bcfd18ed 100644 (file)
@@ -124,7 +124,7 @@ class Addon
         * @return void
         * @throws \Exception
         */
-       public static function uninstall($addon)
+       public static function uninstall(string $addon)
        {
                $addon = Strings::sanitizeFilePathItem($addon);
 
@@ -149,7 +149,7 @@ class Addon
         * @return bool
         * @throws \Exception
         */
-       public static function install($addon)
+       public static function install(string $addon): bool
        {
                $addon = Strings::sanitizeFilePathItem($addon);
 
@@ -185,6 +185,8 @@ class Addon
 
        /**
         * reload all updated addons
+        *
+        * @return void
         */
        public static function reload()
        {
@@ -222,7 +224,7 @@ class Addon
         * @return array with the addon information
         * @throws \Exception
         */
-       public static function getInfo($addon)
+       public static function getInfo(string $addon): array
        {
                $addon = Strings::sanitizeFilePathItem($addon);
 
@@ -287,7 +289,7 @@ class Addon
         * @param string $addon
         * @return boolean
         */
-       public static function isEnabled($addon)
+       public static function isEnabled(string $addon): bool
        {
                return in_array($addon, self::$addons);
        }
@@ -297,7 +299,7 @@ class Addon
         *
         * @return array
         */
-       public static function getEnabledList()
+       public static function getEnabledList(): array
        {
                return self::$addons;
        }
@@ -308,7 +310,7 @@ class Addon
         * @return array
         * @throws \Exception
         */
-       public static function getVisibleList()
+       public static function getVisibleList(): array
        {
                $visible_addons = [];
                $stmt = DBA::select('addon', ['name'], ['hidden' => false, 'installed' => true]);