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/core/models/Base/Route.php 1 location

@@ 1190-1204 (lines=15) @@
1187
     *
1188
     * @return int Hashcode
1189
     */
1190
    public function hashCode()
1191
    {
1192
        $validPk = null !== $this->getId();
1193
1194
        $validPrimaryKeyFKs = 0;
1195
        $primaryKeyFKs = [];
1196
1197
        if ($validPk) {
1198
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
1199
        } elseif ($validPrimaryKeyFKs) {
1200
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
1201
        }
1202
1203
        return spl_object_hash($this);
1204
    }
1205
1206
    /**
1207
     * Returns the primary key for this object (row).