From cb2b422a5e7a8ec9d29fbb0db9816933d21ae341 Mon Sep 17 00:00:00 2001
From: Max Bronsema <Max.Bronsema@wwu.edu>
Date: Wed, 5 Aug 2015 14:04:39 -0700
Subject: [PATCH] Rudimentary formatting fixes based on pareview.sh at
 http://git.drupal.org/sandbox/npacker/2508441.git

---
 README.md                                          | 96 ++++++++++++++++------
 includes/ableplayer.inc                            |  9 +-
 .../ableplayer_youtube/ableplayer_youtube.module   |  6 +-
 .../test/ableplayer_youtube.test                   |  1 +
 test/ableplayer_output.test                        |  5 +-
 test/ableplayer_validation.test                    |  4 +-
 themes/ableplayer.theme.inc                        |  1 +
 7 files changed, 89 insertions(+), 33 deletions(-)

diff --git a/README.md b/README.md
index 885cfd6..d71d911 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,9 @@
-**[Able Player](https://github.com/ableplayer/ableplayer)** is a fully accessible cross-browser media player created by accessibility specialist Terrill Thompson. It uses the HTML5 <audio> or <video> element for browsers that support them. The Able Player module integrates the jQuery Able Player plugin as a file formatter with support for captions, transcripts, and audio description.
+**[Able Player](https://github.com/ableplayer/ableplayer)** is a fully
+accessible cross-browser media player created by accessibility specialist
+Terrill Thompson. It uses the HTML5 <audio> or <video> element for browsers
+that support them. The Able Player module integrates the jQuery Able Player
+plugin as a file formatter with support for captions, transcripts, and audio
+description.
 
 ## Dependencies
 
@@ -8,7 +13,8 @@
 *   [jQuery Update](https://www.drupal.org/project/jquery_update)
 *   [Modernizr](https://www.drupal.org/project/modernizr)
 *   [File Entity](https://www.drupal.org/project/file_entity)
-*   [Entity Translation](https://www.drupal.org/project/entity_translation) (optional, for multilingual transcript support)
+*   [Entity Translation](https://www.drupal.org/project/entity_translation)
+ (optional, for multilingual transcript support)
 
 ### Libraries
 
@@ -19,49 +25,74 @@
 ## Installation
 
 1.  Download and install the required modules, listed above.
-2.  Download the latest release of Able Player from the GitHub project [releases page](https://github.com/ableplayer/ableplayer/releases).
-3.  Extract the archive to the libraries directory (usually **sites/all/libraries**).
-4.  Rename the extracted directory to **ableplayer** if it is not already. The final installation path should be **sites/all/libraries/ableplayer**.
+2.  Download the latest release of Able Player from the GitHub project
+[releases page](https://github.com/ableplayer/ableplayer/releases).
+3.  Extract the archive to the libraries directory
+(usually **sites/all/libraries**).
+4.  Rename the extracted directory to **ableplayer** if it is not already.
+The final installation path should be **sites/all/libraries/ableplayer**.
 5.  Download this module to **sites/all/modules** and enable it.
-6.  Navigate to **admin/config/development/modernizr**. Click the **Download your Modernizr production build** button. This will open the Modernizr build webpage.
-7.  Click the **Download** button and save the file to **sites/all/libraries/modernizr**.
+6.  Navigate to **admin/config/development/modernizr**.
+Click the **Download your Modernizr production build** button.
+This will open the Modernizr build webpage.
+7.  Click the **Download** button and save the file
+to **sites/all/libraries/modernizr**.
 8.  Rename the file to **custom.modernizr.js**.
-9.  Navigate to **admin/config/development/jquery_update**. Ensure that the jQuery version is at least 1.7.
+9.  Navigate to **admin/config/development/jquery_update**.
+Ensure that the jQuery version is at least 1.7.
 
 ## Configuration
 
-Able Player releases include minified production code as well as the human-readable source. To use the source code for debugging purposes, navigate to **Site configuration > Media > Able Player** and select the **Development** option.
+Able Player releases include minified production code as well as the
+human-readable source. To use the source code for debugging purposes,
+navigate to **Site configuration > Media > Able Player** and select
+the **Development** option.
 
 ## Usage
 
 ### Rendered File Display
 
-The Able Player module provides file displays for supported audio and video mimetypes. Your site must be configured to handle these mimetypes and set to use Able Player as the primary display.
+The Able Player module provides file displays for supported audio and video
+mimetypes. Your site must be configured to handle these mimetypes and set to
+use Able Player as the primary display.
 
 1.  Navigate to **File Types > Audio > Manage File Display**.
 2.  Check Able Player.
 3.  Uncheck any undesired displays.
-4.  Below the display selection list, there is a draggable list of enabled displays. Ensure that Able Player is first in this list.
+4.  Below the display selection list, there is a draggable list of enabled
+displays. Ensure that Able Player is first in this list.
 5.  Click **Save settings**.
 
-Repeat these steps for the video file type. Once these steps are completed, follow the next set of instructions to display the contents of a file field with Able Player.
+Repeat these steps for the video file type. Once these steps are completed,
+follow the next set of instructions to display the contents of a file field
+with Able Player.
 
 ### File Field Display
 
-1.  Add a field of type **File** to any content type. Set the widget type to **File**.
-2.  Navigate to **Structure > Content Type > YOUR_CONTENT_TYPE > Manage Display**. This page shows a list of fields attached to a content type as well as their visibility and format.
-3.  Find the row for the File field created in step 1\. Under the **Format** column, select **Rendered File** from the drop-down.
+1.  Add a field of type **File** to any content type. Set the widget type
+to **File**.
+2.  Navigate to
+**Structure > Content Type > YOUR_CONTENT_TYPE > Manage Display**.
+This page shows a list of fields attached to a content type as well as their
+visibility and format.
+3.  Find the row for the File field created in step 1\.
+Under the **Format** column, select **Rendered File** from the drop-down.
 4.  Click **Save**.
 
-Provided that Able Player has been enabled as the default file display for the appropriate file types, the file field should now be formatted with Able Player.
+Provided that Able Player has been enabled as the default file display for
+the appropriate file types, the file field should now be formatted
+with Able Player.
 
 ### Video Captions and Audio Descriptions
 
-A caption field instance is attached to the video and audio file types upon installation of the Able Player module. When a valid WebVTT file is uploaded to this field, it will be displayed by Able Player automatically.
+A caption field instance is attached to the video and audio file types upon
+installation of the Able Player module. When a valid WebVTT file is uploaded
+to this field, it will be displayed by Able Player automatically.
 
 #### Multilingual Transcripts
 
-The [Entity Translation](https://drupal.org/project/entity_translation) module is **required** for support of transcripts in multiple languages.
+The [Entity Translation](https://drupal.org/project/entity_translation) module
+is **required** for support of transcripts in multiple languages.
 
 ##### Part 1: Enable and configure Entity Translation
 
@@ -77,25 +108,38 @@ The [Entity Translation](https://drupal.org/project/entity_translation) module i
 
 1.  Enable the core **Locale** module.
 2.  Navigate to **admin/config/regional/language.**
-3.  Click on **Add language**. Select the language that you want to add from the select box and click **Save** Repeat for each language that you want to support.
+3.  Click on **Add language**. Select the language that you want to add from
+the select box and click **Save** Repeat for each language that you want
+to support.
 
 ##### Part 3: Set the language of transcript files
 
-1.  Navigate to an existing transcript file, or first attach a new one to a video or audio file. Click the **Edit** administration tab.
-2.  There should be a **Language** select box available. Choose the appropriate language for the transcript from this form element.
+1.  Navigate to an existing transcript file, or first attach a new one to a
+video or audio file. Click the **Edit** administration tab.
+2.  There should be a **Language** select box available. Choose the
+appropriate language for the transcript from this form element.
 3.  Click **Save**.
 
-With the language set on each transcript file, Able Player will display a language selection interface for captions and transcripts. Users will be able to choose their language at playback time.
+With the language set on each transcript file, Able Player will display a
+language selection interface for captions and transcripts. Users will be
+able to choose their language at playback time.
 
 ### Supported File Types
 
-Details on the usage of the Able Player library, including up-to-date support for filetypes and third-party media hosts, may be found at the [**Able Player GitHub page**](https://github.com/ableplayer/ableplayer).
+Details on the usage of the Able Player library, including up-to-date support
+for filetypes and third-party media hosts, may be found at
+the [**Able Player GitHub page**](https://github.com/ableplayer/ableplayer).
 
 ## Known Issues
 
-*   The **jquery.cookie.js** included with Able Player conflicts with the **jquery.cookie.js** loaded by the core Toolbar module, preventing Able Player from working. **Current solution:** Disable the core Toolbar module and use a contrib module such as Admin Toolbar or Navbar.
-*   Able player settings cannot be set on a per-field (or per-file) basis at this time.
+*   The **jquery.cookie.js** included with Able Player conflicts with
+the **jquery.cookie.js** loaded by the core Toolbar module, preventing Able
+Player from working. **Current solution:** Disable the core Toolbar module
+and use a contrib module such as Admin Toolbar or Navbar.
+*   Able player settings cannot be set on a per-field (or per-file) basis at
+this time.
 
 ## Future Enhancements
 
-*   Allow multiple file sources to be displayed by Able Player for a file instance, for maximum browser compatibility.
+*   Allow multiple file sources to be displayed by Able Player for a file
+instance, for maximum browser compatibility.
diff --git a/includes/ableplayer.inc b/includes/ableplayer.inc
index 0086bb0..606ea1e 100644
--- a/includes/ableplayer.inc
+++ b/includes/ableplayer.inc
@@ -12,7 +12,8 @@
 /**
  * Function returns the complete list of mimetypes supported by Able Player.
  *
- * @return array Able Player supported mimetypes.
+ * @return array
+ *   Able Player supported mimetypes.
  */
 function ableplayer_mimetypes() {
   return array(
@@ -26,7 +27,8 @@ function ableplayer_mimetypes() {
 /**
  * Able Player default player settings.
  *
- * @return array Able Player file formatter default settings.
+ * @return array
+ *   Able Player file formatter default settings.
  */
 function ableplayer_default_settings() {
   return array(
@@ -51,7 +53,8 @@ function ableplayer_default_settings() {
  * The result will be used to configure the display of the Able Player file
  * formatter.
  *
- * @return array Able Player file formatter view settings.
+ * @return array
+ *   Able Player file formatter view settings.
  */
 function ableplayer_set_view_settings($file, $display) {
   $options = array();
diff --git a/modules/ableplayer_youtube/ableplayer_youtube.module b/modules/ableplayer_youtube/ableplayer_youtube.module
index fd61140..e03ff0f 100644
--- a/modules/ableplayer_youtube/ableplayer_youtube.module
+++ b/modules/ableplayer_youtube/ableplayer_youtube.module
@@ -29,9 +29,11 @@ function ableplayer_youtube_preprocess_ableplayer(&$variables) {
 /**
  * Helper function to extract YouTube video id from filestream uri.
  *
- * @param string $uri The uri of the file to parse for YouTube id
+ * @param string $uri
+ *   The uri of the file to parse for YouTube id
  *
- * @return string The extracted id string
+ * @return string
+ *   The extracted id string
  */
 function ableplayer_youtube_get_video_id($uri) {
   $wrapper = file_stream_wrapper_get_instance_by_uri($uri);
diff --git a/modules/ableplayer_youtube/test/ableplayer_youtube.test b/modules/ableplayer_youtube/test/ableplayer_youtube.test
index 2ec1597..acee883 100644
--- a/modules/ableplayer_youtube/test/ableplayer_youtube.test
+++ b/modules/ableplayer_youtube/test/ableplayer_youtube.test
@@ -2,6 +2,7 @@
 
 /**
  * @file
+ *
  * Test Able Player YouTube output.
  */
 class AblePlayerYouTubeTestCase extends DrupalWebTestCase {
diff --git a/test/ableplayer_output.test b/test/ableplayer_output.test
index 321ee96..7b3e3d5 100644
--- a/test/ableplayer_output.test
+++ b/test/ableplayer_output.test
@@ -2,12 +2,15 @@
 
 /**
  * @file
+ *
  * Test case for Able Player file display output.
  */
 class AblePlayerOutputTestCase extends DrupalWebTestCase {
 
   /**
-   * @var object $user The Drupal user that will perform the test operations.
+   * @var object $user
+   *
+   * The Drupal user that will perform the test operations.
    */
   protected $user;
 
diff --git a/test/ableplayer_validation.test b/test/ableplayer_validation.test
index b73a4c5..9e7ce77 100644
--- a/test/ableplayer_validation.test
+++ b/test/ableplayer_validation.test
@@ -2,6 +2,7 @@
 
 /**
  * @file
+ *
  * Test case for Able Player display settings validation.
  */
 class AblePlayerValidationTestCase extends DrupalWebTestCase {
@@ -22,7 +23,8 @@ class AblePlayerValidationTestCase extends DrupalWebTestCase {
   const SAVE_SUCCESS_MESSAGE = 'Your settings have been saved';
 
   /**
-   * @var object $user The Drupal user that will perform the test operations.
+   * @var object $user
+   *   The Drupal user that will perform the test operations.
    */
   protected $user;
 
diff --git a/themes/ableplayer.theme.inc b/themes/ableplayer.theme.inc
index 746d563..e2c9f33 100644
--- a/themes/ableplayer.theme.inc
+++ b/themes/ableplayer.theme.inc
@@ -2,6 +2,7 @@
 
 /**
  * @file
+ *
  * Theme functions for Able Player.
  */
 
-- 
1.8.4.2

