Code Duplication    Length = 5-6 lines in 2 locations

src/EcDataUtils.php 2 locations

@@ 255-260 (lines=6) @@
252
      $properties[$entity_type] = array();
253
254
      // Loop over only the properties of the entity type.
255
      foreach ($info['properties'] as $key => $value) {
256
        // If the value specifies a schema field...
257
        if (!empty($value['schema field'])) {
258
          $properties[$entity_type][$key] = $value['schema field'];
259
        }
260
      }
261
262
      // If the entity type supports revisions, add revision and log to the
263
      // array of acceptable properties.
@@ 296-300 (lines=5) @@
293
      // Loop over the bundles info to inspect their fields.
294
      foreach ($info['bundles'] as $bundle_name => $bundle_info) {
295
        // Loop over the properties on the bundle to find field information.
296
        foreach ($bundle_info['properties'] as $key => $value) {
297
          if (!empty($value['field'])) {
298
            $fields[$entity_type][$bundle_name][$key] = $value['type'];
299
          }
300
        }
301
      }
302
    }
303