diff --git a/block_example/lib/Drupal/block_example/Tests/BlockExampleTest.php b/block_example/lib/Drupal/block_example/Tests/BlockExampleTest.php
index 5ed296c..fb754d8 100644
--- a/block_example/lib/Drupal/block_example/Tests/BlockExampleTest.php
+++ b/block_example/lib/Drupal/block_example/Tests/BlockExampleTest.php
@@ -72,7 +72,8 @@ class BlockExampleTest extends WebTestBase {
     );
     $this->drupalPlaceBlock('example_empty', $example_empty, $theme_name);
 
-    // Verify that blocks are there. Empty block will not be shown, because it is empty.
+    // Verify that blocks are there. Empty block will not be shown, because it
+    // is empty.
     $this->drupalGet('/');
     $this->assertRaw($example_configurable_text['label'], 'Block configurable test not found.');
     $this->assertNoRaw($example_uppercase['label'], 'Block uppercase with normal label not found.');
@@ -85,11 +86,14 @@ class BlockExampleTest extends WebTestBase {
     $edit = array(
       'settings[block_example_string_text]' => $this->randomName(),
     );
-    $this->drupalPostForm('admin/structure/block/manage/' . $theme_name . '.block_example_example_configurable_text', $edit, t('Save block'));
+    $this->drupalPostForm('admin/structure/block/manage/' .
+      $theme_name .
+      '.block_example_example_configurable_text', $edit, t('Save block'));
 
     // Verify that new content is shown.
     $this->drupalGet('/');
-    $this->assertRaw($edit['settings[block_example_string_text]'], 'Content of configurable text block successfully verified.');
+    $this->assertRaw($edit['settings[block_example_string_text]'],
+      'Content of configurable text block successfully verified.');
     */
   }
 
diff --git a/cron_example/cron_example.module b/cron_example/cron_example.module
index 8f53927..bad85d6 100644
--- a/cron_example/cron_example.module
+++ b/cron_example/cron_example.module
@@ -103,7 +103,7 @@ function cron_example_queue_2_worker($item) {
 /**
  * Simple reporter for the workers.
  *
- * @param integer $worker
+ * @param int $worker
  *   Worker number.
  * @param object $item
  *   The $item which was stored in the cron queue.
@@ -114,7 +114,7 @@ function cron_example_queue_report_work($worker, $item) {
       array(
         '@worker' => $worker,
         '@sequence' => $item->sequence,
-        '@time' => date_iso8601($item->created))
+        '@time' => date_iso8601($item->created)),
       )
     );
   }
@@ -122,7 +122,7 @@ function cron_example_queue_report_work($worker, $item) {
     array(
       '@worker' => $worker,
       '@sequence' => $item->sequence,
-      '@time' => date_iso8601($item->created)
+      '@time' => date_iso8601($item->created),
     )
   );
 }
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php
index 27b0d9d..4148c14 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleAddForm.php
@@ -14,6 +14,9 @@ use Drupal\Core\Form\FormInterface;
  */
 class DBTNGExampleAddForm implements FormInterface {
 
+  /**
+   * {@inheritdoc}
+   */
   public function getFormID() {
     return 'dbtng_add_form';
   }
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php
index 8e7c9d4..58f9987 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleController.php
@@ -55,14 +55,14 @@ class DBTNGExampleController {
         t('Created by'),
         t('Name'),
         t('Surname'),
-        t('Age')
+        t('Age'),
       );
       $output .= theme('table', array(
         'header' => $header,
         'rows' => $rows,
         'attributes' => array(
-          'id' => 'dbtng-example-advanced-list'
-         )
+          'id' => 'dbtng-example-advanced-list',
+         ),
         )
       );
     }
diff --git a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php
index 53db080..10487f8 100644
--- a/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php
+++ b/dbtng_example/lib/Drupal/dbtng_example/DBTNGExampleStorage.php
@@ -30,10 +30,11 @@ class DBTNGExampleStorage {
       $return_value = db_insert('dbtng_example')
           ->fields($entry)
           ->execute();
-    } catch (Exception $e) {
+    }
+    catch (Exception $e) {
       drupal_set_message(t('db_insert failed. Message = %message, query= %query', array(
             '%message' => $e->getMessage(),
-            '%query' => $e->query_string
+            '%query' => $e->query_string,
           )), 'error');
     }
     return $return_value;
