Code Duplication    Length = 10-10 lines in 2 locations

plugins/Search/src/Engine/Generic/GenericEngine.php 1 location

@@ 448-457 (lines=10) @@
445
     * @param \Cake\Datasource\EntityInterface $entity The entity
446
     * @return string
447
     */
448
    protected function _entityId(EntityInterface $entity)
449
    {
450
        $pk = [];
451
        $keys = $this->config('pk');
452
        $keys = !is_array($keys) ? [$keys] : $keys;
453
        foreach ($keys as $key) {
454
            $pk[] = $entity->get($key);
455
        }
456
457
        return implode(':', $pk);
458
    }
459
460
    /**

plugins/Eav/src/Model/Behavior/EavToolbox.php 1 location

@@ 248-257 (lines=10) @@
245
     * @param \Cake\Datasource\EntityInterface $entity The entity
246
     * @return string
247
     */
248
    public function getEntityId(EntityInterface $entity)
249
    {
250
        $pk = [];
251
        $keys = $this->_table->primaryKey();
252
        $keys = !is_array($keys) ? [$keys] : $keys;
253
        foreach ($keys as $key) {
254
            $pk[] = $entity->get($key);
255
        }
256
257
        return implode(':', $pk);
258
    }
259
260
    /**