From c3713a3e8881c5f2d41f9759c6456ab52ee30b0a Mon Sep 17 00:00:00 2001
From: Dave Hall <dave.hall@skwashd.com>
Date: Sat, 16 Nov 2013 21:59:28 +1100
Subject: [PATCH] Issue #2137187 by skwashd: Fix (most) issues found by
 coder-review

---
 EntityDependencyIterator.inc |  7 ++++++-
 entity_dependency.core.inc   |  4 ++--
 entity_dependency.module     |  5 +++++
 entity_dependency.test       | 13 ++++++++++++-
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/EntityDependencyIterator.inc b/EntityDependencyIterator.inc
index 4bb76ab..d8247ed 100644
--- a/EntityDependencyIterator.inc
+++ b/EntityDependencyIterator.inc
@@ -1,6 +1,11 @@
 <?php
 
 /**
+ * @file
+ * Entity Dependency classes.
+ */
+
+/**
  * Wrapper class around the SPL RecursiveIteratorIterator.
  */
 class EntityDependencyIteratorIterator extends RecursiveIteratorIterator {}
@@ -84,7 +89,7 @@ class EntityDependencyIterator implements RecursiveIterator {
    * @param array $parent
    *   The parent array of the current entity.
    *
-   * @see entity_dependency_iterator().
+   * @see entity_dependency_iterator()
    */
   public function __construct($entities, &$parent = NULL) {
     $this->entities = $entities;
diff --git a/entity_dependency.core.inc b/entity_dependency.core.inc
index e959296..97fa055 100644
--- a/entity_dependency.core.inc
+++ b/entity_dependency.core.inc
@@ -49,7 +49,7 @@ function comment_entity_dependencies($entity, $entity_type) {
 }
 
 /**
- * Implements hook_entity_dependencies()
+ * Implements hook_entity_dependencies().
  */
 function taxonomy_entity_dependencies($entity, $entity_type) {
   if ($entity_type == 'taxonomy_term') {
@@ -67,7 +67,7 @@ function taxonomy_entity_dependencies($entity, $entity_type) {
  */
 function field_entity_dependencies($entity, $entity_type) {
   $dependencies = array();
-  list(,, $bundle_name) = entity_extract_ids($entity_type, $entity);
+  list(, , $bundle_name) = entity_extract_ids($entity_type, $entity);
   $instances = field_info_instances($entity_type, $bundle_name);
 
   foreach ($instances as $field_name => $instance) {
diff --git a/entity_dependency.module b/entity_dependency.module
index 982d9ff..435e2c2 100644
--- a/entity_dependency.module
+++ b/entity_dependency.module
@@ -1,6 +1,11 @@
 <?php
 
 /**
+ * @file
+ * Entity Depedendency module functions.
+ */
+
+/**
  * Include core hook implementations.
  */
 module_load_include('inc', 'entity_dependency', 'entity_dependency.core');
diff --git a/entity_dependency.test b/entity_dependency.test
index b36f5d3..326f4c1 100644
--- a/entity_dependency.test
+++ b/entity_dependency.test
@@ -10,6 +10,9 @@
  */
 class EntityDependencyTestCase extends DrupalWebTestCase {
 
+  /**
+   * {@inheritdoc}
+   */
   public static function getInfo() {
     return array(
       'name' => 'Entity dependency iterator',
@@ -18,6 +21,9 @@ class EntityDependencyTestCase extends DrupalWebTestCase {
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
   function setUp() {
     parent::setUp('entity_dependency');
   }
@@ -51,6 +57,11 @@ class EntityDependencyTestCase extends DrupalWebTestCase {
     return $term;
   }
 
+  /**
+   * Checks that entities are in the correct order.
+   *
+   * @todo Document me properly.
+   */
   function assertCorrectEntityOrder($entity, $correct_type, $entity_id_name, $correct_id) {
     $test = $entity->__metadata['type'] == $correct_type && $entity->{$entity_id_name} == $correct_id;
     $placeholders = array('%entity_type' => $entity->__metadata['type'], '%entity_id' => $entity->{$entity_id_name});
@@ -194,7 +205,7 @@ class EntityDependencyTestCase extends DrupalWebTestCase {
       array('id' => $node2->nid, 'type' => 'node'),
       array('id' => $node3->nid, 'type' => 'node'),
     );
- 
+
     $i = 0;
     foreach ($this->getIterator() as $entity) {
       switch ($i) {
-- 
1.8.2.3

