Completed
Branch dev (85e891)
by
unknown
01:52
created
admin-page-framework-loader.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
  */
17 17
 class AdminPageFrameworkLoader_Registry_Base {
18 18
 
19
-    const VERSION        = '3.8.26b01';    // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
19
+    const VERSION        = '3.8.26b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
20 20
     const NAME           = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing.
21
-    const SHORTNAME      = 'Admin Page Framework';  // used for a menu title etc.
21
+    const SHORTNAME      = 'Admin Page Framework'; // used for a menu title etc.
22 22
     const DESCRIPTION    = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.';
23 23
     const URI            = 'http://admin-page-framework.michaeluno.jp/';
24 24
     const AUTHOR         = 'miunosoft (Michael Uno)';
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
      * @remark      This is also accessed from `uninstall.php` so do not remove.
56 56
      * @remark      Do not exceed 8 characters as a transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added.
57 57
      */
58
-    const TRANSIENT_PREFIX         = 'APFL_';
58
+    const TRANSIENT_PREFIX = 'APFL_';
59 59
 
60 60
     /**
61 61
      * The hook slug used for the prefix of action and filter hook names.
62 62
      *
63 63
      * @remark      The ending underscore is not necessary.
64 64
      */
65
-    const HOOK_SLUG                = 'admin_page_framework_loader';
65
+    const HOOK_SLUG = 'admin_page_framework_loader';
66 66
 
67 67
     /**
68 68
      * The text domain slug and its path.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     static public $aAdminPages = array(
118 118
         // key => 'page slug'
119
-        'about'     => 'apfl_about',        // the welcome page
119
+        'about'     => 'apfl_about', // the welcome page
120 120
         'addon'     => 'apfl_addons',
121 121
         'tool'      => 'apfl_tools',
122 122
         'help'      => 'apfl_contact',
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
      * @since       3.5.0
155 155
      * @return      string
156 156
      */
157
-    public static function getPluginURL( $sRelativePath='' ) {
157
+    public static function getPluginURL( $sRelativePath = '' ) {
158 158
         if ( isset( self::$_sPluginURLCache ) ) {
159
-            return self::$_sPluginURLCache . $sRelativePath;
159
+            return self::$_sPluginURLCache.$sRelativePath;
160 160
         }
161 161
         self::$_sPluginURLCache = trailingslashit( plugins_url( '', self::$sFilePath ) );
162
-        return self::$_sPluginURLCache . $sRelativePath;
162
+        return self::$_sPluginURLCache.$sRelativePath;
163 163
     }
164 164
         /**
165 165
          * @since       3.7.9
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
      * @since       3.5.0
190 190
      * @return      void
191 191
      */
192
-    static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) {
193
-        if ( ! is_admin() ) {
192
+    static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) {
193
+        if ( !is_admin() ) {
194 194
             return;
195 195
         }
196
-        self::$_aAdminNotices[] = array(
196
+        self::$_aAdminNotices[ ] = array(
197 197
             'message'           => $sMessage,
198
-            'class_attribute'   => trim( $sClassAttribute ) . ' notice is-dismissible',
198
+            'class_attribute'   => trim( $sClassAttribute ).' notice is-dismissible',
199 199
         );
200 200
         add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) );
201 201
     }
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
          * @return      void
206 206
          */
207 207
         static public function _replyToSetAdminNotice() {
208
-            foreach( self::$_aAdminNotices as $_aAdminNotice ) {
209
-                echo "<div class='" . esc_attr( $_aAdminNotice['class_attribute'] ) . " notice is-dismissible'>"
208
+            foreach ( self::$_aAdminNotices as $_aAdminNotice ) {
209
+                echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>"
210 210
                         ."<p>"
211 211
                             . sprintf(
212
-                                '<strong>%1$s</strong>: ' . $_aAdminNotice['message'],
213
-                                self::NAME . ' ' . self::VERSION
212
+                                '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ],
213
+                                self::NAME.' '.self::VERSION
214 214
                             )
215 215
                         . "</p>"
216 216
                     . "</div>";
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 AdminPageFrameworkLoader_Registry::setUp( __FILE__ );
223 223
 
224 224
 // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file.
225
-if ( ! defined( 'ABSPATH' ) ) {
225
+if ( !defined( 'ABSPATH' ) ) {
226 226
     return;
227 227
 }
228 228
 if ( defined( 'DOING_UNINSTALL' ) && DOING_UNINSTALL ) {
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
 
235 235
     $_bFrameworkLoaded = class_exists( 'AdminPageFramework_Registry', false );
236 236
     if (
237
-        ! $_bFrameworkLoaded
238
-        || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility
237
+        !$_bFrameworkLoaded
238
+        || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility
239 239
         || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' )
240 240
     ) {
241 241
         AdminPageFrameworkLoader_Registry::setAdminNotice(
@@ -253,18 +253,18 @@  discard block
 block discarded – undo
253 253
 add_action( 'admin_init', 'AdminPageFrameworkLoader_Warning' );
254 254
 
255 255
 // Include the library file - the development version will be available if you cloned the GitHub repository.
256
-$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/development/admin-page-framework.php';
256
+$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/development/admin-page-framework.php';
257 257
 $_bDebugMode              = defined( 'WP_DEBUG' ) && WP_DEBUG;
258 258
 $_bLoadDevelopmentVersion = $_bDebugMode && file_exists( $_sDevelopmentVersionPath );
259 259
 include(
260 260
     $_bLoadDevelopmentVersion
261 261
         ? $_sDevelopmentVersionPath
262
-        : AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf/admin-page-framework.php'
262
+        : AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf/admin-page-framework.php'
263 263
 );
264 264
 
265 265
 // Include the framework loader plugin components.
266 266
 include( AdminPageFramework_Registry::$aClassFiles[ 'AdminPageFramework_PluginBootstrap' ] );
267
-include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/AdminPageFrameworkLoader_Bootstrap.php' );
267
+include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/AdminPageFrameworkLoader_Bootstrap.php' );
268 268
 new AdminPageFrameworkLoader_Bootstrap(
269 269
     AdminPageFrameworkLoader_Registry::$sFilePath,
270 270
     AdminPageFrameworkLoader_Registry::HOOK_SLUG    // hook prefix
Please login to merge, or discard this patch.
factory/taxonomy_field/AdminPageFramework_TaxonomyField_Model.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
         return $this->_getFilteredColumnsByFilterPrefix(
54 54
             $this->oUtil->getAsArray( $aColumns ),
55 55
             'columns_',
56
-            isset( $_GET['taxonomy'] )  // in ajax, $_GET is not even set.
57
-                ? $_GET['taxonomy']
56
+            isset( $_GET[ 'taxonomy' ] )  // in ajax, $_GET is not even set.
57
+                ? $_GET[ 'taxonomy' ]
58 58
                 : ''
59 59
         );
60 60
     }
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
         return $this->_getFilteredColumnsByFilterPrefix(
72 72
             $this->oUtil->getAsArray( $aSortableColumns ),
73 73
             'sortable_columns_',
74
-            isset( $_GET['taxonomy'] )  // in ajax, $_GET is not even set.
75
-                ? $_GET['taxonomy']
74
+            isset( $_GET[ 'taxonomy' ] )  // in ajax, $_GET is not even set.
75
+                ? $_GET[ 'taxonomy' ]
76 76
                 : ''
77 77
         );
78 78
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             if ( $sTaxonomy ) {
87 87
                 $aColumns = $this->oUtil->addAndApplyFilter(
88 88
                     $this,
89
-                    "{$sFilterPrefix}{$_GET['taxonomy']}",
89
+                    "{$sFilterPrefix}{$_GET[ 'taxonomy' ]}",
90 90
                     $aColumns
91 91
                 );
92 92
             }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @param       string|null  $sOptionKey
126 126
      * @internal
127 127
      */
128
-    protected function _setOptionArray( $iTermID=null, $sOptionKey=null ) {
128
+    protected function _setOptionArray( $iTermID = null, $sOptionKey = null ) {
129 129
         $this->oForm->aSavedData = $this->_getSavedFormData( $iTermID, $sOptionKey );
130 130
     }
131 131
         /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
             return $this->oUtil->addAndApplyFilter(
140 140
                 $this, // the caller factory object
141
-                'options_' . $this->oProp->sClassName,
141
+                'options_'.$this->oProp->sClassName,
142 142
                 $this->_getSavedTermFormData( $iTermID, $sOptionKey )
143 143
                 // @todo maybe pass the term id because the user will not know whihch form data it is
144 144
             );
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function _replyToValidateOptions( $iTermID ) {
174 174
 
175
-        if ( ! $this->_shouldProceedValidation() ) {
175
+        if ( !$this->_shouldProceedValidation() ) {
176 176
             return;
177 177
         }
178 178
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $_aSubmittedFormData    = $this->oForm->getSubmittedData( $_POST );
182 182
         $_aSubmittedFormData    = $this->oUtil->addAndApplyFilters(
183 183
             $this,
184
-            'validation_' . $this->oProp->sClassName,
184
+            'validation_'.$this->oProp->sClassName,
185 185
             call_user_func_array(
186 186
                 array( $this, 'validate' ), // triggers __call()
187 187
                 array( $_aSubmittedFormData, $_aSavedFormData, $this )
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         // @todo Examine whether it is appropriate to merge recursivly
194 194
         // as some fields will have a problem such as select with multiple options.
195
-        $_aTaxonomyFormData[ $iTermID ]  = $this->oUtil->uniteArrays(
195
+        $_aTaxonomyFormData[ $iTermID ] = $this->oUtil->uniteArrays(
196 196
             $_aSubmittedFormData,
197 197
             $_aSavedFormData
198 198
         );
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
          */
215 215
         protected function _shouldProceedValidation() {
216 216
 
217
-            if ( ! isset( $_POST[ $this->oProp->sClassHash ] ) ) {
217
+            if ( !isset( $_POST[ $this->oProp->sClassHash ] ) ) {
218 218
                 return false;
219 219
             }
220
-            if ( ! wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) {
220
+            if ( !wp_verify_nonce( $_POST[ $this->oProp->sClassHash ], $this->oProp->sClassHash ) ) {
221 221
                 return false;
222 222
             }
223 223
             return true;
Please login to merge, or discard this patch.
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.
factory/_common/utility/base_utility/AdminPageFramework_Utility_String.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
      * @since       3.8.4   When non-true value is passed, `0px` will be returned.
36 36
      * @return      string
37 37
      */
38
-    static public function getLengthSanitized( $sLength, $sUnit='px' ) {
38
+    static public function getLengthSanitized( $sLength, $sUnit = 'px' ) {
39 39
         $sLength = $sLength ? $sLength : 0;
40 40
         return is_numeric( $sLength )
41
-            ? $sLength . $sUnit
41
+            ? $sLength.$sUnit
42 42
             : $sLength;
43 43
     }
44 44
 
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
      * @since       3.8.11      Renamed from `fixNumber()`.
81 81
      * @return      string|integer      A numeric value will be returned.
82 82
      */
83
-    static public function getNumberFixed( $nToFix, $nDefault, $nMin='', $nMax='' ) {
83
+    static public function getNumberFixed( $nToFix, $nDefault, $nMin = '', $nMax = '' ) {
84 84
 
85
-        if ( ! is_numeric( trim( $nToFix ) ) ) {
85
+        if ( !is_numeric( trim( $nToFix ) ) ) {
86 86
             return $nDefault;
87 87
         }
88 88
         if ( $nMin !== '' && $nToFix < $nMin ) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
          * @return      string|integer      A numeric value will be returned.
101 101
          * @deprecated  3.8.11
102 102
          */
103
-        static public function fixNumber( $nToFix, $nDefault, $nMin='', $nMax='' ) {
103
+        static public function fixNumber( $nToFix, $nDefault, $nMin = '', $nMax = '' ) {
104 104
             return self::getNumberFixed( $nToFix, $nDefault, $nMin, $nMax );
105 105
         }
106 106
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     static public function getCSSMinified( $sCSSRules ) {
115 115
         return str_replace(
116
-            array( "\r\n", "\r", "\n", "\t", '  ', '    ', '    '),  // remove line breaks, tab, and white sspaces.
116
+            array( "\r\n", "\r", "\n", "\t", '  ', '    ', '    ' ), // remove line breaks, tab, and white sspaces.
117 117
             '',
118 118
             preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $sCSSRules ) // remove comments
119 119
         );
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
      */
151 151
     static public function getNumberOfReadableSize( $nSize ) {
152 152
 
153
-        $_nReturn     = substr( $nSize, 0, -1 );
154
-        switch( strtoupper( substr( $nSize, -1 ) ) ) {
153
+        $_nReturn = substr( $nSize, 0, -1 );
154
+        switch ( strtoupper( substr( $nSize, -1 ) ) ) {
155 155
             case 'P':
156 156
                 $_nReturn *= 1024;
157 157
             case 'T':
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
      * @since       3.8.26 Added the `$iRoundPrecision` parameter.
176 176
      * @return      string
177 177
      */
178
-    static public function getReadableBytes( $nBytes, $iRoundPrecision=2 ) {
178
+    static public function getReadableBytes( $nBytes, $iRoundPrecision = 2 ) {
179 179
         $_aUnits = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' );
180 180
         $_nLog   = log( $nBytes, 1024 );
181 181
         $_iPower = ( int ) $_nLog;
182 182
         $_ifSize = pow( 1024, $_nLog - $_iPower );
183 183
         $_ifSize = round( $_ifSize, $iRoundPrecision );
184
-        return $_ifSize . $_aUnits[ $_iPower ];
184
+        return $_ifSize.$_aUnits[ $_iPower ];
185 185
     }
186 186
 
187 187
     /**
Please login to merge, or discard this patch.
factory/_common/_abstract/_view/AdminPageFramework_PageLoadInfo_Base.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function __construct( $oProp, $oMsg ) {
29 29
 
30
-        if ( ! $this->_shouldProceed( $oProp ) ) {
30
+        if ( !$this->_shouldProceed( $oProp ) ) {
31 31
             return;
32 32
         }
33 33
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
          */
45 45
         private function _shouldProceed( $oProp ) {
46 46
 
47
-            if ( $oProp->bIsAdminAjax || ! $oProp->bIsAdmin ) {
47
+            if ( $oProp->bIsAdminAjax || !$oProp->bIsAdmin ) {
48 48
                 return false;
49 49
             }
50 50
             return ( boolean ) $oProp->bShowDebugInfo;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function _replyToGetPageLoadInfo( $sFooterHTML ) {
72 72
 
73 73
         // 3.8.8+ The `bShowDebugInfo` property may be updated by the user during the page load.
74
-        if ( ! $this->oProp->bShowDebugInfo ) {
74
+        if ( !$this->oProp->bShowDebugInfo ) {
75 75
             return $sFooterHTML;
76 76
         }
77 77
 
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
             $_sInitialMemoryUsage = $this->getReadableBytes( $_nInitialMemoryUsage );
106 106
             return "<div id='admin-page-framework-page-load-stats'>"
107 107
                     . "<ul>"
108
-                        . "<li>" . sprintf( $this->oMsg->get( 'queries_in_seconds' ), $_nQueryCount, $_nSeconds ) . "</li>"
109
-                        . "<li>" . sprintf( $this->oMsg->get( 'out_of_x_memory_used' ), $_sMemoryUsage, $_sMemoryLimit, round( ( $_nMemoryUsage / $_nMemoryLimit ), 2 ) * 100 . '%' ) . "</li>"
110
-                        . "<li>" . sprintf( $this->oMsg->get( 'peak_memory_usage' ), $_sMemoryPeakUsage ) . "</li>"
111
-                        . "<li>" . sprintf( $this->oMsg->get( 'initial_memory_usage' ), $_sInitialMemoryUsage ) . "</li>"
108
+                        . "<li>".sprintf( $this->oMsg->get( 'queries_in_seconds' ), $_nQueryCount, $_nSeconds )."</li>"
109
+                        . "<li>".sprintf( $this->oMsg->get( 'out_of_x_memory_used' ), $_sMemoryUsage, $_sMemoryLimit, round( ( $_nMemoryUsage / $_nMemoryLimit ), 2 ) * 100.'%' )."</li>"
110
+                        . "<li>".sprintf( $this->oMsg->get( 'peak_memory_usage' ), $_sMemoryPeakUsage )."</li>"
111
+                        . "<li>".sprintf( $this->oMsg->get( 'initial_memory_usage' ), $_sInitialMemoryUsage )."</li>"
112 112
                     . "</ul>"
113 113
                 . "</div>";
114 114
 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Form.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
86 86
 
87
-        foreach( func_get_args() as $asSection ) {
87
+        foreach ( func_get_args() as $asSection ) {
88 88
             $this->addSettingSection( $asSection );
89 89
         }
90 90
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function addSettingSection( $asSection ) {
109 109
 
110
-        if ( ! is_array( $asSection ) ) {
110
+        if ( !is_array( $asSection ) ) {
111 111
             $this->_sTargetPageSlug = is_string( $asSection )
112 112
                 ? $asSection
113 113
                 : $this->_sTargetPageSlug;
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
             )
130 130
         );
131 131
 
132
-        $aSection[ 'section_tab_slug' ]   = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
132
+        $aSection[ 'section_tab_slug' ] = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
133 133
 
134 134
         // A page slug is required.
135
-        if ( ! $aSection[ 'page_slug' ] ) {
135
+        if ( !$aSection[ 'page_slug' ] ) {
136 136
             return;
137 137
         }
138 138
         $this->oForm->addSection( $aSection );
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
         private function _getTargetPageSlug( $aSection ) {
149 149
 
150 150
             $_sTargetPageSlug = $this->oUtil->getElement(
151
-                $aSection,      // subject
152
-                'page_slug',    // key
151
+                $aSection, // subject
152
+                'page_slug', // key
153 153
                 $this->_sTargetPageSlug     // default
154 154
             );
155 155
 
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
          */
170 170
         private function _getTargetTabSlug( $aSection ) {
171 171
             $_sTargetTabSlug = $this->oUtil->getElement(
172
-                $aSection,              // subject
173
-                'tab_slug',             // key
172
+                $aSection, // subject
173
+                'tab_slug', // key
174 174
                 $this->_sTargetTabSlug  // default
175 175
             );
176 176
             $_sTargetTabSlug = $_sTargetTabSlug
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     * @return       void
200 200
     */
201 201
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {
202
-        foreach( func_get_args() as $_sSectionID ) {
202
+        foreach ( func_get_args() as $_sSectionID ) {
203 203
             $this->oForm->removeSection( $_sSectionID );
204 204
         }
205 205
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      * @remark      The actual registration will be performed in the <em>_replyToRegisterSettings()</em> method with the <em>admin_menu</em> hook.
258 258
      */
259 259
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
260
-        foreach( func_get_args() as $aField ) {
260
+        foreach ( func_get_args() as $aField ) {
261 261
             $this->addSettingField( $aField );
262 262
         }
263 263
     }
@@ -294,8 +294,8 @@  discard block
 block discarded – undo
294 294
     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
295 295
     * @return void
296 296
     */
297
-    public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more=null ) {
298
-        foreach( func_get_args() as $_sFieldID ) {
297
+    public function removeSettingFields( $sFieldID1, $sFieldID2 = null, $_and_more = null ) {
298
+        foreach ( func_get_args() as $_sFieldID ) {
299 299
             $this->oForm->removeField( $_sFieldID );
300 300
         }
301 301
     }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
             $this->oProp->sOptionKey,
343 343
             empty( $_aParams )
344 344
                 ? null                  // will return the entire options array
345
-                : $_aDimensionalKeys,   // dimensional keys
345
+                : $_aDimensionalKeys, // dimensional keys
346 346
             $_mDefault, // default
347 347
             $this->getSavedOptions() + $this->oForm->getDefaultFormValues()
348 348
         );
@@ -361,21 +361,21 @@  discard block
 block discarded – undo
361 361
      * If the user has not submitted the form, the framework will try to return the default value set in the field definition array.
362 362
      * @deprecated  3.3.0
363 363
      */
364
-    public function getFieldValue( $sFieldID, $sSectionID='' ) {
364
+    public function getFieldValue( $sFieldID, $sSectionID = '' ) {
365 365
 
366 366
         $this->oUtil->showDeprecationNotice(
367
-            'The method,' . __METHOD__ . ',', // deprecated item
367
+            'The method,'.__METHOD__.',', // deprecated item
368 368
             'getValue()' // alternative
369 369
         );
370 370
 
371 371
         $_aOptions = $this->oUtil->uniteArrays( $this->oProp->aOptions, $this->oForm->getDefaultFormValues() );
372 372
         /* If it's saved, return it */
373
-        if ( ! $sSectionID ) {
373
+        if ( !$sSectionID ) {
374 374
             if ( array_key_exists( $sFieldID, $_aOptions ) ) {
375 375
                 return $_aOptions[ $sFieldID ];
376 376
             }
377 377
             // loop through section elements
378
-            foreach( $_aOptions as $aOptions ) {
378
+            foreach ( $_aOptions as $aOptions ) {
379 379
                 if ( array_key_exists( $sFieldID, $aOptions ) ) {
380 380
                     return $aOptions[ $sFieldID ];
381 381
                 }
Please login to merge, or discard this patch.