Code Duplication    Length = 16-16 lines in 2 locations

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

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

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

@@ 270-285 (lines=16) @@
267
   * @param \stdClass $entity
268
   *   The entity object.
269
   */
270
  protected function expandEntityProperties(\stdClass $entity) {
271
    // The created field may come in as a readable date, rather than a
272
    // timestamp.
273
    if (isset($entity->created) && !is_numeric($entity->created)) {
274
      $entity->created = strtotime($entity->created);
275
    }
276
277
    // Map human-readable node types to machine node types.
278
    $types = \node_type_get_types();
279
    foreach ($types as $type) {
280
      if ($entity->type == $type->name) {
281
        $entity->type = $type->type;
282
        continue;
283
      }
284
    }
285
  }
286
287
  /**
288
   * {@inheritdoc}