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

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