Code Duplication    Length = 9-9 lines in 3 locations

packages/core/src/Models/Task/Map/TaskTableMap.php 1 location

@@ 164-172 (lines=9) @@
161
     *
162
     * @return string The primary key hash of the row
163
     */
164
    public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
165
    {
166
        // If the PK cannot be derived from the row, return NULL.
167
        if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
168
            return null;
169
        }
170
171
        return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
172
    }
173
174
    /**
175
     * Retrieves the primary key from the DB resultset row

packages/core/src/Models/User/Map/UserTableMap.php 1 location

@@ 201-209 (lines=9) @@
198
     *
199
     * @return string The primary key hash of the row
200
     */
201
    public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
202
    {
203
        // If the PK cannot be derived from the row, return NULL.
204
        if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
205
            return null;
206
        }
207
208
        return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
209
    }
210
211
    /**
212
     * Retrieves the primary key from the DB resultset row

packages/selfprice/src/Models/Selfprice/Map/SelfpriceTableMap.php 1 location

@@ 170-178 (lines=9) @@
167
     *
168
     * @return string The primary key hash of the row
169
     */
170
    public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
171
    {
172
        // If the PK cannot be derived from the row, return NULL.
173
        if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
174
            return null;
175
        }
176
177
        return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
178
    }
179
180
    /**
181
     * Retrieves the primary key from the DB resultset row