@@ -45,7 +46,8 @@ class DBTNGExampleStorage {
    * @param array $entry
    *   An array containing all the fields of the item to be updated.
    *
-   * @return integer
+   * @return int
+   *   The number of updated rows.
    * 
    * @see db_update()
    */
@@ -141,8 +143,9 @@ class DBTNGExampleStorage {
    *     ->execute();
    * @endcode
    *
-   * @param $entry
-   *   An array containing all the fields used to search the entries in the table.
+   * @param array $entry
+   *   An array containing all the fields used to search the entries in the
+   *   table.
    *
    * @return object
    *   An object containing the loaded entries if found.
@@ -151,7 +154,6 @@ class DBTNGExampleStorage {
    * @see db_query()
    * @see http://drupal.org/node/310072
    * @see http://drupal.org/node/310075
-   *
    */
   public static function load($entry = array()) {
     // Read all fields from the dbtng_example table.
diff --git a/js_example/lib/Drupal/js_example/Controller/JsExampleController.php b/js_example/lib/Drupal/js_example/Controller/JsExampleController.php
index a3e3a4c..359870e 100755
--- a/js_example/lib/Drupal/js_example/Controller/JsExampleController.php
+++ b/js_example/lib/Drupal/js_example/Controller/JsExampleController.php
@@ -15,17 +15,18 @@ namespace Drupal\js_example\Controller;
 class JsExampleController {
 
   /**
-   * js_example info page.
+   * Example info page.
    */
   public function info() {
-    $build ['content'] = array(
-      '#markup' =>
-'<p>Drupal includes jQuery and jQuery UI.</p>
+    $build['content'] = array(
+      '#markup' => <<<INFOMARKUP
+<p>Drupal includes jQuery and jQuery UI.</p>
 <p>We have two examples of using these:</p>
 <ol>
 <li>An accordion-style section reveal effect. This demonstrates calling a jQuery UI function using Drupal&#39;s rendering system.</li>
 <li>Sorting according to numeric &#39;weight.&#39; This demonstrates attaching your own JavaScript code to individual page elements using Drupal&#39;s rendering system.</li>
-</ol>',
+</ol>
+INFOMARKUP
     );
     return $build;
   }
@@ -41,7 +42,7 @@ class JsExampleController {
       'green' => 3,
       'brown' => 45,
       'black' => 5,
-      'purple' => 60
+      'purple' => 60,
     );
 
     // Start building the content.
@@ -50,34 +51,34 @@ class JsExampleController {
     $build['content'] = array(
       '#markup' => '<div id="js-weights"></div>'
     );
-    // Attach a CSS file to show which line is output by which script
+    // Attach a CSS file to show which line is output by which script.
     $build['#attached']['css'] = array(drupal_get_path('module', 'js_example') .
       '/css/jsweights.css');
     // Attach some javascript files.
     $build['#attached']['js'] = array(
       array(
         'data' => drupal_get_path('module', 'js_example') . '/js/red.js',
-        'weight' => $weights['red']
+        'weight' => $weights['red'],
       ),
       array(
         'data' => drupal_get_path('module', 'js_example') . '/js/blue.js',
-        'weight' => $weights['blue']
+        'weight' => $weights['blue'],
       ),
       array(
         'data' => drupal_get_path('module', 'js_example') . '/js/green.js',
-        'weight' => $weights['green']
+        'weight' => $weights['green'],
       ),
       array(
         'data' => drupal_get_path('module', 'js_example') . '/js/brown.js',
-        'weight' => $weights['brown']
+        'weight' => $weights['brown'],
       ),
       array(
         'data' => drupal_get_path('module', 'js_example') . '/js/black.js',
-        'weight' => $weights['black']
+        'weight' => $weights['black'],
       ),
       array(
         'data' => drupal_get_path('module', 'js_example') . '/js/purple.js',
-        'weight' => $weights['purple']
+        'weight' => $weights['purple'],
       ),
     );
     // Attach the weighted array to our JavaScript settings.
@@ -96,7 +97,7 @@ class JsExampleController {
    * which isn't normally how things work, but it's easier to demonstrate
    * the JavaScript this way.
    */
-  function getJsAccordionImplementation() {
+  public function getJsAccordionImplementation() {
     $title = t('Click sections to expand or collapse:');
     $build['myelement'] = array(
       '#theme' => 'my_accordion',
diff --git a/js_example/lib/Drupal/js_example/Tests/JsExampleTest.php b/js_example/lib/Drupal/js_example/Tests/JsExampleTest.php
index 5fc72ba..cadfbc4 100644
--- a/js_example/lib/Drupal/js_example/Tests/JsExampleTest.php
+++ b/js_example/lib/Drupal/js_example/Tests/JsExampleTest.php
@@ -43,7 +43,7 @@ class JsExampleTest extends WebTestBase {
       'examples/js_example/weights',
       'examples/js_example/accordion',
     );
-    foreach($paths as $path) {
+    foreach ($paths as $path) {
       $this->drupalGet($path);
       $this->assertResponse(200, 'Visited ' . $path);
     }
diff --git a/lib/Drupal/examples/Tests/ExamplesTest.php b/lib/Drupal/examples/Tests/ExamplesTest.php
index a67242c..e50d358 100644
--- a/lib/Drupal/examples/Tests/ExamplesTest.php
+++ b/lib/Drupal/examples/Tests/ExamplesTest.php
@@ -43,7 +43,6 @@ class ExamplesTest extends WebTestBase {
    * @todo: Replace module_exists with Drupal::moduleHandler() ..etc.
    */
   public function testExamples() {
-    //$this->assertTrue(Drupal::moduleHandler()->moduleExists('examples'));
     $this->assertTrue(module_exists('examples'));
   }
 
diff --git a/node_type_example/lib/Drupal/node_type_example/Controller/NodeTypeExampleController.php b/node_type_example/lib/Drupal/node_type_example/Controller/NodeTypeExampleController.php
index c38a6be..cd7dbe5 100644
--- a/node_type_example/lib/Drupal/node_type_example/Controller/NodeTypeExampleController.php
+++ b/node_type_example/lib/Drupal/node_type_example/Controller/NodeTypeExampleController.php
@@ -17,7 +17,7 @@ class NodeTypeExampleController {
   /**
    * A simple controller method to explain what this module is about.
    */
-  function description() {
+  public function description() {
     $build = array(
       '#markup' => t(
           '<p>Config Node Type Example is a basic example of defining a content type through configuration YAML files.</p>
diff --git a/node_type_example/lib/Drupal/node_type_example/Tests/NodeTypeExampleTest.php b/node_type_example/lib/Drupal/node_type_example/Tests/NodeTypeExampleTest.php
index f44f194..af2ccbf 100644
--- a/node_type_example/lib/Drupal/node_type_example/Tests/NodeTypeExampleTest.php
+++ b/node_type_example/lib/Drupal/node_type_example/Tests/NodeTypeExampleTest.php
@@ -45,10 +45,10 @@ class NodeTypeExampleTest extends WebTestBase {
    * - That we can create content using the user interface.
    * - That our created content does appear in the database.
    */
-  function testNodeTypes() {
+  public function testNodeTypes() {
     // Log in an admin user.
-    $adminUser = $this->drupalCreateUser(array('administer content types'));
-    $this->drupalLogin($adminUser);
+    $admin_user = $this->drupalCreateUser(array('administer content types'));
+    $this->drupalLogin($admin_user);
 
     // Get a list of content types.
     $this->drupalGet('admin/structure/types');
@@ -58,14 +58,14 @@ class NodeTypeExampleTest extends WebTestBase {
 
     // Check for the locked status of our content types.
     // $nodeType will be of type Drupal\node\NodeTypeInterface
-    $nodeType = node_type_load('basic_content_type');
-    $this->assertFalse($nodeType->isLocked(), 'basic_content_type is not locked.');
-    $nodeType = node_type_load('locked_content_type');
-    $this->assertEqual('locked_content_type', $nodeType->isLocked(), 'locked_content_type is locked.');
+    $node_type = node_type_load('basic_content_type');
+    $this->assertFalse($node_type->isLocked(), 'basic_content_type is not locked.');
+    $node_type = node_type_load('locked_content_type');
+    $this->assertEqual('locked_content_type', $node_type->isLocked(), 'locked_content_type is locked.');
 
     // Log in a content creator.
-    $creatorUser = $this->drupalCreateUser(array('create basic_content_type content'));
-    $this->drupalLogin($creatorUser);
+    $creator_user = $this->drupalCreateUser(array('create basic_content_type content'));
+    $this->drupalLogin($creator_user);
 
     // Create a node.
     $edit = array();
diff --git a/node_type_example/node_type_example.module b/node_type_example/node_type_example.module
index ad6b9ed..4d0b5fa 100644
--- a/node_type_example/node_type_example.module
+++ b/node_type_example/node_type_example.module
@@ -4,6 +4,7 @@
  * @file
  * node_type_example module file.
  */
+
 /**
  * @defgroup node_type_example Example: Config Node Type
  * @ingroup examples
diff --git a/page_example/lib/Drupal/page_example/Controller/PageExampleController.php b/page_example/lib/Drupal/page_example/Controller/PageExampleController.php
index 32a200b..5ba21eb 100644
--- a/page_example/lib/Drupal/page_example/Controller/PageExampleController.php
+++ b/page_example/lib/Drupal/page_example/Controller/PageExampleController.php
@@ -19,9 +19,14 @@ class PageExampleController {
    *
    * Our router maps this method to the path 'examples/page_example'.
    */
-  function description() {
+  public function description() {
     $build = array(
-      '#markup' => t('<p>The Page example module provides two pages, "simple" and "arguments".</p><p>The <a href="@simple_link">simple page</a> just returns a renderable array for display.</p><p>The <a href="@arguments_link">arguments page</a> takes two arguments and displays them, as in @arguments_link</p>', array('@simple_link' => url('examples/page_example/simple', array('absolute' => TRUE)), '@arguments_link' => url('examples/page_example/arguments/23/56', array('absolute' => TRUE))))
+      '#markup' => t('<p>The Page example module provides two pages, "simple" and "arguments".</p><p>The <a href="@simple_link">simple page</a> just returns a renderable array for display.</p><p>The <a href="@arguments_link">arguments page</a> takes two arguments and displays them, as in @arguments_link</p>',
+        array(
+          '@simple_link' => url('examples/page_example/simple', array('absolute' => TRUE)),
+          '@arguments_link' => url('examples/page_example/arguments/23/56', array('absolute' => TRUE)),
+        ),
+      ),
     );
 
     return $build;
@@ -37,9 +42,9 @@ class PageExampleController {
    * page. The theme system will later render and surround the content with the
    * appropriate blocks, navigation, and styling.
    */
-  function simple() {
+  public function simple() {
     return array(
-      '#markup' => '<p>' . t('Simple page: The quick brown fox jumps over the lazy dog.') . '</p>'
+      '#markup' => '<p>' . t('Simple page: The quick brown fox jumps over the lazy dog.') . '</p>',
     );
   }
 
@@ -70,7 +75,7 @@ class PageExampleController {
    * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
    *   If the parameters are invalid.
    */
-  function arguments($first, $second) {
+  public function arguments($first, $second) {
     // Make sure you don't trust the URL to be safe! Always check for exploits.
     if (!is_numeric($first) || !is_numeric($second)) {
       // We will just show a standard "access denied" page in this case.
diff --git a/page_example/lib/Drupal/page_example/Tests/PageExampleTest.php b/page_example/lib/Drupal/page_example/Tests/PageExampleTest.php
index e4fcf32..5686f55 100644
--- a/page_example/lib/Drupal/page_example/Tests/PageExampleTest.php
+++ b/page_example/lib/Drupal/page_example/Tests/PageExampleTest.php
@@ -31,13 +31,13 @@ class PageExampleTest extends WebTestBase {
   /**
    * Generates a random string of ASCII numeric characters (values 48 to 57).
    *
-   * @param $length
+   * @param int $length
    *   Length of random string to generate.
    *
-   * @return
+   * @return string
    *   Randomly generated string.
    */
-  private static function randomNumber($length = 8) {
+  protected static function randomNumber($length = 8) {
     $str = '';
     for ($i = 0; $i < $length; $i++) {
       $str .= chr(mt_rand(48, 57));
@@ -48,11 +48,11 @@ class PageExampleTest extends WebTestBase {
   /**
    * Verify that current user has no access to page.
    *
-   * @param $url
+   * @param string $url
    *   URL to verify.
    */
   function pageExampleVerifyNoAccess($url) {
-    // Test that page returns 403 Access Denied
+    // Test that page returns 403 Access Denied.
     $this->drupalGet($url);
     $this->assertResponse(403);
   }
@@ -63,9 +63,9 @@ class PageExampleTest extends WebTestBase {
    * Login user, create an example node, and test page functionality through
    * the admin and user interfaces.
    */
-  function testPageExampleBasic() {
+  public function testPageExampleBasic() {
     // Verify that anonymous user can't access the pages created by
-    // page_example module
+    // page_example module.
     $this->pageExampleVerifyNoAccess('examples/page_example/simple');
     $this->pageExampleVerifyNoAccess('examples/page_example/arguments/1/2');
 
@@ -116,7 +116,7 @@ class PageExampleTest extends WebTestBase {
     $this->drupalGet('examples/page_example/arguments/non-numeric-argument/' . $second);
     $this->assertResponse(403, 'User got 403 for string argument in first position.');
 
-    // Check if user can't access simple page
+    // Check if user can't access simple page.
     $this->pageExampleVerifyNoAccess('examples/page_example/simple');
   }
 
diff --git a/page_example/page_example.module b/page_example/page_example.module
index 8151f17..15ed0a1 100644
--- a/page_example/page_example.module
+++ b/page_example/page_example.module
@@ -97,7 +97,6 @@ function page_example_menu() {
   // Notice there is not a declaration entry for
   // 'examples/page_example/arguments/{first}/{second}' because that is only a
   // routing item, and not a menu item (which needs to appear on menu).
-
   return $items;
 }
 
diff --git a/phpunit_example/lib/Drupal/phpunit_example/DisplayManager.php b/phpunit_example/lib/Drupal/phpunit_example/DisplayManager.php
index ef51e91..5b186e1 100644
--- a/phpunit_example/lib/Drupal/phpunit_example/DisplayManager.php
+++ b/phpunit_example/lib/Drupal/phpunit_example/DisplayManager.php
@@ -26,18 +26,45 @@ class DisplayManager {
 
   protected $items;
 
+  /**
+   * Add a displayable item.
+   *
+   * @param DisplayInfoInterface $item
+   *   The item to add.
+   */
   public function addDisplayableItem(DisplayInfoInterface $item) {
     $this->items[$item->getDisplayName()] = $item;
   }
 
+  /**
+   * A count of how many items exist.
+   *
+   * @return int
+   *   The number of items that exist.
+   */
   public function countDisplayableItems() {
     return count($this->items);
   }
 
+  /**
+   * All displayable items.
+   *
+   * @return array
+   *   The displayable items.
+   */
   public function displayableItems() {
     return $this->items;
   }
 
+  /**
+   * Find an item by its name.
+   *
+   * @param string $name
+   *   The name to find.
+   *
+   * @return DisplayInfoInterface|null
+   *   The found item, or NULL if none is found.
+   */
   public function item($name) {
     if (isset($this->items[$name])) {
       return $this->items[$name];
diff --git a/phpunit_example/lib/Drupal/phpunit_example/Tests/PHPUnitExampleSimpleTest.php b/phpunit_example/lib/Drupal/phpunit_example/Tests/PHPUnitExampleSimpleTest.php
index 48044a8..6c5fc29 100644
--- a/phpunit_example/lib/Drupal/phpunit_example/Tests/PHPUnitExampleSimpleTest.php
+++ b/phpunit_example/lib/Drupal/phpunit_example/Tests/PHPUnitExampleSimpleTest.php
@@ -21,6 +21,9 @@ class PHPUnitExampleSimpleTest extends WebTestBase {
 
   public static $modules = array('phpunit_example');
 
+  /**
+   * {@inheritdoc}
+   */
   public static function getInfo() {
     return array(
       'name' => 'PHPUnit Example Tests',
diff --git a/phpunit_example/phpunit_example.module b/phpunit_example/phpunit_example.module
index dfbbfb9..0c01000 100644
--- a/phpunit_example/phpunit_example.module
+++ b/phpunit_example/phpunit_example.module
@@ -15,9 +15,6 @@
  * Implements hook_help().
  *
  * @see hook_help()
- *
- * @return string
- *   Translated string for the help text.
  */
 function phpunit_example_help($path, $arg) {
   switch ($path) {
@@ -35,9 +32,6 @@ function phpunit_example_help($path, $arg) {
  *
  * @see hook_menu()
  * @see menu_example
- *
- * @return array
- *   Complex array describing our menu item.
  */
 function phpunit_example_menu() {
   $items['examples/phpunit_example'] = array(
