diff --git a/CREDITS.txt b/CREDITS.txt
index 2771c3c..ad72d54 100644
--- a/CREDITS.txt
+++ b/CREDITS.txt
@@ -1,3 +1,3 @@
 Originaly inspired by functionality found in the ed_classified module.
 
-Since branch 7.x-3.x comes uses the original code from maxlength_js.
\ No newline at end of file
+Since branch 7.x-3.x comes uses the original code from maxlength_js.
diff --git a/maxlength.module b/maxlength.module
index af65769..268cad9 100644
--- a/maxlength.module
+++ b/maxlength.module
@@ -2,8 +2,9 @@
 
 /**
  * @file
- * Limits the number of characters in textfields and textareas and shows the
- *  amount of characters left.
+ * Limits the number of characters in textfields and textareas.
+ *
+ * This module also shows the amount of characters left.
  */
 
 use Drupal\Core\Field\FieldDefinitionInterface;
@@ -27,7 +28,9 @@ function maxlength_help($route_name, RouteMatchInterface $route_match) {
  * Implements hook_element_info_alter().
  *
  * @todo: Check if all them work.
- * @param $cache
+ *
+ * @param array $cache
+ *    The machine name of an element type plugin.
  */
 function maxlength_element_info_alter(&$cache) {
   // Add prerender functions to textareas and text fields.
@@ -43,7 +46,7 @@ function maxlength_element_info_alter(&$cache) {
  */
 function maxlength_pre_render($element) {
   if (isset($element['#maxlength_js']) && $element['#maxlength_js'] === TRUE) {
-    if (((isset($element['#attributes']['maxlength']) && $element['#attributes']['maxlength'] > 0)) ) {
+    if (((isset($element['#attributes']['maxlength']) && $element['#attributes']['maxlength'] > 0))) {
       $element['#attributes']['class'][] = 'maxlength';
       $element['#attached']['library'][] = 'maxlength/maxlength';
     }
@@ -130,16 +133,17 @@ function maxlength_field_widget_settings_summary_alter(&$summary, $context) {
   $allowed_settings = $widget_settings->getAllowedSettings($plugin_id);
   if (!empty($allowed_settings)) {
     if (!empty($allowed_settings['maxlength_setting']) && $context['widget']->getThirdPartySetting('maxlength', 'maxlength_js')) {
-      $summary [] = t('Max length: @count', array('@count' => $context['widget']->getThirdPartySetting('maxlength', 'maxlength_js')));
+      $summary[] = t('Max length: @count', array('@count' => $context['widget']->getThirdPartySetting('maxlength', 'maxlength_js')));
     }
     if (!empty($allowed_settings['summary_maxlength_setting']) && $context['widget']->getThirdPartySetting('maxlength', 'maxlength_js_summary')) {
-      $summary [] = t('Max summary length: @count', array('@count' => $context['widget']->getThirdPartySetting('maxlength', 'maxlength_js_summary')));
+      $summary[] = t('Max summary length: @count', array('@count' => $context['widget']->getThirdPartySetting('maxlength', 'maxlength_js_summary')));
     }
     if (!empty($allowed_settings['truncate_setting'])) {
       if ($context['widget']->getThirdPartySetting('maxlength', 'maxlength_js_truncate_html')) {
-        $summary [] = t('Max length - Safe truncate html');
-      } elseif ($context['widget']->getThirdPartySetting('maxlength', 'maxlength_js_enforce')) {
-        $summary [] = t('Max length - Force truncate');
+        $summary[] = t('Max length - Safe truncate html');
+      }
+      elseif ($context['widget']->getThirdPartySetting('maxlength', 'maxlength_js_enforce')) {
+        $summary[] = t('Max length - Force truncate');
       }
     }
   }
@@ -184,9 +188,14 @@ function maxlength_field_widget_form_alter(&$element, FormStateInterface $form_s
 
 /**
  * Process handler for the form elements that can have maxlength attribute.
- * @param $element
- * @param $form_state
- * @return
+ *
+ * @param array $element
+ *    The element of the form.
+ * @param \Drupal\Core\Form\FormState $form_state
+ *    Stores information about the state of a form.
+ *
+ * @return array
+ *    The form element which needs to be returned.
  */
 function maxlength_process_element($element, FormStateInterface $form_state) {
   if (isset($element['#attributes']['#maxlength_js_enforce']) && $element['#attributes']['#maxlength_js_enforce']) {
diff --git a/maxlength.test b/maxlength.test
index fd43969..97d48c3 100644
--- a/maxlength.test
+++ b/maxlength.test
@@ -1,13 +1,20 @@
 <?php
+
 /**
  * @file
  * Test maxlength module.
  */
 
+/**
+ * Maxlength Test case class.
+ */
 class MaxlengthTestCase extends DrupalWebTestCase {
   private $hyphen_type;
   private $type;
 
+  /**
+   * Static function to get the info.
+   */
   public static function getInfo() {
     return array(
       'name' => 'Test maxlength module',
@@ -16,6 +23,9 @@ class MaxlengthTestCase extends DrupalWebTestCase {
     );
   }
 
+  /**
+   * Protected function to set the values.
+   */
   protected function setUp() {
     parent::setUp('maxlength');
 
@@ -24,11 +34,11 @@ class MaxlengthTestCase extends DrupalWebTestCase {
     $this->hyphen_type = str_replace('_', '-', $this->type);
     $this->admin = $this->drupalCreateUser(array('administer content types', 'bypass node access'));
   }
-  
+
   /**
    * Test fieldapi field.
    */
-  function testField() {
+  public function testField() {
     $this->drupalLogin($this->admin);
 
     $edit = array(
@@ -47,12 +57,15 @@ class MaxlengthTestCase extends DrupalWebTestCase {
         case 'class':
           $this->assertTrue(strpos($value, 'maxlength'), 'Take sure the maxlength class is existant');
           break;
+
         case 'maxlength_js':
           $this->assertTrue($value, 'Take sure that the maxlenght_js attribute is set.');
           break;
+
         case 'maxlength_js_label':
           $this->assertEqual($edit['instance[widget][settings][maxlength_js_label]'], $value, 'Take sure that the maxlenght_js_label is the defined one.');
           break;
+
         case 'maxlength':
           $this->assertEqual($edit['instance[widget][settings][maxlength_js]'], $value);
       }
@@ -62,7 +75,7 @@ class MaxlengthTestCase extends DrupalWebTestCase {
   /**
    * Test title field.
    */
-  function testTitle() {
+  public function testTitle() {
     $this->drupalLogin($this->admin);
 
     $edit = array(
@@ -77,26 +90,31 @@ class MaxlengthTestCase extends DrupalWebTestCase {
     // Check the maxlength html attributes.
     $elements = $this->xpath('//input[@id=:id]', array(':id' => 'edit-title'));
 
-//     foreach ($elements[0]->attributes() as $key => $value) {
-//       switch ($key) {
-//         case 'class':
-//           $this->assertTrue(strpos($value, 'maxlength'), 'Take sure the maxlength class is existant');
-//           break;
-//         case 'maxlength_js':
-//           $this->assertTrue($value, 'Take sure that the maxlenght_js attribute is set.');
-//           break;
-//         case 'maxlength_js_label':
-//           $this->assertEqual($edit['maxlength_js_label'], $value, 'Take sure that the maxlenght_js_label is the defined one.');
-//           break;
-//         case 'maxlength':
-//           $this->assertEqual($edit['maxlenght_js'], $value);
-//           break;
-//       }
-//     }
+    /*
+    Foreach ($elements[0]->attributes() as $key => $value) {
+    switch ($key) {
+    case 'class':
+    $this->assertTrue(strpos($value, 'maxlength'),
+    'Take sure the maxlength class is existant');
+    break;
+    case 'maxlength_js':
+    $this->assertTrue($value, 'Take sure that the maxlenght_js
+    attribute is set.');
+    break;
+    case 'maxlength_js_label':
+    $this->assertEqual($edit['maxlength_js_label'], $value, 'Take sure that the
+    maxlenght_js_label is the defined one.');
+    break;
+    case 'maxlength':
+    $this->assertEqual($edit['maxlenght_js'], $value);
+    break;
+    }
+    }
+     */
   }
 
-   /**
-    * Test general api.
-    */
+  /*
+   * Test general api.
+   */
 
 }
diff --git a/src/WidgetSettings.php b/src/WidgetSettings.php
index bc9d35b..61dfdd3 100644
--- a/src/WidgetSettings.php
+++ b/src/WidgetSettings.php
@@ -45,6 +45,7 @@ class WidgetSettings implements WidgetSettingsInterface {
 
   /**
    * {@inheritdoc}
+   *
    * @see \Drupal\maxlength\WidgetSettingsInterface::getAllowedSettings()
    */
   public function getAllowedSettings($widget_plugin_id) {
diff --git a/src/WidgetSettingsInterface.php b/src/WidgetSettingsInterface.php
index 05020ca..f8f5f35 100644
--- a/src/WidgetSettingsInterface.php
+++ b/src/WidgetSettingsInterface.php
@@ -13,7 +13,7 @@ interface WidgetSettingsInterface {
    * @param string $widget_plugin_id
    *   The plugin id of a widget.
    *
-   * @return array()
+   * @return array
    *   An array with all the settings which are allowed for a plugin id.
    */
   public function getAllowedSettings($widget_plugin_id);
