]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/api/ApiUtils.php
Add strict types for bookmarks management
[github/shaarli/Shaarli.git] / application / api / ApiUtils.php
index 4a6326f0f7dccc38651f6b8daf979b896cbc1c36..eb1ca9bc2b6230e944350759c33386acced2770f 100644 (file)
@@ -89,12 +89,12 @@ class ApiUtils
      * If no URL is provided, it will generate a local note URL.
      * If no title is provided, it will use the URL as title.
      *
-     * @param array  $input          Request Link.
-     * @param bool   $defaultPrivate Request Link.
+     * @param array|null  $input          Request Link.
+     * @param bool        $defaultPrivate Setting defined if a bookmark is private by default.
      *
      * @return Bookmark instance.
      */
-    public static function buildBookmarkFromRequest($input, $defaultPrivate): Bookmark
+    public static function buildBookmarkFromRequest(?array $input, bool $defaultPrivate): Bookmark
     {
         $bookmark = new Bookmark();
         $url = ! empty($input['url']) ? cleanup_url($input['url']) : '';