Completed
Branch master (acc4ae)
by
unknown
03:44
created
factory/admin_page/_controller/AdminPageFramework_Resource_admin_page.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         
46 46
         // tab 
47 47
         if ( $_sPageSlug && $_sTabSlug ) {
48
-            $this->oProp->sStyle     = $this->addAndApplyFilters( 
48
+            $this->oProp->sStyle = $this->addAndApplyFilters( 
49 49
                 $_oCaller, 
50 50
                 "style_{$_sPageSlug}_{$_sTabSlug}", 
51 51
                 $this->oProp->sStyle 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         
55 55
         // page
56 56
         if ( $_sPageSlug ) {
57
-            $this->oProp->sStyle     = $this->addAndApplyFilters( 
57
+            $this->oProp->sStyle = $this->addAndApplyFilters( 
58 58
                 $_oCaller, 
59 59
                 "style_{$_sPageSlug}", 
60 60
                 $this->oProp->sStyle 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
          * @return      string      The tab slug if the tab has been added.
89 89
          */
90 90
         private function _getCurrentTabSlugForFilter( $sPageSlug ) {
91
-            $_sTabSlug  = $this->oProp->getCurrentTabSlug( $sPageSlug ); 
91
+            $_sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug ); 
92 92
             return isset( $this->oProp->aInPageTabs[ $sPageSlug ][ $_sTabSlug ] )
93 93
                 ? $_sTabSlug
94 94
                 : '';          
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         
117 117
         // tab 
118 118
         if ( $_sPageSlug && $_sTabSlug ) {
119
-            $this->oProp->sScript     = $this->addAndApplyFilters( 
119
+            $this->oProp->sScript = $this->addAndApplyFilters( 
120 120
                 $_oCaller, 
121 121
                 "script_{$_sPageSlug}_{$_sTabSlug}", 
122 122
                 $this->oProp->sScript 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         
126 126
         // page
127 127
         if ( $_sPageSlug ) {
128
-            $this->oProp->sScript     = $this->addAndApplyFilters( 
128
+            $this->oProp->sScript = $this->addAndApplyFilters( 
129 129
                 $_oCaller, 
130 130
                 "script_{$_sPageSlug}", 
131 131
                 $this->oProp->sScript 
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
      * @since 2.1.5
144 144
      * @internal
145 145
      */
146
-    public function _enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
146
+    public function _enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
147 147
         
148 148
         $_aHandleIDs = array();
149
-        foreach( ( array ) $aSRCs as $_sSRC ) {
150
-            $_aHandleIDs[] = $this->_enqueueStyle( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
149
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
150
+            $_aHandleIDs[ ] = $this->_enqueueStyle( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
151 151
         }
152 152
         return $_aHandleIDs;
153 153
         
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      * @return      string  The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
174 174
      * @internal
175 175
      */    
176
-    public function _enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
176
+    public function _enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
177 177
         return $this->_enqueueResourceByType( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs, 'style' );        
178 178
     }
179 179
     
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
      * 
183 183
      * @since 2.1.5
184 184
      */
185
-    public function _enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
185
+    public function _enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
186 186
         
187 187
         $_aHandleIDs = array();
188
-        foreach( ( array ) $aSRCs as $_sSRC ) {
189
-            $_aHandleIDs[] = $this->_enqueueScript( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
188
+        foreach ( ( array ) $aSRCs as $_sSRC ) {
189
+            $_aHandleIDs[ ] = $this->_enqueueScript( $_sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
190 190
         }
191 191
         return $_aHandleIDs;
192 192
         
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
214 214
      * @internal
215 215
      */
216
-    public function _enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
216
+    public function _enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
217 217
         return $this->_enqueueResourceByType( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs, 'script' );
218 218
     }
219 219
         /**
@@ -226,20 +226,20 @@  discard block
 block discarded – undo
226 226
          * @param       array       $aCustomArgs    A custom argument array.
227 227
          * @param       string      $sType          Accepts 'style' or 'script'
228 228
          */
229
-        private function _enqueueResourceByType( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array(), $sType='style' ) {
229
+        private function _enqueueResourceByType( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array(), $sType = 'style' ) {
230 230
             
231
-            $sSRC       = trim( $sSRC );
231
+            $sSRC = trim( $sSRC );
232 232
             if ( empty( $sSRC ) ) { 
233 233
                 return ''; 
234 234
             }
235
-            $sSRC       = $this->getResolvedSRC( $sSRC );
235
+            $sSRC = $this->getResolvedSRC( $sSRC );
236 236
 
237 237
             // Get the property name for the type
238 238
             $_sContainerPropertyName     = $this->_getContainerPropertyNameByType( $sType );
239 239
             $_sEnqueuedIndexPropertyName = $this->_getEnqueuedIndexPropertyNameByType( $sType );
240 240
             
241 241
             // setting the key based on the url prevents duplicate items
242
-            $_sSRCHash  = md5( $sSRC );
242
+            $_sSRCHash = md5( $sSRC );
243 243
             if ( isset( $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ] ) ) { 
244 244
                 return ''; 
245 245
             } 
@@ -250,13 +250,13 @@  discard block
 block discarded – undo
250 250
                     'sTabSlug'  => $sTabSlug,
251 251
                     'sSRC'      => $sSRC,
252 252
                     'sType'     => $sType,
253
-                    'handle_id' => $sType . '_' . $this->oProp->sClassName . '_' .  ( ++$this->oProp->{$_sEnqueuedIndexPropertyName} ),
253
+                    'handle_id' => $sType.'_'.$this->oProp->sClassName.'_'.( ++$this->oProp->{$_sEnqueuedIndexPropertyName} ),
254 254
                 )
255 255
                 + self::$_aStructure_EnqueuingResources
256 256
                 ;
257 257
 
258 258
             // Store the attributes in another container by url.
259
-            $this->oProp->aResourceAttributes[ $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ]['handle_id'] ] = $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ]['attributes'];
259
+            $this->oProp->aResourceAttributes[ $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ][ 'handle_id' ] ] = $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ][ 'attributes' ];
260 260
             
261 261
             return $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ][ 'handle_id' ];
262 262
             
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      * @since       3.0.0
297 297
      * @internal
298 298
      */
299
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {
299
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {
300 300
         return $this->_enqueueStyle( $sSRC, '', '', $aCustomArgs );
301 301
     }
302 302
     /**
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      * @since       3.0.0
307 307
      * @internal
308 308
      */    
309
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {
309
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {
310 310
         return $this->_enqueueScript( $sSRC, '', '', $aCustomArgs );
311 311
     }
312 312
     
@@ -323,11 +323,11 @@  discard block
 block discarded – undo
323 323
 
324 324
         $sCurrentPageSlug   = $this->oProp->getCurrentPageSlug();
325 325
         $sCurrentTabSlug    = $this->oProp->getCurrentTabSlug( $sCurrentPageSlug );
326
-        $sPageSlug          = $aEnqueueItem['sPageSlug'];
327
-        $sTabSlug           = $aEnqueueItem['sTabSlug'];
326
+        $sPageSlug          = $aEnqueueItem[ 'sPageSlug' ];
327
+        $sTabSlug           = $aEnqueueItem[ 'sTabSlug' ];
328 328
 
329 329
         // If the page slug is not specified and the currently loading page is one of the pages that is added by the framework,
330
-        if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework)
330
+        if ( !$sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework)
331 331
             return $this->_enqueueSRC( $aEnqueueItem );
332 332
         }
333 333
                 
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         // If the tab slug is not specified and the page slug is specified, 
343 343
         // and if the current loading page slug and the specified one matches,
344 344
         if ( 
345
-            ( $sPageSlug && ! $sTabSlug )
345
+            ( $sPageSlug && !$sTabSlug )
346 346
             && ( $sCurrentPageSlug == $sPageSlug )
347 347
         ) {
348 348
             return $this->_enqueueSRC( $aEnqueueItem );
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         private function _enqueueResourceByType( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array(), $sType='style' ) {
230 230
             
231 231
             $sSRC       = trim( $sSRC );
232
-            if ( empty( $sSRC ) ) { 
232
+            if ( empty( $sSRC ) ) {
233 233
                 return ''; 
234 234
             }
235 235
             $sSRC       = $this->getResolvedSRC( $sSRC );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             
241 241
             // setting the key based on the url prevents duplicate items
242 242
             $_sSRCHash  = md5( $sSRC );
243
-            if ( isset( $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ] ) ) { 
243
+            if ( isset( $this->oProp->{$_sContainerPropertyName}[ $_sSRCHash ] ) ) {
244 244
                 return ''; 
245 245
             } 
246 246
             
@@ -327,7 +327,8 @@  discard block
 block discarded – undo
327 327
         $sTabSlug           = $aEnqueueItem['sTabSlug'];
328 328
 
329 329
         // If the page slug is not specified and the currently loading page is one of the pages that is added by the framework,
330
-        if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) { // means script-global(among pages added by the framework)
330
+        if ( ! $sPageSlug && $this->oProp->isPageAdded( $sCurrentPageSlug ) ) {
331
+// means script-global(among pages added by the framework)
331 332
             return $this->_enqueueSRC( $aEnqueueItem );
332 333
         }
333 334
                 
Please login to merge, or discard this patch.
factory/admin_page/_controller/AdminPageFramework_HelpPane_admin_page.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
70 70
         $_sCurrentTabSlug   = $this->oProp->getCurrentTabSlug( $_sCurrentPageSlug );
71 71
         
72
-        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) { 
72
+        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) {
73 73
             return; 
74 74
         }
75 75
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
          */
87 87
         private function _registerHelpTab( array $aHelpTab, $sCurrentPageSlug, $sCurrentTabSlug ) {
88 88
            
89
-            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) { 
89
+            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) {
90 90
                 return;
91 91
             }
92 92
             if ( isset( $aHelpTab['sPageTabSlug'] ) && ! empty( $aHelpTab['sPageTabSlug'] ) && $sCurrentTabSlug != $aHelpTab['sPageTabSlug'] ) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
      */  
66 66
     public function _replyToRegisterHelpTabs() {
67 67
 
68
-        if ( ! $this->oProp->oCaller->isInThePage() ) {
68
+        if ( !$this->oProp->oCaller->isInThePage() ) {
69 69
             return;
70 70
         }
71 71
     
72 72
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
73 73
         $_sCurrentTabSlug   = $this->oProp->getCurrentTabSlug( $_sCurrentPageSlug );
74 74
         
75
-        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) { 
75
+        if ( !$this->oProp->isPageAdded( $_sCurrentPageSlug ) ) { 
76 76
             return; 
77 77
         }
78 78
 
79
-        foreach( $this->oProp->aHelpTabs as $aHelpTab ) {
79
+        foreach ( $this->oProp->aHelpTabs as $aHelpTab ) {
80 80
             $this->_registerHelpTab( $aHelpTab, $_sCurrentPageSlug, $_sCurrentTabSlug );
81 81
         }
82 82
         
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
          */
90 90
         private function _registerHelpTab( array $aHelpTab, $sCurrentPageSlug, $sCurrentTabSlug ) {
91 91
            
92
-            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) { 
92
+            if ( $sCurrentPageSlug != $aHelpTab[ 'sPageSlug' ] ) { 
93 93
                 return;
94 94
             }
95
-            if ( isset( $aHelpTab['sPageTabSlug'] ) && ! empty( $aHelpTab['sPageTabSlug'] ) && $sCurrentTabSlug != $aHelpTab['sPageTabSlug'] ) {
95
+            if ( isset( $aHelpTab[ 'sPageTabSlug' ] ) && !empty( $aHelpTab[ 'sPageTabSlug' ] ) && $sCurrentTabSlug != $aHelpTab[ 'sPageTabSlug' ] ) {
96 96
                 return;
97 97
             }
98 98
 
@@ -131,24 +131,24 @@  discard block
 block discarded – undo
131 131
         $aHelpTab = ( array ) $aHelpTab + self::$_aStructure_HelpTabUserArray;
132 132
         
133 133
         // If the key is not set, that means the help tab array is not created yet. So create it and go back.
134
-        if ( ! isset( $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ] ) ) {
135
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ] = array(
136
-                'sID'           => $aHelpTab['help_tab_id'],
137
-                'sTitle'        => $aHelpTab['help_tab_title'],
138
-                'aContent'      => ! empty( $aHelpTab['help_tab_content'] ) ? array( $this->_formatHelpDescription( $aHelpTab['help_tab_content'] ) ) : array(),
139
-                'aSidebar'      => ! empty( $aHelpTab['help_tab_sidebar_content'] ) ? array( $this->_formatHelpDescription( $aHelpTab['help_tab_sidebar_content'] ) ) : array(),
140
-                'sPageSlug'     => $aHelpTab['page_slug'],
141
-                'sPageTabSlug'  => $aHelpTab['page_tab_slug'],
134
+        if ( !isset( $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ] ) ) {
135
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ] = array(
136
+                'sID'           => $aHelpTab[ 'help_tab_id' ],
137
+                'sTitle'        => $aHelpTab[ 'help_tab_title' ],
138
+                'aContent'      => !empty( $aHelpTab[ 'help_tab_content' ] ) ? array( $this->_formatHelpDescription( $aHelpTab[ 'help_tab_content' ] ) ) : array(),
139
+                'aSidebar'      => !empty( $aHelpTab[ 'help_tab_sidebar_content' ] ) ? array( $this->_formatHelpDescription( $aHelpTab[ 'help_tab_sidebar_content' ] ) ) : array(),
140
+                'sPageSlug'     => $aHelpTab[ 'page_slug' ],
141
+                'sPageTabSlug'  => $aHelpTab[ 'page_tab_slug' ],
142 142
             );
143 143
             return;
144 144
         }
145 145
 
146 146
         // This line will be reached if the help tab array is already set. In this case, just append an array element into the keys.
147
-        if ( ! empty( $aHelpTab['help_tab_content'] ) ) {
148
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ]['aContent'][] = $this->_formatHelpDescription( $aHelpTab['help_tab_content'] );
147
+        if ( !empty( $aHelpTab[ 'help_tab_content' ] ) ) {
148
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ][ 'aContent' ][ ] = $this->_formatHelpDescription( $aHelpTab[ 'help_tab_content' ] );
149 149
         }
150
-        if ( ! empty( $aHelpTab['help_tab_sidebar_content'] ) ) {
151
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ]['aSidebar'][] = $this->_formatHelpDescription( $aHelpTab['help_tab_sidebar_content'] );
150
+        if ( !empty( $aHelpTab[ 'help_tab_sidebar_content' ] ) ) {
151
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ][ 'aSidebar' ][ ] = $this->_formatHelpDescription( $aHelpTab[ 'help_tab_sidebar_content' ] );
152 152
         }
153 153
         
154 154
     }
Please login to merge, or discard this patch.
factory/admin_page/_controller/AdminPageFramework_Link_admin_page.php 3 patches
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function _replyToSetFooterInfo() {
38 38
 
39
-        if ( ! $this->oProp->isPageAdded() ) { 
39
+        if ( ! $this->oProp->isPageAdded() ) {
40 40
             return; 
41 41
         }
42 42
         parent::_replyToSetFooterInfo();
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     public function _replyToAddSettingsLinkInPluginListingPage( $aLinks ) {
212 212
          
213 213
         // If the sub-pages are not added, do nothing.
214
-        if ( count( $this->oProp->aPages ) < 1 ) { 
214
+        if ( count( $this->oProp->aPages ) < 1 ) {
215 215
             return $aLinks; 
216 216
         }    
217 217
         
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     public function _replyToAddLinkToPluginDescription( $aLinks, $sFile ) {
262 262
 
263
-        if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { 
263
+        if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) {
264 264
             return $aLinks; 
265 265
         }
266 266
         
@@ -271,7 +271,8 @@  discard block
 block discarded – undo
271 271
             if ( ! $_sLLinkHTML ) {
272 272
                 continue;
273 273
             }
274
-            if ( is_array( $_sLLinkHTML ) ) {  // should not be an array
274
+            if ( is_array( $_sLLinkHTML ) ) {
275
+// should not be an array
275 276
                 $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks );
276 277
                 continue;
277 278
             } 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
             $this->oProp->aPluginTitleLinks = array_merge( 
91 91
                 $this->oProp->aPluginTitleLinks, 
92 92
                 $asLinks 
93
-           );
93
+            );
94 94
         }
95 95
                 
96 96
         $this->_addFilterHook_PluginTitleActionLink();
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function _replyToSetFooterInfo() {
38 38
 
39
-        if ( ! $this->oProp->isPageAdded() ) { 
39
+        if ( !$this->oProp->isPageAdded() ) { 
40 40
             return; 
41 41
         }
42 42
         parent::_replyToSetFooterInfo();
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function _addLinkToPluginDescription( $asLinks ) {
58 58
         
59
-        if ( ! is_array( $asLinks ) ) {
60
-            $this->oProp->aPluginDescriptionLinks[] = $asLinks;
59
+        if ( !is_array( $asLinks ) ) {
60
+            $this->oProp->aPluginDescriptionLinks[ ] = $asLinks;
61 61
         } else {
62 62
             $this->oProp->aPluginDescriptionLinks = array_merge( 
63 63
                 $this->oProp->aPluginDescriptionLinks, 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */    
85 85
     public function _addLinkToPluginTitle( $asLinks ) {
86 86
         
87
-        if ( ! is_array( $asLinks ) ) {
88
-            $this->oProp->aPluginTitleLinks[] = $asLinks;
87
+        if ( !is_array( $asLinks ) ) {
88
+            $this->oProp->aPluginTitleLinks[ ] = $asLinks;
89 89
         } else {
90 90
             $this->oProp->aPluginTitleLinks = array_merge( 
91 91
                 $this->oProp->aPluginTitleLinks, 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             }
121 121
             $_sPluginBaseName = plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] );
122 122
             add_filter( 
123
-                $this->_sFilterSuffix_PluginActionLinks . $_sPluginBaseName, 
123
+                $this->_sFilterSuffix_PluginActionLinks.$_sPluginBaseName, 
124 124
                 array( $this, '_replyToAddPluginActionLinks' ) 
125 125
             );            
126 126
         }
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
      * @return      string
134 134
      * @internal
135 135
      */ 
136
-    public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) {
136
+    public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) {
137 137
 
138
-        if ( ! $this->_isPageAdded() ) {
138
+        if ( !$this->_isPageAdded() ) {
139 139
             return $sLinkHTML; // $sLinkHTML is given by the hook.
140 140
         }
141
-        $sLinkHTML  = empty( $this->oProp->aScriptInfo['sName'] )
141
+        $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] )
142 142
             ? $sLinkHTML
143
-            : $this->oProp->aFooterInfo['sLeft'];     
143
+            : $this->oProp->aFooterInfo[ 'sLeft' ];     
144 144
             
145 145
         $_sPageSlug = $this->oProp->getCurrentPageSlug();
146 146
         $_sTabSlug  = $this->oProp->getCurrentTabSlug();        
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
             array(                 
152 152
                 $this->getAOrB( 
153 153
                     $_sTabSlug,
154
-                    'footer_left_' . $_sPageSlug . '_' . $_sTabSlug,
154
+                    'footer_left_'.$_sPageSlug.'_'.$_sTabSlug,
155 155
                     null    // will be ignored
156 156
                 ),
157
-                'footer_left_' . $_sPageSlug,
158
-                'footer_left_' . $this->oProp->sClassName
157
+                'footer_left_'.$_sPageSlug,
158
+                'footer_left_'.$this->oProp->sClassName
159 159
             ),
160 160
             $sLinkHTML
161 161
         );        
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
      * @return      string
170 170
      * @internal
171 171
      */
172
-    public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) {
172
+    public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) {
173 173
 
174
-        if ( ! $this->_isPageAdded() ) {
174
+        if ( !$this->_isPageAdded() ) {
175 175
             return $sLinkHTML; // $sLinkTHML is given by the hook.
176 176
         }
177 177
             
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
             array(                 
185 185
                 $this->getAOrB( 
186 186
                     $_sTabSlug,
187
-                    'footer_right_' . $_sPageSlug . '_' . $_sTabSlug,
187
+                    'footer_right_'.$_sPageSlug.'_'.$_sTabSlug,
188 188
                     null    // will be ignored
189 189
                 ),
190
-                'footer_right_' . $_sPageSlug,
191
-                'footer_right_' . $this->oProp->sClassName
190
+                'footer_right_'.$_sPageSlug,
191
+                'footer_right_'.$this->oProp->sClassName
192 192
             ),
193
-            $this->oProp->aFooterInfo['sRight']
193
+            $this->oProp->aFooterInfo[ 'sRight' ]
194 194
         );             
195 195
             
196 196
     }
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
          */
204 204
         private function _isPageAdded() {
205 205
             
206
-            if ( ! isset( $_GET['page'] ) ) {
206
+            if ( !isset( $_GET[ 'page' ] ) ) {
207 207
                 return false;
208 208
             }            
209
-            return ( bool ) $this->oProp->isPageAdded( $_GET['page'] );
209
+            return ( bool ) $this->oProp->isPageAdded( $_GET[ 'page' ] );
210 210
 
211 211
         }
212 212
     /**
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             : $this->oProp->sLabelPluginSettingsLink;        
229 229
 
230 230
         // If the user disables the settings link, the label property is empty. If so, do not add it.
231
-        if ( ! $this->oProp->sLabelPluginSettingsLink ) {
231
+        if ( !$this->oProp->sLabelPluginSettingsLink ) {
232 232
             return $aLinks;
233 233
         }
234 234
 
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
         array_unshift(    
247 247
             $aLinks,
248 248
             // '<a href="' . esc_url( $_sLinkURL ) . '">' 
249
-            '<a ' . $this->getAttributes(
249
+            '<a '.$this->getAttributes(
250 250
                 array(
251 251
                     'href'      => esc_url( $_sLinkURL ),
252 252
                     // 3.5.7+ Added for acceptance testing
253 253
                     'class'     => 'apf-plugin-title-action-link apf-post-type',
254 254
                 )
255
-            ) . '>' 
255
+            ).'>' 
256 256
                 . $this->oProp->sLabelPluginSettingsLink 
257 257
             . '</a>'
258 258
         ); 
@@ -275,16 +275,16 @@  discard block
 block discarded – undo
275 275
         
276 276
         // Backward compatibility sanitisation.
277 277
         $_aAddingLinks = array();
278
-        foreach( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) {
278
+        foreach ( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) {
279 279
             
280
-            if ( ! $_sLLinkHTML ) {
280
+            if ( !$_sLLinkHTML ) {
281 281
                 continue;
282 282
             }
283 283
             if ( is_array( $_sLLinkHTML ) ) {  // should not be an array
284 284
                 $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks );
285 285
                 continue;
286 286
             } 
287
-            $_aAddingLinks[] = ( string ) $_sLLinkHTML;
287
+            $_aAddingLinks[ ] = ( string ) $_sLLinkHTML;
288 288
             
289 289
         }
290 290
         return array_merge( $aLinks, $_aAddingLinks );
@@ -301,13 +301,13 @@  discard block
 block discarded – undo
301 301
     public function _replyToAddPluginActionLinks( $aLinks ) {
302 302
 
303 303
         $_aAddingLinks = array();
304
-        foreach( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) {
304
+        foreach ( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) {
305 305
 
306 306
             if ( is_array( $_sLinkHTML ) ) {
307 307
                 $_aAddingLinks = array_merge( $_sLinkHTML, $aAddingLinks );
308 308
                 continue;
309 309
             } 
310
-            $_aAddingLinks[] = ( string ) $_sLinkHTML;
310
+            $_aAddingLinks[ ] = ( string ) $_sLinkHTML;
311 311
             
312 312
         }
313 313
         return array_merge( $aLinks, $_aAddingLinks );
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
34 34
                 
35 35
         // if the 'reset' key in the field definition array is set, this value will be set.
36
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
36
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
37 37
             return;
38 38
         }
39 39
         
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         );
44 44
                     
45 45
         // Go to the catch clause.
46
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clasue.
46
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue.
47 47
         $_oException->aReturn = $this->_confirmSubmitButtonAction( 
48 48
             $this->getElement( $aSubmitInformation, 'input_name' ),
49 49
             $this->getElement( $aSubmitInformation, 'section_id' ),
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ContactForm.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class AdminPageFramework_Model__FormSubmission__Validator__ContactForm extends AdminPageFramework_Model__FormSubmission__Validator_Base {
19 19
     
20
-    public $sActionHookPrefix = 'try_validation_after_';    // 3.7.6 Changed it from `try_validation_before_`
20
+    public $sActionHookPrefix = 'try_validation_after_'; // 3.7.6 Changed it from `try_validation_before_`
21 21
     public $iHookPriority = 10;
22 22
     public $iCallbackParameters = 5;
23 23
  
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
35 35
                 
36 36
         // Check whether sending an email has been confirmed by the user or not.
37
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
37
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
38 38
             return;
39 39
         }
40 40
         
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
             $this->getElement( $aSubmitInformation, 'section_id' )
46 46
         );
47 47
         $this->oFactory->oProp->_bDisableSavingOptions = true;
48
-        $this->deleteTransient( 'apf_tfd' . md5( 'temporary_form_data_' . $this->oFactory->oProp->sClassName . get_current_user_id() ) );
48
+        $this->deleteTransient( 'apf_tfd'.md5( 'temporary_form_data_'.$this->oFactory->oProp->sClassName.get_current_user_id() ) );
49 49
         
50 50
         // Schedule to remove the confirmation url query key.
51 51
         add_action( "setting_update_url_{$this->oFactory->oProp->sClassName}", array( $this, '_replyToRemoveConfirmationQueryKey' ) );
52 52
         
53 53
         // Go to the catch clause.
54
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clause.
54
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause.
55 55
         $_oException->aReturn = $aInputs;
56 56
         throw $_oException;
57 57
     
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
          */
87 87
         private function _sendEmailInBackground( $aInputs, $sPressedInputNameFlat, $sSubmitSectionID ) {
88 88
             
89
-            $_sTranskentKey = 'apf_em_' . md5( $sPressedInputNameFlat . get_current_user_id() );
89
+            $_sTranskentKey = 'apf_em_'.md5( $sPressedInputNameFlat.get_current_user_id() );
90 90
             $_aEmailOptions = $this->getTransient( $_sTranskentKey );
91 91
             $this->deleteTransient( $_sTranskentKey );
92 92
 
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
                 'name'          => '',
102 102
             );
103 103
 
104
-            $_sTransientKey  = 'apf_emd_' . md5( $sPressedInputNameFlat . get_current_user_id() );
104
+            $_sTransientKey  = 'apf_emd_'.md5( $sPressedInputNameFlat.get_current_user_id() );
105 105
             $_aFormEmailData = array(
106 106
                 'email_options' => $_aEmailOptions,
107 107
                 'input'         => $aInputs,
108 108
                 'section_id'    => $sSubmitSectionID,
109 109
             );
110
-            $_bIsSet = $this->setTransient( $_sTransientKey,  $_aFormEmailData, 100 );
110
+            $_bIsSet = $this->setTransient( $_sTransientKey, $_aFormEmailData, 100 );
111 111
             
112 112
             // Send the email in the background.
113 113
             wp_remote_get( 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             );  
126 126
             
127 127
             // @remark      Not possible to tell whether it is sent or not at the moment because it is performed in the background.
128
-            $_bSent      = $_bIsSet;    
128
+            $_bSent = $_bIsSet;    
129 129
             $this->oFactory->setSettingNotice( 
130 130
                 $this->oFactory->oMsg->get( 
131 131
                     $this->getAOrB( 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
          * @return      string
148 148
          */
149 149
         public function _replyToRemoveConfirmationQueryKey( $sSettingUpdateURL ) {
150
-            return remove_query_arg( array( 'confirmation', ), $sSettingUpdateURL );
150
+            return remove_query_arg( array( 'confirmation',), $sSettingUpdateURL );
151 151
         }      
152 152
         
153 153
 }
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
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->oFactory = $oFactory;
31 31
         
32 32
         add_filter(
33
-            "validation_pre_" . $this->oFactory->oProp->sClassName,
33
+            "validation_pre_".$this->oFactory->oProp->sClassName,
34 34
             array( $this, '_replyToValiateUserFormInputs' ),
35 35
             10,
36 36
             4
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $_sSubmitSectionID  = $this->_getPressedSubmitButtonData( $_aSubmits, 'section_id' );
62 62
             
63 63
             // Submit Information - [3.5.0+] this will be passed to validation callback methods.
64
-            $_aSubmitsInformation        = array(
64
+            $_aSubmitsInformation = array(
65 65
                 'page_slug'     => $_sPageSlug,
66 66
                 'tab_slug'      => $_sTabSlug,
67 67
                 'input_id'      => $this->_getPressedSubmitButtonData( $_aSubmits, 'input_id' ), 
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
                 'AdminPageFramework_Model__FormSubmission__Validator__Export',
82 82
                 'AdminPageFramework_Model__FormSubmission__Validator__Reset',
83 83
                 'AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm', // 3.7.6+ Moved to after validation from before validation
84
-                'AdminPageFramework_Model__FormSubmission__Validator__ContactForm',  // 3.7.6+ Moved to after validation from before validation
84
+                'AdminPageFramework_Model__FormSubmission__Validator__ContactForm', // 3.7.6+ Moved to after validation from before validation
85 85
                 'AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm',
86 86
                 
87 87
             );
88
-            foreach( $_aClassNames as $_sClassName ) {
88
+            foreach ( $_aClassNames as $_sClassName ) {
89 89
                 new $_sClassName( $this->oFactory );
90 90
             }
91 91
             
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 
95 95
                 $this->addAndDoActions(
96 96
                     $this->oFactory,
97
-                    'try_validation_before_' . $this->oFactory->oProp->sClassName,
97
+                    'try_validation_before_'.$this->oFactory->oProp->sClassName,
98 98
                     $aInputs,
99 99
                     $aRawInputs,
100 100
                     $_aSubmits,
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
                 $this->addAndDoActions(
115 115
                     $this->oFactory,
116
-                    'try_validation_after_' . $this->oFactory->oProp->sClassName,
116
+                    'try_validation_after_'.$this->oFactory->oProp->sClassName,
117 117
                     $aInputs,
118 118
                     $aRawInputs,
119 119
                     $_aSubmits,
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
35 35
                                 
36
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
36
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
37 37
             return;
38 38
         }
39 39
         
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         );            
47 47
         
48 48
         // Go to the catch clause.
49
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clasue.
49
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue.
50 50
         $_oException->aReturn = $this->_confirmSubmitButtonAction( 
51 51
             $this->getElement( $aSubmitInformation, 'input_name' ), 
52 52
             $this->getElement( $aSubmitInformation, 'section_id' ), 
Please login to merge, or discard this patch.
factory/admin_page/_view/AdminPageFramework_View__PageMetaboxEnabler.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
          */
52 52
         public function _replyToEnableMetaBox() {
53 53
 
54
-            if ( ! $this->_isMetaBoxAdded() ) {
54
+            if ( !$this->_isMetaBoxAdded() ) {
55 55
                 return;
56 56
             }
57 57
 
58
-            $_sCurrentScreenID =  $this->getCurrentScreenID();
58
+            $_sCurrentScreenID = $this->getCurrentScreenID();
59 59
 
60 60
             // Trigger the add_meta_boxes hooks to allow meta boxes to be added.
61 61
             do_action( "add_meta_boxes_{$_sCurrentScreenID}", null );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             // the network admin adds '-network' in the screen ID and the hooks with that id won't be triggered so use the 'page_hook' global variable.
86 86
             if ( isset( $GLOBALS[ 'page_hook' ] ) ) {
87 87
                 add_action( 
88
-                    "admin_footer-{$GLOBALS['page_hook']}", 
88
+                    "admin_footer-{$GLOBALS[ 'page_hook' ]}", 
89 89
                     array( $this, '_replyToAddMetaboxScript' ) 
90 90
                 );    
91 91
             }
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
                 }
110 110
                 
111 111
                 $_sPageSlug = $this->getElement( $_GET, 'page', '' );
112
-                if ( ! $_sPageSlug ) {     
112
+                if ( !$_sPageSlug ) {     
113 113
                     return false;
114 114
                 }
115 115
                 
116
-                foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
116
+                foreach ( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
117 117
                     if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { 
118 118
                         return true; 
119 119
                     }
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
                  */
132 132
                 private function _isPageOfMetaBox( $sPageSlug, $oMetaBox ) {
133 133
                     
134
-                    if ( in_array( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) {
134
+                    if ( in_array( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) {
135 135
                         return true; // for numeric keys with a string value.
136 136
                     }
137
-                    if ( ! array_key_exists( $sPageSlug , $oMetaBox->oProp->aPageSlugs ) ) {
137
+                    if ( !array_key_exists( $sPageSlug, $oMetaBox->oProp->aPageSlugs ) ) {
138 138
                         return false; // for keys of page slugs, the key does not exist, it means not added.
139 139
                     }
140 140
                     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,12 +109,12 @@
 block discarded – undo
109 109
                 }
110 110
                 
111 111
                 $_sPageSlug = $this->getElement( $_GET, 'page', '' );
112
-                if ( ! $_sPageSlug ) {     
112
+                if ( ! $_sPageSlug ) {
113 113
                     return false;
114 114
                 }
115 115
                 
116 116
                 foreach( $_aPageMetaBoxClasses as $_sClassName => $_oMetaBox ) {
117
-                    if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) { 
117
+                    if ( $this->_isPageOfMetaBox( $_sPageSlug, $_oMetaBox ) ) {
118 118
                         return true; 
119 119
                     }
120 120
                 }
Please login to merge, or discard this patch.
development/factory/admin_page/form/AdminPageFramework_Form_admin_page.php 3 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
     public function getPageOnlyOptions( $aOptions, $sPageSlug ) {
53 53
 
54 54
         $_aStoredOptionsOfThePage = array();
55
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
55
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
56 56
             
57 57
             // Check the section
58
-            if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
58
+            if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
59 59
                 continue;
60 60
             }
61 61
 
62 62
             // At this point, the element belongs the given page slug as the section is of the given page slug's.
63 63
             $this->_setPageOnlyOptions( 
64
-                $_aStoredOptionsOfThePage,  // by reference - gets updated in the method.
64
+                $_aStoredOptionsOfThePage, // by reference - gets updated in the method.
65 65
                 $aOptions, 
66 66
                 $_aSubSectionsOrFields, 
67 67
                 $sPageSlug,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
          * @internal
82 82
          */
83 83
         private function _setPageOnlyOptions( array &$_aStoredOptionsOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug, $_sSectionID ) {
84
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
84
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
85 85
                 
86 86
                 // If it's a sub-section array,
87 87
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function getOtherPageOptions( $aOptions, $sPageSlug ) {
154 154
 
155 155
         $_aStoredOptionsNotOfThePage = array();
156
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
156
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
157 157
             
158 158
             // Check the section
159 159
             if ( $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
          * @internal
183 183
          */
184 184
         private function _setOtherPageOptions( array &$_aStoredOptionsNotOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug ) {
185
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
185
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
186 186
 
187 187
                 // It's a sub-section array. 
188 188
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     public function getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ) {
246 246
 
247 247
         $_aStoredOptionsNotOfTheTab = array();
248
-        foreach( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
248
+        foreach ( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
249 249
                         
250 250
             // If the section is of the given page and the given tab, skip.
251 251
             if ( $this->_isThisSectionSetToThisTab( $_sSectionPath, $sPageSlug, $sTabSlug ) ) {
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         private function _setOtherTabOptions( array &$_aStoredOptionsNotOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $sSectionPath ) {
277 277
             
278 278
             // At this point, the passed element belongs to the other tabs since the section of the given tab is skipped.
279
-            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField  ) {
279
+            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) {
280 280
                 
281 281
                 // If it's a sub section
282 282
                 if ( $this->isNumericInteger( $_isSubSectionIndexOrFieldID ) ) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
335 335
      * @return      array
336 336
      */
337
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {     
337
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug = '' ) {     
338 338
                 
339 339
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
340 340
         $_aTabOptions      = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );       
@@ -352,17 +352,17 @@  discard block
 block discarded – undo
352 352
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
353 353
      * @return      array
354 354
      */
355
-    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
355
+    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug = '' ) {
356 356
         
357 357
         $_aStoredOptionsOfTheTab = array();
358
-        if ( ! $sTabSlug ) { 
358
+        if ( !$sTabSlug ) { 
359 359
             return $_aStoredOptionsOfTheTab; 
360 360
         }
361 361
         
362
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
362
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
363 363
              
364 364
             // Check the section
365
-            if ( ! $this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
365
+            if ( !$this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
366 366
                 continue;
367 367
             }
368 368
             
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
          */
389 389
         private function _setTabOnlyOptions( array &$_aStoredOptionsOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $_sSectionID ) {
390 390
             
391
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
391
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
392 392
                                 
393 393
                 // if it's a sub-section array.
394 394
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     private function _isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) {
447 447
         
448
-        if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) {
448
+        if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) {
449 449
             return false;
450 450
         }
451 451
         return ( 
@@ -463,10 +463,10 @@  discard block
 block discarded – undo
463 463
      */
464 464
     private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) {
465 465
         
466
-        if ( ! $this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) {
466
+        if ( !$this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) {
467 467
             return false;
468 468
         }
469
-        if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) {
469
+        if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) {
470 470
             return false;
471 471
         }
472 472
         return (
@@ -483,9 +483,9 @@  discard block
 block discarded – undo
483 483
      */
484 484
     private function _setOptionValue( &$aSubject, $asDimensionalPath, $aOptions ) {
485 485
         $_aDimensionalPath = $this->getAsArray( $asDimensionalPath );
486
-        $_mValue     = $this->getElement(
486
+        $_mValue = $this->getElement(
487 487
             $aOptions,
488
-            $_aDimensionalPath,    // as of 3.7.0, it can be an array or string
488
+            $_aDimensionalPath, // as of 3.7.0, it can be an array or string
489 489
             null
490 490
         );
491 491
         if ( isset( $_mValue ) ) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -458,6 +458,7 @@
 block discarded – undo
458 458
      * @internal
459 459
      * @since       3.5.3
460 460
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
461
+     * @param string $sTabSlug
461 462
      * @return      boolean
462 463
      */
463 464
     private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 );
107 107
                 // @todo Examine whether this check can be removed 
108 108
                 // as the section that hods this field is already checked above outside this loop.
109
-                if ( $sPageSlug !== $_aFieldset[ 'page_slug' ] ) { 
109
+                if ( $sPageSlug !== $_aFieldset[ 'page_slug' ] ) {
110 110
                     continue; 
111 111
                 }        
112 112
                 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
334 334
      * @return      array
335 335
      */
336
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {     
336
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {
337 337
                 
338 338
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
339 339
         $_aTabOptions      = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );       
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
355 355
         
356 356
         $_aStoredOptionsOfTheTab = array();
357
-        if ( ! $sTabSlug ) { 
357
+        if ( ! $sTabSlug ) {
358 358
             return $_aStoredOptionsOfTheTab; 
359 359
         }
360 360
         
Please login to merge, or discard this patch.