From e6b3f9a80a8333c50f9ee1470dc1393f8f3fbbf4 Mon Sep 17 00:00:00 2001
From: Andrew Hunt <andrew@aghstrategies.com>
Date: Thu, 9 Feb 2017 20:58:23 -0500
Subject: [PATCH] hook_civicrm_membershipTypeValues: formatting fixes

---
 .../hook_civicrm_membershipTypeValues.md      | 53 ++++++++++---------
 1 file changed, 29 insertions(+), 24 deletions(-)

diff --git a/docs/hooks/hook_civicrm_membershipTypeValues.md b/docs/hooks/hook_civicrm_membershipTypeValues.md
index e46f9e55..29c59fdc 100644
--- a/docs/hooks/hook_civicrm_membershipTypeValues.md
+++ b/docs/hooks/hook_civicrm_membershipTypeValues.md
@@ -2,44 +2,49 @@
 
 ## Description
 
-This hook is called when composing the array of membershipTypes and
-their cost during a membership registration (new or renewal). Note the
-hook is called on initial page load and also reloaded after submit (PRG
-pattern). You can use it to alter the membership types when first
+This hook is called when composing the array of membership types and
+their costs during a membership registration (new or renewal). Note the
+hook is called on initial page load and also reloaded after submit ([PRG
+pattern](https://en.wikipedia.org/wiki/Post/Redirect/Get)). You can use it to alter the membership types when first
 loaded, or after submission (for example if you want to gather data in
 the form and use it to alter the fees).
 
 ## Definition
 
-    hook_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
+```php
+hook_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
+```
 
 ## Parameters
 
--   $form the form object that is presenting the page
--   $membershipTypeValues the array of membership types and their
-    amount
+-   object `$form` - the form object that is presenting the page
+-   array `$membershipTypeValues` - the membership types and their amounts
 
 ## Examples
 
 Give a 50% discount to some memberships in the sample data
 
-    function civitest_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
-        $membershipTypeValues[1]['name']        = 'General (50% discount)';
-        $membershipTypeValues[1]['minimum_fee'] = '50.00';
+```php
+function civitest_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
+  $membershipTypeValues[1]['name'] = 'General (50% discount)';
+  $membershipTypeValues[1]['minimum_fee'] = '50.00';
 
-        $membershipTypeValues[2]['name']        = 'Student (50% discount)';
-        $membershipTypeValues[2]['minimum_fee'] = '25.00';
-    }
+  $membershipTypeValues[2]['name'] = 'Student (50% discount)';
+  $membershipTypeValues[2]['minimum_fee'] = '25.00';
+}
+```
 
 Modify specific fee values
 
-    function mymodule_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
-        foreach ( $membershipTypeValues as &$values) {
-              if ( $values['name'] == 'General') {
-                  $values['minimum_fee'] = "5.55";
-              }
-              if ( $values['name'] == 'Student') {
-                  $values['minimum_fee'] = "2.22";
-              }
-        }
-    }
\ No newline at end of file
+```php
+function mymodule_civicrm_membershipTypeValues(&$form, &$membershipTypeValues) {
+  foreach ($membershipTypeValues as &$values) {
+    if ($values['name'] == 'General') {
+      $values['minimum_fee'] = "5.55";
+    }
+    if ($values['name'] == 'Student') {
+      $values['minimum_fee'] = "2.22";
+    }
+  }
+}
+```
-- 
GitLab