Completed
Branch master (b9c20c)
by
unknown
03:58
created
development/factory/widget/_model/AdminPageFramework_Property_widget.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * Stores method names of the `WP_Widget` class, referred when the class is assumed as a WP_Widget subclass.
116 116
      * @since       3.8.17
117 117
      */
118
-    public $aWPWidgetMethods    = array();
118
+    public $aWPWidgetMethods = array();
119 119
     /**
120 120
      * Stores property names of the `WP_Widget` class, , referred when the class is assumed as a WP_Widget subclass.
121 121
      * @since       3.8.17
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
      * Sets up properties.
127 127
      * @since       3.7.0
128 128
      */
129
-    public function __construct( $oCaller, $sCallerPath, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType ) {
129
+    public function __construct( $oCaller, $sCallerPath, $sClassName, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework', $sStructureType ) {
130 130
 
131 131
         // 3.7.0+
132
-        $this->_sFormRegistrationHook   = 'load_' . $sClassName; 
132
+        $this->_sFormRegistrationHook   = 'load_'.$sClassName; 
133 133
         
134 134
         // 3.7.9+ - setting a custom action hook for admin notices prevents the form object from being instantiated unnecessarily.
135
-        $this->sSettingNoticeActionHook = 'load_' . $sClassName; 
135
+        $this->sSettingNoticeActionHook = 'load_'.$sClassName; 
136 136
 
137 137
         parent::__construct(
138 138
             $oCaller,
Please login to merge, or discard this patch.
development/factory/_common/form/AdminPageFramework_Form_Meta.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
      * @param       string      $sStructureType    The type of object. Currently 'post_meta_box' or 'user_meta' is accepted.
33 33
      * @return      void
34 34
      */
35
-    public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sStructureType='post_meta_box' ) {
35
+    public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sStructureType = 'post_meta_box' ) {
36 36
 
37
-        if ( ! $iObjectID ) {
37
+        if ( !$iObjectID ) {
38 38
             return;
39 39
         }
40 40
            
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             'user_meta'         => 'update_user_meta',               
44 44
             'term_meta'         => 'update_term_meta',               
45 45
         );
46
-        if ( ! in_array( $sStructureType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) {
46
+        if ( !in_array( $sStructureType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) {
47 47
             return;
48 48
         }
49 49
         $_sFunctionName = $this->getElement( $_aFunctionNameMapByFieldsType, $sStructureType );
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
             $_vSavedValue = $this->getElement(
82 82
                 $aSavedMeta, // subject
83
-                $_sSectionOrFieldID,    // dimensional keys
83
+                $_sSectionOrFieldID, // dimensional keys
84 84
                 null   // default value
85 85
             );
86 86
                 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
          */
75 75
         private function _updateMetaDatumByFunctionName( $iObjectID, $_vValue, array $aSavedMeta, $_sSectionOrFieldID, $_sFunctionName ) {
76 76
             
77
-            if ( is_null( $_vValue ) ) { 
77
+            if ( is_null( $_vValue ) ) {
78 78
                 return;
79 79
             }
80 80
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 
87 87
             // PHP can compare even array contents with the == operator. See http://www.php.net/manual/en/language.operators.array.php
88 88
             // if the input value and the saved meta value are the same, no need to update it.
89
-            if ( $_vValue == $_vSavedValue ) { 
89
+            if ( $_vValue == $_vSavedValue ) {
90 90
                 return; 
91 91
             }
92 92
             
Please login to merge, or discard this patch.
development/factory/_common/form/AdminPageFramework_Form_Utility.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
      * For the `admin_page` fields type, an option key is prepended.
44 44
      * For `page_meta_box`, no prepended element and it starts with the section or field ID.
45 45
      */
46
-    static public function getInputsUnset( array $aInputs, $sFieldsType, $iSkipDepth=0 ) {
46
+    static public function getInputsUnset( array $aInputs, $sFieldsType, $iSkipDepth = 0 ) {
47 47
 
48
-        $_sUnsetKey = '__unset_' . $sFieldsType;
49
-        if ( ! isset( $_POST[ $_sUnsetKey ] ) ) {
48
+        $_sUnsetKey = '__unset_'.$sFieldsType;
49
+        if ( !isset( $_POST[ $_sUnsetKey ] ) ) {
50 50
             return $aInputs;
51 51
         }
52 52
 
53 53
         $_aUnsetElements = array_unique( $_POST[ $_sUnsetKey ] );
54
-        foreach( $_aUnsetElements as $_sFlatInputName ) {
54
+        foreach ( $_aUnsetElements as $_sFlatInputName ) {
55 55
 
56 56
             $_aDimensionalKeys = explode( '|', $_sFlatInputName );
57 57
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             }
62 62
 
63 63
             // The first element is the option key for the `admin_page` field type and section or field dimensional keys follow.
64
-            for ( $_i = 0; $_i < $iSkipDepth; $_i++) {
64
+            for ( $_i = 0; $_i < $iSkipDepth; $_i++ ) {
65 65
                 unset( $_aDimensionalKeys[ $_i ] );
66 66
             }
67 67
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     static public function hasNestedFields( $aFieldset ) {
120 120
         
121
-        if ( ! self::hasFieldDefinitionsInContent( $aFieldset ) ) {
121
+        if ( !self::hasFieldDefinitionsInContent( $aFieldset ) ) {
122 122
             return false;
123 123
         }
124 124
         // At this point, the `content` argument contains either the definition of nested fields or inline-mixed fields.
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      */
141 141
     static public function hasFieldDefinitionsInContent( $aFieldset ) {
142 142
         
143
-        if ( ! isset( $aFieldset[ 'content' ] ) ) {
143
+        if ( !isset( $aFieldset[ 'content' ] ) ) {
144 144
             return false;
145 145
         }
146 146
         if ( empty( $aFieldset[ 'content' ] ) ) {
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
      * @since       3.8.13
176 176
      */
177 177
     static public function isDynamicField( $aField ) {
178
-        if ( ! empty( $aField[ 'repeatable' ] ) ) {
178
+        if ( !empty( $aField[ 'repeatable' ] ) ) {
179 179
             return true;
180 180
         }
181
-        if ( ! empty( $aField[ 'sortable' ] ) ) {
181
+        if ( !empty( $aField[ 'sortable' ] ) ) {
182 182
             return true;
183 183
         }
184 184
         return false;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         if ( empty( $sString ) ) {
208 208
             return $sString;
209 209
         }
210
-        return $sString . '|';
210
+        return $sString.'|';
211 211
     }
212 212
 
213 213
     /**
@@ -223,17 +223,17 @@  discard block
 block discarded – undo
223 223
      */
224 224
     static public function getFieldsetReformattedBySubFieldIndex( $aFieldset, $iSubFieldIndex, $bHasSubFields, $aParentFieldset ) {
225 225
 
226
-        $_oCallerForm   = $aFieldset[ '_caller_object' ];
226
+        $_oCallerForm = $aFieldset[ '_caller_object' ];
227 227
 
228 228
         // Add sub-field index to the parent field path for repeated nested items.
229
-        $aFieldset[ '_parent_field_path' ]   = self::getAOrB(
229
+        $aFieldset[ '_parent_field_path' ] = self::getAOrB(
230 230
             $bHasSubFields,
231
-            $aFieldset[ '_parent_field_path' ] . '|' . $iSubFieldIndex,
231
+            $aFieldset[ '_parent_field_path' ].'|'.$iSubFieldIndex,
232 232
             $aFieldset[ '_parent_field_path' ]
233 233
         );
234
-        $aFieldset[ '_parent_tag_id' ]       = self::getAOrB(
234
+        $aFieldset[ '_parent_tag_id' ] = self::getAOrB(
235 235
             $bHasSubFields,
236
-            $aParentFieldset[ 'tag_id' ] . '__' . $iSubFieldIndex,
236
+            $aParentFieldset[ 'tag_id' ].'__'.$iSubFieldIndex,
237 237
             $aParentFieldset[ 'tag_id' ]
238 238
         );
239 239
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             $aFieldset,
243 243
             $aFieldset[ '_structure_type' ],
244 244
             $aFieldset[ 'capability' ],
245
-            ( integer ) $iSubFieldIndex + 1,   // 1-based count (not index)
245
+            ( integer ) $iSubFieldIndex + 1, // 1-based count (not index)
246 246
             $aFieldset[ '_subsection_index' ],
247 247
             $aFieldset[ '_is_section_repeatable' ],
248 248
             $aFieldset[ '_caller_object' ]
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
         $_oFieldsetOutputFormatter = new AdminPageFramework_Form_Model___Format_FieldsetOutput(
253 253
             $aFieldset,
254
-            $aFieldset[ '_section_index' ],    // `_section_index` is defined in the ...FieldsetOutput class. Since this is a nested item, it should be already set.
254
+            $aFieldset[ '_section_index' ], // `_section_index` is defined in the ...FieldsetOutput class. Since this is a nested item, it should be already set.
255 255
             $_oCallerForm->aFieldTypeDefinitions
256 256
         );
257 257
         return $_oFieldsetOutputFormatter->get();
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
         if ( empty( $aArguments ) ) {
289 289
             return '';
290 290
         }
291
-        if ( self::hasBeenCalled( 'disabled_repeatable_elements_modal_' . $sBoxElementID ) ) {
291
+        if ( self::hasBeenCalled( 'disabled_repeatable_elements_modal_'.$sBoxElementID ) ) {
292 292
             return '';
293 293
         }
294 294
         add_thickbox(); // to display a message to the user.
295 295
         return "<div id='{$sBoxElementID}' style='display:none'>"
296
-                . "<p>" . $aArguments[ 'message' ] . "</p>"
296
+                . "<p>".$aArguments[ 'message' ]."</p>"
297 297
             . "</div>";
298 298
 
299 299
     }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
             // For form sections, a dummy key is set
59 59
             if ( '__dummy_option_key' === $_aDimensionalKeys[ 0 ] ) {
60
-                 array_shift( $_aDimensionalKeys );
60
+                    array_shift( $_aDimensionalKeys );
61 61
             }
62 62
 
63 63
             // The first element is the option key for the `admin_page` field type and section or field dimensional keys follow.
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         }
130 130
         
131 131
         // If the first element is a string, it is an inline mixed field definition.
132
-       return is_array( self::getElement( $aFieldset[ 'content' ], 0 ) );
132
+        return is_array( self::getElement( $aFieldset[ 'content' ], 0 ) );
133 133
        
134 134
     }  
135 135
 
Please login to merge, or discard this patch.
delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $this->oFactory = $oFactory;
30 30
         
31 31
         add_filter(
32
-            "validation_pre_" . $this->oFactory->oProp->sClassName,
32
+            "validation_pre_".$this->oFactory->oProp->sClassName,
33 33
             array( $this, '_replyToValidateUserFormInputs' ),
34 34
             10,
35 35
             4
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $_sSubmitSectionID  = $this->_getPressedSubmitButtonData( $_aSubmits, 'section_id' );
61 61
             
62 62
             // Submit Information - [3.5.0+] this will be passed to validation callback methods.
63
-            $_aSubmitsInformation        = array(
63
+            $_aSubmitsInformation = array(
64 64
                 'page_slug'     => $_sPageSlug,
65 65
                 'tab_slug'      => $_sTabSlug,
66 66
                 'input_id'      => $this->_getPressedSubmitButtonData( $_aSubmits, 'input_id' ), 
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
                 'AdminPageFramework_Model__FormSubmission__Validator__Export',
81 81
                 'AdminPageFramework_Model__FormSubmission__Validator__Reset',
82 82
                 'AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm', // 3.7.6+ Moved to after validation from before validation
83
-                'AdminPageFramework_Model__FormSubmission__Validator__ContactForm',  // 3.7.6+ Moved to after validation from before validation
83
+                'AdminPageFramework_Model__FormSubmission__Validator__ContactForm', // 3.7.6+ Moved to after validation from before validation
84 84
                 'AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm',
85 85
                 
86 86
             );
87
-            foreach( $_aClassNames as $_sClassName ) {
87
+            foreach ( $_aClassNames as $_sClassName ) {
88 88
                 new $_sClassName( $this->oFactory );
89 89
             }
90 90
             
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 
94 94
                 $this->addAndDoActions(
95 95
                     $this->oFactory,
96
-                    'try_validation_before_' . $this->oFactory->oProp->sClassName,
96
+                    'try_validation_before_'.$this->oFactory->oProp->sClassName,
97 97
                     $aInputs,
98 98
                     $aRawInputs,
99 99
                     $_aSubmits,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
                 $this->addAndDoActions(
114 114
                     $this->oFactory,
115
-                    'try_validation_after_' . $this->oFactory->oProp->sClassName,
115
+                    'try_validation_after_'.$this->oFactory->oProp->sClassName,
116 116
                     $aInputs,
117 117
                     $aRawInputs,
118 118
                     $_aSubmits,
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_View_Form.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -27,17 +27,17 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function _replyToGetSectionName( /* $sAttribute, $aSectionset */ ) {
29 29
 
30
-        $_aParams            = func_get_args() + array( null, null, );
30
+        $_aParams            = func_get_args() + array( null, null,);
31 31
         $sNameAttribute      = $_aParams[ 0 ];
32 32
         $aSectionset         = $_aParams[ 1 ];        
33 33
         $_aSectionPath       = $aSectionset[ '_section_path_array' ];
34 34
         $_aDimensionalKeys   = array( $this->oProp->sOptionKey );   
35
-        foreach( $_aSectionPath as $_sDimension ) {
36
-            $_aDimensionalKeys[] = '[' . $_sDimension . ']';
35
+        foreach ( $_aSectionPath as $_sDimension ) {
36
+            $_aDimensionalKeys[ ] = '['.$_sDimension.']';
37 37
         }
38 38
         
39 39
         if ( isset( $aSectionset[ '_index' ] ) ) {
40
-            $_aDimensionalKeys[] = '[' . $aSectionset[ '_index' ] . ']';
40
+            $_aDimensionalKeys[ ] = '['.$aSectionset[ '_index' ].']';
41 41
         }
42 42
         
43 43
         return implode( '', $_aDimensionalKeys );
@@ -50,25 +50,25 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function _replyToGetFieldNameAttribute( /* $sAttribute, $aFieldset */ ) {
52 52
         
53
-        $_aParams           = func_get_args() + array( null, null,  );
53
+        $_aParams           = func_get_args() + array( null, null,);
54 54
         $sNameAttribute     = $_aParams[ 0 ];
55 55
         $aFieldset          = $_aParams[ 1 ];
56 56
         $_aDimensionalKeys  = array( 
57 57
             $this->oProp->sOptionKey    // Use `$this->oProp->sOptionKey` instead of `$aFieldset[ 'option_key' ]` which is not set for nested items.
58 58
         );        
59 59
         if ( $this->isSectionSet( $aFieldset ) ) {
60
-            $_aSectionPath       = $aFieldset[ '_section_path_array' ];
61
-            foreach( $_aSectionPath as $_sDimension ) {
62
-                $_aDimensionalKeys[] = '[' . $_sDimension . ']';
60
+            $_aSectionPath = $aFieldset[ '_section_path_array' ];
61
+            foreach ( $_aSectionPath as $_sDimension ) {
62
+                $_aDimensionalKeys[ ] = '['.$_sDimension.']';
63 63
             }
64 64
             if ( isset( $aFieldset[ '_section_index' ] ) ) {
65
-                $_aDimensionalKeys[] = '[' . $aFieldset[ '_section_index' ] . ']';
65
+                $_aDimensionalKeys[ ] = '['.$aFieldset[ '_section_index' ].']';
66 66
             }
67 67
         }
68 68
         
69 69
         // 3.8.0+ Support for nested fields.
70
-        foreach( $aFieldset[ '_field_path_array' ] as $_sPathPart ) {
71
-            $_aDimensionalKeys[] = '[' . $_sPathPart . ']';
70
+        foreach ( $aFieldset[ '_field_path_array' ] as $_sPathPart ) {
71
+            $_aDimensionalKeys[ ] = '['.$_sPathPart.']';
72 72
         }
73 73
 
74 74
         return implode( '', $_aDimensionalKeys );
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function _replyToGetFlatFieldName( /* $sAttribute, $aFieldset */ ) {
83 83
 
84
-        $_aParams           = func_get_args() + array( null, null,  );
84
+        $_aParams           = func_get_args() + array( null, null,);
85 85
         $sNameAttribute     = $_aParams[ 0 ];
86 86
         $aFieldset          = $_aParams[ 1 ];        
87 87
         
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
             $this->oProp->sOptionKey    // Use `$this->oProp->sOptionKey` instead of `$aFieldset[ 'option_key' ]` which is not set for nested items.
90 90
         );
91 91
         if ( $this->isSectionSet( $aFieldset ) ) {
92
-            foreach( $aFieldset[ '_section_path_array' ] as $_sDimension ) {
93
-                $_aDimensionalKeys[] = $_sDimension; // $aFieldset[ 'section_id' ];
92
+            foreach ( $aFieldset[ '_section_path_array' ] as $_sDimension ) {
93
+                $_aDimensionalKeys[ ] = $_sDimension; // $aFieldset[ 'section_id' ];
94 94
             }
95 95
             if ( isset( $aFieldset[ '_section_index' ] ) ) {
96
-                $_aDimensionalKeys[] = $aFieldset[ '_section_index' ];    
96
+                $_aDimensionalKeys[ ] = $aFieldset[ '_section_index' ];    
97 97
             }
98 98
         }
99 99
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
             "[{$sKey}]"
123 123
         );   
124 124
 
125
-        $_sNamePrefix   = $this->_replyToGetFieldNameAttribute( '', $aField );
126
-        return $_sNamePrefix . $sKey;
125
+        $_sNamePrefix = $this->_replyToGetFieldNameAttribute( '', $aField );
126
+        return $_sNamePrefix.$sKey;
127 127
         
128 128
     }
129 129
     /**
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
         $_sKey              = $this->oUtil->getAOrB(
142 142
             '0' !== $_sKey && empty( $_sKey ),
143 143
             '',
144
-            "|" . $_sKey
144
+            "|".$_sKey
145 145
         );        
146 146
         
147
-        return $this->_replyToGetFlatFieldName( '', $aField ) . $_sKey;
147
+        return $this->_replyToGetFlatFieldName( '', $aField ).$_sKey;
148 148
 
149 149
     }
150 150
             
Please login to merge, or discard this patch.