Code Duplication    Length = 15-15 lines in 3 locations

application/modules/xbanners/models/Base/BannerImage.php 1 location

@@ 1472-1486 (lines=15) @@
1469
     *
1470
     * @return int Hashcode
1471
     */
1472
    public function hashCode()
1473
    {
1474
        $validPk = null !== $this->getId();
1475
1476
        $validPrimaryKeyFKs = 0;
1477
        $primaryKeyFKs = [];
1478
1479
        if ($validPk) {
1480
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
1481
        } elseif ($validPrimaryKeyFKs) {
1482
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
1483
        }
1484
1485
        return spl_object_hash($this);
1486
    }
1487
1488
    /**
1489
     * Returns the primary key for this object (row).

application/modules/xbanners/models/Base/Banners.php 1 location

@@ 1243-1257 (lines=15) @@
1240
     *
1241
     * @return int Hashcode
1242
     */
1243
    public function hashCode()
1244
    {
1245
        $validPk = null !== $this->getId();
1246
1247
        $validPrimaryKeyFKs = 0;
1248
        $primaryKeyFKs = [];
1249
1250
        if ($validPk) {
1251
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
1252
        } elseif ($validPrimaryKeyFKs) {
1253
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
1254
        }
1255
1256
        return spl_object_hash($this);
1257
    }
1258
1259
    /**
1260
     * Returns the primary key for this object (row).

application/modules/mod_link/models/Base/PageLink.php 1 location

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