Code Duplication    Length = 16-16 lines in 2 locations

src/Drupal/Driver/Cores/Drupal7.php 1 location

@@ 322-337 (lines=16) @@
319
   * @param \stdClass $entity
320
   *   The entity object.
321
   */
322
  protected function expandEntityProperties(\stdClass $entity) {
323
    // The created field may come in as a readable date, rather than a
324
    // timestamp.
325
    if (isset($entity->created) && !is_numeric($entity->created)) {
326
      $entity->created = strtotime($entity->created);
327
    }
328
329
    // Map human-readable node types to machine node types.
330
    $types = \node_type_get_types();
331
    foreach ($types as $type) {
332
      if ($entity->type == $type->name) {
333
        $entity->type = $type->type;
334
        continue;
335
      }
336
    }
337
  }
338
339
  /**
340
   * {@inheritdoc}

src/Drupal/Driver/Cores/Drupal6.php 1 location

@@ 296-311 (lines=16) @@
293
   * @param \stdClass $entity
294
   *   The entity object.
295
   */
296
  protected function expandEntityProperties(\stdClass $entity) {
297
    // The created field may come in as a readable date, rather than a
298
    // timestamp.
299
    if (isset($entity->created) && !is_numeric($entity->created)) {
300
      $entity->created = strtotime($entity->created);
301
    }
302
303
    // Map human-readable node types to machine node types.
304
    $types = node_get_types();
305
    foreach ($types as $type) {
306
      if ($entity->type == $type->name) {
307
        $entity->type = $type->type;
308
        continue;
309
      }
310
    }
311
  }
312
313
  /**
314
   * Load vocabularies, optional by VIDs.