Completed
Branch master (b13b1d)
by Michael
19:31
created
development/factory/user_meta/AdminPageFramework_UserMeta_Router.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function _isInThePage() {
47 47
                
48
-        if ( ! $this->oProp->bIsAdmin ) {
48
+        if ( !$this->oProp->bIsAdmin ) {
49 49
             return false;
50 50
         }
51 51
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function _replyToDetermineToLoad( /* $oScreen */ ) {
68 68
         
69
-        if ( ! $this->_isInThePage() ) { 
69
+        if ( !$this->_isInThePage() ) { 
70 70
             return; 
71 71
         }
72 72
 
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
         $this->oUtil->addAndDoAction( $this, "set_up_{$this->oProp->sClassName}", $this );
77 77
                  
78 78
         // Hooks to display fields.
79
-        add_action( 'show_user_profile', array( $this, '_replyToPrintFields' ) );   // profile.php
80
-        add_action( 'edit_user_profile', array( $this, '_replyToPrintFields' ) );   // profile.php
81
-        add_action( 'user_new_form', array( $this, '_replyToPrintFields' ) );   // user-new.php
79
+        add_action( 'show_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php
80
+        add_action( 'edit_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php
81
+        add_action( 'user_new_form', array( $this, '_replyToPrintFields' ) ); // user-new.php
82 82
         
83 83
         // Hooks to save field values.
84 84
         add_action( 'personal_options_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php
85
-        add_action( 'edit_user_profile_update', array( $this, '_replyToSaveFieldValues' ) );    // profile.php
86
-        add_action('user_register', array( $this, '_replyToSaveFieldValues' ) );    // user-new.php
85
+        add_action( 'edit_user_profile_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php
86
+        add_action( 'user_register', array( $this, '_replyToSaveFieldValues' ) ); // user-new.php
87 87
         
88 88
     }           
89 89
     
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      */
67 67
     public function _replyToDetermineToLoad( /* $oScreen */ ) {
68 68
         
69
-        if ( ! $this->_isInThePage() ) { 
69
+        if ( ! $this->_isInThePage() ) {
70 70
             return; 
71 71
         }
72 72
 
Please login to merge, or discard this patch.
development/factory/user_meta/AdminPageFramework_UserMeta_View.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@
 block discarded – undo
45 45
         $_aOutput = array();
46 46
 
47 47
         // Get the field outputs
48
-        $_aOutput[] = $this->oForm->get();
48
+        $_aOutput[ ] = $this->oForm->get();
49 49
         
50 50
         // Filter the output
51 51
         $_sOutput = $this->oUtil->addAndApplyFilters( 
52 52
             $this, 
53
-            'content_' . $this->oProp->sClassName, 
53
+            'content_'.$this->oProp->sClassName, 
54 54
             $this->content( implode( PHP_EOL, $_aOutput ) )
55 55
         );
56 56
 
57 57
         // Do action 
58
-        $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this );       
58
+        $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this );       
59 59
 
60 60
         // Output
61 61
         echo $_sOutput;    
Please login to merge, or discard this patch.
factory/user_meta/_controller/AdminPageFramework_Resource_UserMeta.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,5 +20,5 @@
 block discarded – undo
20 20
  * @extends     AdminPageFramework_Resource_MetaBox
21 21
  * @internal
22 22
  */
23
-class AdminPageFramework_Resource_UserMeta extends AdminPageFramework_Resource_MetaBox {    
23
+class AdminPageFramework_Resource_UserMeta extends AdminPageFramework_Resource_MetaBox {
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
factory/user_meta/_model/AdminPageFramework_UserMeta_Model___UserMeta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function get() {
46 46
 
47
-        if ( ! $this->iUserID ) {
47
+        if ( !$this->iUserID ) {
48 48
             return array();
49 49
         }
50 50
         return $this->_getSavedDataFromFieldsets(
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
             
64 64
             $_aMetaKeys  = array_keys( get_user_meta( $iUserID ) );
65 65
             $_aMetaData  = array();
66
-            foreach( $aFieldsets as $_sSectionID => $_aFieldsets ) {
66
+            foreach ( $aFieldsets as $_sSectionID => $_aFieldsets ) {
67 67
                 
68
-                if ( '_default' == $_sSectionID  ) {
69
-                    foreach( $_aFieldsets as $_aFieldset ) {
70
-                        if ( ! in_array( $_aFieldset[ 'field_id' ], $_aMetaKeys ) ) {
68
+                if ( '_default' == $_sSectionID ) {
69
+                    foreach ( $_aFieldsets as $_aFieldset ) {
70
+                        if ( !in_array( $_aFieldset[ 'field_id' ], $_aMetaKeys ) ) {
71 71
                             continue;
72 72
                         }                        
73 73
                         $_aMetaData[ $_aFieldset[ 'field_id' ] ] = get_user_meta( 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                         );
78 78
                     }
79 79
                 }
80
-                if ( ! in_array( $_sSectionID, $_aMetaKeys ) ) {
80
+                if ( !in_array( $_sSectionID, $_aMetaKeys ) ) {
81 81
                     continue;
82 82
                 }                                
83 83
                 $_aMetaData[ $_sSectionID ] = get_user_meta( 
Please login to merge, or discard this patch.
development/factory/widget/AdminPageFramework_Widget.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     * 
43 43
     * @return void
44 44
     */
45
-    public function __construct( $sWidgetTitle, $aWidgetArguments=array(), $sCapability='edit_theme_options', $sTextDomain='admin-page-framework' ) {
45
+    public function __construct( $sWidgetTitle, $aWidgetArguments = array(), $sCapability = 'edit_theme_options', $sTextDomain = 'admin-page-framework' ) {
46 46
         
47 47
         if ( empty( $sWidgetTitle ) ) { 
48 48
             return; 
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
      
51 51
         // Properties
52 52
         $this->oProp = new AdminPageFramework_Property_Widget( 
53
-            $this,                  // caller object
54
-            null,                   // the caller script path
55
-            get_class( $this ),     // class name
56
-            $sCapability,           // capability 
57
-            $sTextDomain,           // text domain
53
+            $this, // caller object
54
+            null, // the caller script path
55
+            get_class( $this ), // class name
56
+            $sCapability, // capability 
57
+            $sTextDomain, // text domain
58 58
             self::$_sStructureType  // fields type
59 59
         );
60 60
         
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @package     AdminPageFramework
16 16
  * @subpackage  Widget
17 17
  */
18
-abstract class AdminPageFramework_Widget extends AdminPageFramework_Widget_Controller {    
18
+abstract class AdminPageFramework_Widget extends AdminPageFramework_Widget_Controller {
19 19
        
20 20
     /**
21 21
      * Defines the class object structure type.
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     */
45 45
     public function __construct( $sWidgetTitle, $aWidgetArguments=array(), $sCapability='edit_theme_options', $sTextDomain='admin-page-framework' ) {
46 46
         
47
-        if ( empty( $sWidgetTitle ) ) { 
47
+        if ( empty( $sWidgetTitle ) ) {
48 48
             return; 
49 49
         }
50 50
      
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,19 +25,19 @@
 block discarded – undo
25 25
     static protected $_sFieldsType = 'widget';
26 26
        
27 27
     /**
28
-    * The constructor of the class object.
29
-    * 
30
-    * Registers necessary hooks and sets up internal properties.
31
-    * 
32
-    * <h4>Example</h4>
33
-    * <code>
34
-    *   new APF_Widget( __( 'Admin Page Framework', 'admin-page-framework-demo' ) );  // the widget title
35
-    *   new APF_Widget_CustomFieldTypes( __( 'APF - Advanced', 'admin-page-framework-demo' ) );
36
-    *   new APF_Widget_Example( __( 'APF - GitHub Button', 'admin-page-framework-demo' ) );
37
-    * </code>
38
-    * 
39
-    * @return void
40
-    */
28
+     * The constructor of the class object.
29
+     * 
30
+     * Registers necessary hooks and sets up internal properties.
31
+     * 
32
+     * <h4>Example</h4>
33
+     * <code>
34
+     *   new APF_Widget( __( 'Admin Page Framework', 'admin-page-framework-demo' ) );  // the widget title
35
+     *   new APF_Widget_CustomFieldTypes( __( 'APF - Advanced', 'admin-page-framework-demo' ) );
36
+     *   new APF_Widget_Example( __( 'APF - GitHub Button', 'admin-page-framework-demo' ) );
37
+     * </code>
38
+     * 
39
+     * @return void
40
+     */
41 41
     public function __construct( $sWidgetTitle, $aWidgetArguments=array(), $sCapability='edit_theme_options', $sTextDomain='admin-page-framework' ) {
42 42
         
43 43
         if ( empty( $sWidgetTitle ) ) { 
Please login to merge, or discard this patch.
development/factory/widget/AdminPageFramework_Widget_Model.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
         
40 40
         if ( $this->oProp->bIsAdmin ) {
41 41
             add_filter( 
42
-                'validation_' . $this->oProp->sClassName,
42
+                'validation_'.$this->oProp->sClassName,
43 43
                 array( $this, '_replyToSortInputs' ),
44
-                1,  // set a high priority 
44
+                1, // set a high priority 
45 45
                 3   // number of parameters
46 46
             );            
47 47
         }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function _replyToRegisterWidget() {
112 112
         
113 113
         global $wp_widget_factory;
114
-        if ( ! is_object( $wp_widget_factory ) ) { 
114
+        if ( !is_object( $wp_widget_factory ) ) { 
115 115
             return; 
116 116
         }
117 117
         
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @subpackage  Widget
19 19
  * @internal
20 20
  */
21
-abstract class AdminPageFramework_Widget_Model extends AdminPageFramework_Widget_Router {    
21
+abstract class AdminPageFramework_Widget_Model extends AdminPageFramework_Widget_Router {
22 22
 
23 23
     /**
24 24
      * Sets up hooks and properties.
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         
31 31
         parent::__construct( $oProp );   
32 32
 
33
-        if ( did_action( 'widgets_init' ) ) { 
33
+        if ( did_action( 'widgets_init' ) ) {
34 34
             add_action( "set_up_{$this->oProp->sClassName}", array( $this, '_replyToRegisterWidget' ), 20 ); 
35 35
         } else {
36 36
             // set a lower priority to let the setUp method gets processed earlier.
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
          * @return      array
55 55
          * @callback    filter      validation_{factory class name}
56 56
          */
57
-        public function _replyToSortInputs( $aSubmittedFormData, $aStoredFormData, $oFactory ) {            
57
+        public function _replyToSortInputs( $aSubmittedFormData, $aStoredFormData, $oFactory ) {
58 58
 // @todo examine whether stripslashes_deep() is necceary or not.
59 59
             return $this->oForm->getSortedInputs( $aSubmittedFormData ); 
60 60
         }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function _replyToRegisterWidget() {
112 112
         
113 113
         global $wp_widget_factory;
114
-        if ( ! is_object( $wp_widget_factory ) ) { 
114
+        if ( ! is_object( $wp_widget_factory ) ) {
115 115
             return; 
116 116
         }
117 117
         
Please login to merge, or discard this patch.
development/factory/widget/AdminPageFramework_Widget_Router.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
  * @subpackage  Widget
17 17
  * @internal
18 18
  */
19
-abstract class AdminPageFramework_Widget_Router extends AdminPageFramework_Factory {    
19
+abstract class AdminPageFramework_Widget_Router extends AdminPageFramework_Factory {
20 20
             
21 21
     /**
22 22
      * Determines whether the currently loaded page is of the post type page.
Please login to merge, or discard this patch.
development/factory/widget/AdminPageFramework_Widget_View.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @package     AdminPageFramework
18 18
  * @subpackage  Widget
19 19
  */
20
-abstract class AdminPageFramework_Widget_View extends AdminPageFramework_Widget_Model {    
20
+abstract class AdminPageFramework_Widget_View extends AdminPageFramework_Widget_Model {
21 21
  
22 22
     /**
23 23
      * Filters the post type post content.
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      * @remark  This class should be overridden in the extended class so that the user can display own contents.
40 40
      * @since   3.2.0
41 41
      */
42
-    public function content( $sContent, $aArguments, $aFormData ) { 
42
+    public function content( $sContent, $aArguments, $aFormData ) {
43 43
         return $sContent; 
44 44
     }
45 45
     
Please login to merge, or discard this patch.
factory/widget/_controller/AdminPageFramework_Resource_Widget.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      * @since       3.2.0
30 30
      * @internal
31 31
      */
32
-    public function _enqueueStyles( $aSRCs, $aCustomArgs=array() ) {
32
+    public function _enqueueStyles( $aSRCs, $aCustomArgs = array() ) {
33 33
         
34 34
         $_aHandleIDs = array();
35
-        foreach( ( array ) $aSRCs as $_sSRC ) {
36
-            $_aHandleIDs[] = $this->_enqueueStyle( $_sSRC, $aCustomArgs );
35
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
36
+            $_aHandleIDs[ ] = $this->_enqueueStyle( $_sSRC, $aCustomArgs );
37 37
         }
38 38
         return $_aHandleIDs;
39 39
         
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
49 49
      * @internal
50 50
      */    
51
-    public function _enqueueStyle( $sSRC, $aCustomArgs=array() ) {
51
+    public function _enqueueStyle( $sSRC, $aCustomArgs = array() ) {
52 52
         
53 53
         $sSRC = trim( $sSRC );
54 54
         if ( empty( $sSRC ) ) { 
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
             array(     
68 68
                 'sSRC'          => $sSRC,
69 69
                 'sType'         => 'style',
70
-                'handle_id'     => 'style_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->iEnqueuedStyleIndex ),
70
+                'handle_id'     => 'style_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedStyleIndex ),
71 71
             ),
72 72
             self::$_aStructure_EnqueuingResources
73 73
         );
74 74
         
75 75
         // Store the attributes in another container by url.
76
-        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ]['attributes'];
76
+        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'attributes' ];
77 77
         
78 78
         return $this->oProp->aEnqueuingStyles[ $_sSRCHash ][ 'handle_id' ];
79 79
         
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
      * @since       3.2.0
86 86
      * @internal
87 87
      */
88
-    public function _enqueueScripts( $aSRCs, $aCustomArgs=array() ) {
88
+    public function _enqueueScripts( $aSRCs, $aCustomArgs = array() ) {
89 89
         
90 90
         $_aHandleIDs = array();
91
-        foreach( ( array ) $aSRCs as $_sSRC ) {
92
-            $_aHandleIDs[] = $this->_enqueueScript( $_sSRC, $aCustomArgs );
91
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
92
+            $_aHandleIDs[ ] = $this->_enqueueScript( $_sSRC, $aCustomArgs );
93 93
         }
94 94
         return $_aHandleIDs;
95 95
         
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
105 105
      * @internal
106 106
      */
107
-    public function _enqueueScript( $sSRC, $aCustomArgs=array() ) {
107
+    public function _enqueueScript( $sSRC, $aCustomArgs = array() ) {
108 108
         
109 109
         $sSRC       = trim( $sSRC );
110 110
         if ( empty( $sSRC ) ) { return ''; }
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
             array(     
120 120
                 'sSRC'      => $sSRC,
121 121
                 'sType'     => 'script',
122
-                'handle_id' => 'script_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->iEnqueuedScriptIndex ),
122
+                'handle_id' => 'script_'.$this->oProp->sClassName.'_'.( ++$this->oProp->iEnqueuedScriptIndex ),
123 123
             ),
124 124
             self::$_aStructure_EnqueuingResources
125 125
         );
126 126
 
127 127
         // Store the attributes in another container by url.
128
-        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['handle_id'] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ]['attributes'];
128
+        $this->oProp->aResourceAttributes[ $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'attributes' ];
129 129
         
130 130
         return $this->oProp->aEnqueuingScripts[ $_sSRCHash ][ 'handle_id' ];
131 131
         
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * @since       3.2.0
140 140
      * @internal
141 141
      */
142
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {
142
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {
143 143
         return $this->_enqueueStyle( $sSRC, $aCustomArgs );
144 144
     }
145 145
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @since       3.2.0
150 150
      * @internal
151 151
      */    
152
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {
152
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {
153 153
         return $this->_enqueueScript( $sSRC, $aCustomArgs );
154 154
     }
155 155
     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@
 block discarded – undo
51 51
     public function _enqueueStyle( $sSRC, $aCustomArgs=array() ) {
52 52
         
53 53
         $sSRC = trim( $sSRC );
54
-        if ( empty( $sSRC ) ) { 
54
+        if ( empty( $sSRC ) ) {
55 55
             return ''; 
56 56
         }
57 57
         $sSRC       = $this->getResolvedSRC( $sSRC );
58 58
         
59 59
         // Setting the key based on the url prevents duplicate items
60 60
         $_sSRCHash  = md5( $sSRC ); 
61
-        if ( isset( $this->oProp->aEnqueuingStyles[ $_sSRCHash ] ) ) { 
61
+        if ( isset( $this->oProp->aEnqueuingStyles[ $_sSRCHash ] ) ) {
62 62
             return ''; 
63 63
         } 
64 64
         
Please login to merge, or discard this patch.