Code Duplication    Length = 16-16 lines in 2 locations

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.

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

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