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

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