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

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