Code Duplication    Length = 16-16 lines in 2 locations

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

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

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

@@ 258-273 (lines=16) @@
255
   * @param object $entity
256
   *   The entity object.
257
   */
258
  protected function expandEntityProperties(\stdClass $entity) {
259
    // The created field may come in as a readable date, rather than a
260
    // timestamp.
261
    if (isset($entity->created) && !is_numeric($entity->created)) {
262
      $entity->created = strtotime($entity->created);
263
    }
264
265
    // Map human-readable node types to machine node types.
266
    $types = \node_type_get_types();
267
    foreach ($types as $type) {
268
      if ($entity->type == $type->name) {
269
        $entity->type = $type->type;
270
        continue;
271
      }
272
    }
273
  }
274
275
  /**
276
   * {@inheritdoc}