]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Verb.php
Merge pull request #12547 from MrPetovan/bug/12545-plink-zindex
[friendica.git] / src / Model / Verb.php
index 570c62d84090998f24b71057743626acb251887a..17145adfe71458667c07e0c804a9818fed49ac9d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -21,6 +21,7 @@
 
 namespace Friendica\Model;
 
+use Friendica\Database\Database;
 use Friendica\Database\DBA;
 
 class Verb
@@ -33,7 +34,7 @@ class Verb
         * @return integer verb id
         * @throws \Exception
         */
-       public static function getID(string $verb)
+       public static function getID(string $verb): int
        {
                if (empty($verb)) {
                        return 0;
@@ -44,7 +45,7 @@ class Verb
                        return $verb_record['id'];
                }
 
-               DBA::insert('verb', ['name' => $verb], true);
+               DBA::insert('verb', ['name' => $verb], Database::INSERT_IGNORE);
 
                return DBA::lastInsertId();
        }
@@ -55,7 +56,7 @@ class Verb
         * @param integer $id
         * @return string verb
         */
-       public static function getbyID(int $id)
+       public static function getByID(int $id): string
        {
                if (empty($id)) {
                        return '';