Code Duplication    Length = 15-15 lines in 2 locations

app/Models/Task/Base/Task.php 1 location

@@ 979-993 (lines=15) @@
976
     *
977
     * @return int Hashcode
978
     */
979
    public function hashCode()
980
    {
981
        $validPk = null !== $this->getId();
982
983
        $validPrimaryKeyFKs = 0;
984
        $primaryKeyFKs = [];
985
986
        if ($validPk) {
987
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
988
        } elseif ($validPrimaryKeyFKs) {
989
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
990
        }
991
992
        return spl_object_hash($this);
993
    }
994
995
    /**
996
     * Returns the primary key for this object (row).

app/Models/User/Base/User.php 1 location

@@ 1211-1225 (lines=15) @@
1208
     *
1209
     * @return int Hashcode
1210
     */
1211
    public function hashCode()
1212
    {
1213
        $validPk = null !== $this->getId();
1214
1215
        $validPrimaryKeyFKs = 0;
1216
        $primaryKeyFKs = [];
1217
1218
        if ($validPk) {
1219
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
1220
        } elseif ($validPrimaryKeyFKs) {
1221
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
1222
        }
1223
1224
        return spl_object_hash($this);
1225
    }
1226
1227
    /**
1228
     * Returns the primary key for this object (row).