]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Verb.php
Changed to null-coalscing style (??) as sugguested by @MrPetovan
[friendica.git] / src / Model / Verb.php
index 570c62d84090998f24b71057743626acb251887a..714cae4209fd507669aff57ee8f1d5fef9b8ceef 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
@@ -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)
        {
                if (empty($id)) {
                        return '';