diff --git a/cron_example/cron_example.module b/cron_example/cron_example.module
index 651e759..8f53927 100644
--- a/cron_example/cron_example.module
+++ b/cron_example/cron_example.module
@@ -1,7 +1,7 @@
 <?php
 /**
  * @file
- *   Demonstrates use of the Cron API in Drupal - hook_cron().
+ * Demonstrates use of the Cron API in Drupal - hook_cron().
  */
 
 /**
@@ -83,7 +83,7 @@ function cron_example_queue_info() {
 /**
  * Queue worker for Queue 1.
  *
- * @param $item
+ * @param object $item
  *   Any object to be worked on.
  */
 function cron_example_queue_1_worker($item) {
@@ -93,7 +93,7 @@ function cron_example_queue_1_worker($item) {
 /**
  * Queue worker for Queue 2.
  *
- * @param $item
+ * @param object $item
  *   Any object to be worked on.
  */
 function cron_example_queue_2_worker($item) {
@@ -103,16 +103,28 @@ function cron_example_queue_2_worker($item) {
 /**
  * Simple reporter for the workers.
  *
- * @param $worker
- *   (integer) worker number
- * @param $item
- *   (object) the $item which was stored in the cron queue.
+ * @param integer $worker
+ *   Worker number.
+ * @param object $item
+ *   The $item which was stored in the cron queue.
  */
 function cron_example_queue_report_work($worker, $item) {
   if (!empty($GLOBALS['cron_example_show_status_message'])) {
-    drupal_set_message(t('Queue @worker worker processed item with sequence @sequence created at @time', array('@worker' => $worker, '@sequence' => $item->sequence, '@time' => date_iso8601($item->created))));
+    drupal_set_message(t('Queue @worker worker processed item with sequence @sequence created at @time',
+      array(
+        '@worker' => $worker,
+        '@sequence' => $item->sequence,
+        '@time' => date_iso8601($item->created))
+      )
+    );
   }
-  watchdog('cron_example', 'Queue @worker worker processed item with sequence @sequence created at @time', array('@worker' => $worker, '@sequence' => $item->sequence, '@time' => date_iso8601($item->created)));
+  watchdog('cron_example', 'Queue @worker worker processed item with sequence @sequence created at @time',
+    array(
+      '@worker' => $worker,
+      '@sequence' => $item->sequence,
+      '@time' => date_iso8601($item->created)
+    )
+  );
 }
 
 /**
diff --git a/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.php b/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.php
index db623d0..8097ee6 100644
--- a/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.php
+++ b/cron_example/lib/Drupal/cron_example/Forms/CronExampleForm.php
@@ -149,7 +149,7 @@ class CronExampleForm extends ConfigFormBase {
 
     $queue = \Drupal::queue($queue);
 
-    for ($i=1; $i <= $num_items; $i++) {
+    for ($i = 1; $i <= $num_items; $i++) {
       $item = new \stdClass();
       $item->created = time();
       $item->sequence = $i;
diff --git a/cron_example/lib/Drupal/cron_example/Tests/CronExampleTestCase.php b/cron_example/lib/Drupal/cron_example/Tests/CronExampleTestCase.php
index eeac6ec..2b61794 100644
--- a/cron_example/lib/Drupal/cron_example/Tests/CronExampleTestCase.php
+++ b/cron_example/lib/Drupal/cron_example/Tests/CronExampleTestCase.php
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * Test case for testing the cron example module.
@@ -8,16 +9,22 @@
  * @addtogroup cron_example
  * @{
  */
+
 namespace Drupal\cron_example\Tests;
+
 use Drupal\simpletest\WebTestBase;
 
 /**
  * cron_example test class
  */
 class CronExampleTestCase extends WebTestBase {
+
   public static $modules = array('cron_example');
-  protected $web_user;
+  protected $webUser;
 
+  /**
+   * {@inheritdoc}
+   */
   public static function getInfo() {
     return array(
       'name' => 'Cron example functionality',
@@ -27,21 +34,20 @@ class CronExampleTestCase extends WebTestBase {
   }
 
   /**
-   * Enable modules and create user with specific permissions.
+   * {@inheritdoc}
    */
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     // Create user. Search content permission granted for the search block to
     // be shown.
-    $this->web_user = $this->drupalCreateUser(array('administer site configuration'));
-    $this->drupalLogin($this->web_user);
+    $this->webUser = $this->drupalCreateUser(array('administer site configuration'));
+    $this->drupalLogin($this->webUser);
   }
 
   /**
-   * Login user, create an example node, and test block functionality through
-   * the admin and user interfaces.
+   * Create an example node, test block through admin and user interfaces.
    */
-  function testCronExampleBasic() {
+  public function testCronExampleBasic() {
     // Pretend that cron has never been run (even though simpletest seems to
     // run it once...)
     variable_set('cron_example_next_execution', 0);
@@ -62,7 +68,6 @@ class CronExampleTestCase extends WebTestBase {
     $this->drupalPostForm(NULL, $post, t('Run cron now'));
     $this->assertNoText(t('cron_example executed at'));
 
-
     $this->assertText(t('There are currently 0 items in queue 1 and 0 items in queue 2'));
     $post = array(
       'num_items' => 5,
@@ -82,6 +87,7 @@ class CronExampleTestCase extends WebTestBase {
     $this->assertPattern('/Queue 1 worker processed item with sequence 5 /');
     $this->assertPattern('/Queue 2 worker processed item with sequence 100 /');
   }
+
 }
 
 /**
diff --git a/dbtng_example/dbtng_example.module b/dbtng_example/dbtng_example.module
index cdc8646..c2a3c5e 100644
--- a/dbtng_example/dbtng_example.module
+++ b/dbtng_example/dbtng_example.module
@@ -11,6 +11,7 @@
  * @link database Database abstraction layer documentation @endlink and
  * at @link http://drupal.org/node/310069 @endlink.
  */
+
 /**
  * @defgroup dbtng_example Example: Database (DBTNG)
  * @ingroup examples
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php
index 4156ec9..27b0d9d 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php
@@ -14,14 +14,14 @@ use Drupal\Core\Form\FormInterface;
  */
 class DBTNGExampleAddForm implements FormInterface {
 
-  function getFormID() {
+  public function getFormID() {
     return 'dbtng_add_form';
   }
 
   /**
    * Prepare a simple form to add an entry, with all the interesting fields.
    */
-  function buildForm(array $form, array &$form_state) {
+  public function buildForm(array $form, array &$form_state) {
     $form = array();
 
     $form['add'] = array(
@@ -55,7 +55,7 @@ class DBTNGExampleAddForm implements FormInterface {
   /**
    * Validate the form.
    */
-  function validateForm(array &$form, array &$form_state) {
+  public function validateForm(array &$form, array &$form_state) {
     // Confirm that age is numeric.
     if (!intval($form_state['values']['age'])) {
       form_set_error('age', t('Age needs to be a number'));
@@ -65,7 +65,7 @@ class DBTNGExampleAddForm implements FormInterface {
   /**
    * Submit handler for 'add entry' form.
    */
-  function submitForm(array &$form, array &$form_state) {
+  public function submitForm(array &$form, array &$form_state) {
     // Gather the current user so the new record has ownership.
     $account = \Drupal::currentUser();
     // Save the submitted entry.
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php
index cd6d173..8e7c9d4 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php
@@ -50,8 +50,21 @@ class DBTNGExampleController {
         $rows[] = array_map('check_plain', $entry);
       }
       // Make a table for them.
-      $header = array(t('Id'), t('Created by'), t('Name'), t('Surname'), t('Age'));
-      $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'dbtng-example-advanced-list')));
+      $header = array(
+        t('Id'),
+        t('Created by'),
+        t('Name'),
+        t('Surname'),
+        t('Age')
+      );
+      $output .= theme('table', array(
+        'header' => $header,
+        'rows' => $rows,
+        'attributes' => array(
+          'id' => 'dbtng-example-advanced-list'
+         )
+        )
+      );
     }
     else {
       drupal_set_message(t('No entries meet the filter criteria (Name = "John" and Age > 18).'));
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php
index ce1987c..53db080 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php
@@ -1,5 +1,10 @@
 <?php
 
+/**
+ * @file
+ * Contains \Drupal\dbtng_example\DBTNGExampleStorage
+ */
+
 namespace Drupal\dbtng_example;
 
 class DBTNGExampleStorage {
@@ -14,12 +19,12 @@ class DBTNGExampleStorage {
    * and terminate your application if the exception is not handled, it is best
    * to employ try/catch.
    *
-   * @param $entry
+   * @param array $entry
    *   An array containing all the fields of the database record.
    *
    * @see db_insert()
    */
-  static function insert($entry) {
+  public static function insert($entry) {
     $return_value = NULL;
     try {
       $return_value = db_insert('dbtng_example')
@@ -37,22 +42,25 @@ class DBTNGExampleStorage {
   /**
    * Update an entry in the database.
    *
-   * @param $entry
+   * @param array $entry
    *   An array containing all the fields of the item to be updated.
    *
+   * @return integer
+   * 
    * @see db_update()
    */
-  static function update($entry) {
+  public static function update($entry) {
     try {
       // db_update()...->execute() returns the number of rows updated.
       $count = db_update('dbtng_example')
           ->fields($entry)
           ->condition('pid', $entry['pid'])
           ->execute();
-    } catch (Exception $e) {
+    }
+    catch (Exception $e) {
       drupal_set_message(t('db_update failed. Message = %message, query= %query', array(
             '%message' => $e->getMessage(),
-            '%query' => $e->query_string
+            '%query' => $e->query_string,
           )), 'error');
     }
     return $count;
@@ -67,7 +75,7 @@ class DBTNGExampleStorage {
    *
    * @see db_delete()
    */
-  static function delete($entry) {
+  public static function delete($entry) {
     db_delete('dbtng_example')
         ->condition('pid', $entry['pid'])
         ->execute();
@@ -97,8 +105,8 @@ class DBTNGExampleStorage {
    * @endcode
    *
    * But for more dynamic queries, Drupal provides the db_select()
-   * API method, so there are several ways to perform the same SQL query.
-   * See the @link http://drupal.org/node/310075 handbook page on dynamic queries. @endlink
+   * API method, so there are several ways to perform the same SQL query. See
+   * the @link http://drupal.org/node/310075 handbook page on dynamic queries. @endlink
    *
    * @code
    *   // SELECT * FROM {dbtng_example} WHERE uid = 0 AND name = 'John'
@@ -135,7 +143,8 @@ class DBTNGExampleStorage {
    *
    * @param $entry
    *   An array containing all the fields used to search the entries in the table.
-   * @return
+   *
+   * @return object
    *   An object containing the loaded entries if found.
    *
    * @see db_select()
@@ -144,7 +153,7 @@ class DBTNGExampleStorage {
    * @see http://drupal.org/node/310075
    *
    */
-  static function load($entry = array()) {
+  public static function load($entry = array()) {
     // Read all fields from the dbtng_example table.
     $select = db_select('dbtng_example', 'example');
     $select->fields('example');
@@ -157,13 +166,15 @@ class DBTNGExampleStorage {
     return $select->execute()->fetchAll();
   }
 
-  /*
+  /**
+   * Load dbtng_example records joined with user records.
+   *
    * DBTNG also helps processing queries that return several rows, providing the
    * found objects in the same query execution call.
    *
    * This function queries the database using a JOIN between users table and the
-   * example entries, to provide the username that created the entry, and creates
-   * a table with the results, processing each row.
+   * example entries, to provide the username that created the entry, and
+   * creates a table with the results, processing each row.
    *
    * SELECT
    *  e.pid as pid, e.name as name, e.surname as surname, e.age as age
@@ -178,8 +189,7 @@ class DBTNGExampleStorage {
    * @see db_select()
    * @see http://drupal.org/node/310075
    */
-
-  static function advancedLoad() {
+  public static function advancedLoad() {
     $select = db_select('dbtng_example', 'e');
     // Join the users table, so we can get the entry creator's username.
     $select->join('users', 'u', 'e.uid = u.uid');
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleUpdateForm.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleUpdateForm.php
index db4a416..85bf417 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleUpdateForm.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleUpdateForm.php
@@ -14,14 +14,17 @@ use Drupal\Core\Form\FormInterface;
  */
 class DBTNGExampleUpdateForm implements FormInterface {
 
-  function getFormID() {
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormID() {
     return 'dbtng_update_form';
   }
 
   /**
    * Sample UI to update a record.
    */
-  function buildForm(array $form, array &$form_state) {
+  public function buildForm(array $form, array &$form_state) {
     $form = array(
       '#prefix' => '<div id="updateform">',
       '#suffix' => '</div>',
@@ -37,7 +40,14 @@ class DBTNGExampleUpdateForm implements FormInterface {
     }
 
     foreach ($entries as $entry) {
-      $options[$entry->pid] = t('@pid: @name @surname (@age)', array('@pid' => $entry->pid, '@name' => $entry->name, '@surname' => $entry->surname, '@age' => $entry->age));
+      $options[$entry->pid] = t('@pid: @name @surname (@age)',
+        array(
+          '@pid' => $entry->pid,
+          '@name' => $entry->name,
+          '@surname' => $entry->surname,
+          '@age' => $entry->age,
+        )
+      );
       $keyed_entries[$entry->pid] = $entry;
     }
     $default_entry = !empty($form_state['values']['pid']) ? $keyed_entries[$form_state['values']['pid']] : $entries[0];
@@ -88,7 +98,7 @@ class DBTNGExampleUpdateForm implements FormInterface {
    *
    * When the pid changes, populates the defaults from the database in the form.
    */
-  function updateCallback(array $form, array $form_state) {
+  public function updateCallback(array $form, array $form_state) {
     $entry = $form_state['entries'][$form_state['values']['pid']];
     // Setting the #value of items is the only way I was able to figure out
     // to get replaced defaults on these items. #default_value will not do it
@@ -102,7 +112,7 @@ class DBTNGExampleUpdateForm implements FormInterface {
   /**
    * Validating the form.
    */
-  function validateForm(array &$form, array &$form_state) {
+  public function validateForm(array &$form, array &$form_state) {
     // Confirm that age is numeric.
     if (!intval($form_state['values']['age'])) {
       form_set_error('age', t('Age needs to be a number'));
@@ -112,7 +122,7 @@ class DBTNGExampleUpdateForm implements FormInterface {
   /**
    * Submit handler for 'update entry' form.
    */
-  function submitForm(array &$form, array &$form_state) {
+  public function submitForm(array &$form, array &$form_state) {
     // Gather the current user so the new record has ownership.
     $account = \Drupal::currentUser();
     // Save the submitted entry.
@@ -124,7 +134,12 @@ class DBTNGExampleUpdateForm implements FormInterface {
       'uid' => $account->id(),
     );
     $count = DBTNGExampleStorage::update($entry);
-    drupal_set_message(t('Updated entry @entry (@count row updated)', array('@count' => $count, '@entry' => print_r($entry, TRUE))));
+    drupal_set_message(t('Updated entry @entry (@count row updated)',
+      array(
+        '@count' => $count,
+        '@entry' => print_r($entry, TRUE),
+      )
+    ));
   }
 
 }
diff --git a/dbtng_example/lib/Drupal/dbtng_example/Tests/DBTNGExampleTest.php b/dbtng_example/lib/Drupal/dbtng_example/Tests/DBTNGExampleTest.php
index 10c14b2..66af291 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/Tests/DBTNGExampleTest.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/Tests/DBTNGExampleTest.php
@@ -41,14 +41,22 @@ class DBTNGExampleTest extends WebTestBase {
   /**
    * Test the UI.
    */
-  function testUI() {
+  public function testUI() {
     // Test the basic list.
     $this->drupalGet('examples/dbtng');
     $this->assertPattern("/John[td\/<>\w]+Doe/", "Text 'John Doe' found in table");
 
-    //Test the add tab.
+    // Test the add tab.
     // Add the new entry.
-    $this->drupalPostForm('examples/dbtng/add', array('name' => 'Some', 'surname' => 'Anonymous', 'age' => 33), t('Add'));
+    $this->drupalPostForm(
+      'examples/dbtng/add',
+      array(
+        'name' => 'Some',
+        'surname' => 'Anonymous',
+        'age' => 33,
+      ),
+      t('Add')
+    );
     // Now find the new entry.
     $this->drupalGet('examples/dbtng');
     $this->assertPattern("/Some[td\/<>\w]+Anonymous/", "Text 'Some Anonymous' found in table");
