Completed
Branch master (fd2290)
by
unknown
06:38
created
tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -139,6 +139,7 @@
 block discarded – undo
139 139
          * Modifies the class names of the minified script.
140 140
          * 
141 141
          * @since       3.4.6
142
+         * @param string $sCode
142 143
          */
143 144
         private function _modifyClassNames( $sCode ) {
144 145
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             4 
27 27
         );
28 28
         add_action( 
29
-            'export_name_' . $this->sPageSlug . '_' . $this->sTabSlug, 
29
+            'export_name_'.$this->sPageSlug.'_'.$this->sTabSlug, 
30 30
             array( $this, 'replyToFilterFileName' ), 10, 5 
31 31
         );
32 32
         
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 'title'             => __( 'Class Prefix', 'admin-page-framework-loader' ),
42 42
                 'type'              => 'text',
43 43
                 'description'       => __( 'Set alphanumeric characters for the class names', 'admin-page-framework-loader' )
44
-                    . ' ' .  __( 'For example, if you set here <code>MyPluginName_</code>, you will need to extend the class named <code>MyClassName_AdminPageFramework</code> instead of <code>AdminPageFramework</code>.', 'admin-page-framework-loader' )
44
+                    . ' '.__( 'For example, if you set here <code>MyPluginName_</code>, you will need to extend the class named <code>MyClassName_AdminPageFramework</code> instead of <code>AdminPageFramework</code>.', 'admin-page-framework-loader' )
45 45
                     . ' e.g.<code>MyPluginName_</code>',
46 46
                 'attributes'        => array(
47 47
                     'size'          => 30,
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
                 'type'              => 'export',
69 69
                 'label_min_width'   => 0,
70 70
                 'value'             => __( 'Download', 'adimn-page-framework-demo' ),
71
-                'file_name'         => 'admin-page-framework.min.php',  // the default file name. This will be modified by the filter.
72
-                'format'            => 'text',  // 'json', 'text', 'array'      
71
+                'file_name'         => 'admin-page-framework.min.php', // the default file name. This will be modified by the filter.
72
+                'format'            => 'text', // 'json', 'text', 'array'      
73 73
                 'description'       => __( 'Download the minified version.', 'admin-page-framework-loader' ),
74 74
             ) 
75 75
         );          
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
         if ( $aInput[ 'class_prefix' ] && empty( $_aMatches ) ) {
102 102
       
103 103
             // $variable[ 'sectioni_id' ]['field_id']
104
-            $_aErrors['class_prefix'] = __( 'The prefix must consist of alphanumeric with underscores.', 'admin-page-framework-loader' );
104
+            $_aErrors[ 'class_prefix' ] = __( 'The prefix must consist of alphanumeric with underscores.', 'admin-page-framework-loader' );
105 105
             $_bVerified = false;
106 106
                     
107 107
         }
108 108
 
109 109
         /* 4. An invalid value is found. */
110
-        if ( ! $_bVerified ) {
110
+        if ( !$_bVerified ) {
111 111
 
112 112
             /* 4-1. Set the error array for the input fields. */
113 113
             $oAdminPage->setFieldErrors( $_aErrors );     
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function replyToDownloadMinifiedVersion( $aSavedData, $sSubmittedFieldID, $sSubmittedInputID, $oAdminPage ) {
130 130
         
131
-        $_sMinifiedVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/library/admin-page-framework.min.php';
131
+        $_sMinifiedVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/library/admin-page-framework.min.php';
132 132
         if ( file_exists( $_sMinifiedVersionPath ) ) {
133 133
             return $this->_modifyClassNames( file_get_contents( $_sMinifiedVersionPath ) );
134 134
         }
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
                 : '';             
148 148
             
149 149
             return str_replace( 
150
-                'AdminPageFramework',         // search 
151
-                $_sPrefix . 'AdminPageFramework',         // replace
150
+                'AdminPageFramework', // search 
151
+                $_sPrefix.'AdminPageFramework', // replace
152 152
                 $sCode // subject
153 153
             );
154 154
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
      * )      
169 169
      * </code>
170 170
      */
171
-    public function replyToFilterFileName( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) { 
171
+    public function replyToFilterFileName( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) {
172 172
 
173 173
         return isset( 
174 174
                 $_POST[ $this->oFactory->oProp->sOptionKey ][ $this->sSectionID ][ 'minified_script_name' ] 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      * @param       string                  $sCapability    (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
57 57
      * @param       string                  $sTextDomain    (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework.
58 58
      */
59
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
59
+    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
60 60
                         
61 61
         if ( ! $this->_isInstantiatable() ) {
62 62
             return;
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @since       2.0.0
47 47
      * @see         http://codex.wordpress.org/Roles_and_Capabilities
48 48
      * @see         http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains
49
-     * @param       array|integer|string    $aisOptionKey    (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. 
49
+     * @param       array|integer|string    $isOptionKey    (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. 
50 50
      * [3.5.9+] If an integer is given, a transient will be used. If an array of option key arguments is given, the argument values will be set to the framework properties.
51 51
      * - type - either `options_table` or `transient`.
52 52
      * - key - the option key or the transient key
@@ -85,6 +85,7 @@  discard block
 block discarded – undo
85 85
         /**
86 86
          * Returns the script caller path.
87 87
          * @remark      It is important to find the caller script path here when separating the library into multiple files.
88
+         * @param string|null $sCallerPath
88 89
          * @return      null|string
89 90
          * @since       3.8.2
90 91
          */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
      * @param       string                  $sCapability    (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
69 69
      * @param       string                  $sTextDomain    (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework.
70 70
      */
71
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
71
+    public function __construct( $isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
72 72
 
73
-        if ( ! $this->_isInstantiatable() ) {
73
+        if ( !$this->_isInstantiatable() ) {
74 74
             return;
75 75
         }
76 76
                         
@@ -90,19 +90,19 @@  discard block
 block discarded – undo
90 90
          */
91 91
         private function _getCallerPath( $sCallerPath ) {
92 92
             
93
-            if ( $sCallerPath  ) {
93
+            if ( $sCallerPath ) {
94 94
                 return trim( $sCallerPath );
95 95
             }
96 96
             
97
-            if ( ! is_admin() ) {
97
+            if ( !is_admin() ) {
98 98
                 return null;
99 99
             }
100 100
             
101
-            if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) {
101
+            if ( !isset( $GLOBALS[ 'pagenow' ] ) ) {
102 102
                 return null;
103 103
             }
104 104
             
105
-            $_sCalllerPath = in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php', ) ) || isset( $_GET[ 'page' ] )
105
+            $_sCalllerPath = in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php',) ) || isset( $_GET[ 'page' ] )
106 106
                 ? AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ) // not using $oUtil as this method is caller earlier than the base constructor.
107 107
                 : null;
108 108
                 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller.php 4 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -219,24 +219,24 @@  discard block
 block discarded – undo
219 219
     }
220 220
     
221 221
     /**
222
-    * Adds the given link(s) into the description cell of the plugin listing table.
223
-    * 
224
-    * <h4>Example</h4>
225
-    * <code>$this->addLinkToPluginDescription( 
226
-    *       "<a href='http://www.google.com'>Google</a>",
227
-    *       "<a href='http://www.yahoo.com'>Yahoo!</a>"
228
-    * );</code>
229
-    * 
230
-    * @since        2.0.0
231
-    * @since        3.0.0       Changed the scope to public from protected.
232
-    * @since        3.3.1       Moved from `AdminPageFramework`.
233
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
234
-    * @param        string      the tagged HTML link text.
235
-    * @param        string      (optional) another tagged HTML link text.
236
-    * @param        string      (optional) add more as many as want by adding items to the next parameters.
237
-    * @access       public
238
-    * @return       void
239
-    */     
222
+     * Adds the given link(s) into the description cell of the plugin listing table.
223
+     * 
224
+     * <h4>Example</h4>
225
+     * <code>$this->addLinkToPluginDescription( 
226
+     *       "<a href='http://www.google.com'>Google</a>",
227
+     *       "<a href='http://www.yahoo.com'>Yahoo!</a>"
228
+     * );</code>
229
+     * 
230
+     * @since        2.0.0
231
+     * @since        3.0.0       Changed the scope to public from protected.
232
+     * @since        3.3.1       Moved from `AdminPageFramework`.
233
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
234
+     * @param        string      the tagged HTML link text.
235
+     * @param        string      (optional) another tagged HTML link text.
236
+     * @param        string      (optional) add more as many as want by adding items to the next parameters.
237
+     * @access       public
238
+     * @return       void
239
+     */     
240 240
     public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {
241 241
         if ( method_exists( $this->oLink, '_addLinkToPluginDescription' ) ) {
242 242
             $this->oLink->_addLinkToPluginDescription( func_get_args() );     
@@ -244,23 +244,23 @@  discard block
 block discarded – undo
244 244
     }
245 245
 
246 246
     /**
247
-    * Adds the given link(s) into the title cell of the plugin listing table.
248
-    * 
249
-    * <h4>Example</h4>
250
-    * <code>$this->addLinkToPluginTitle( 
251
-    *       "<a href='http://www.wordpress.org'>WordPress</a>"
252
-    * );</code>
253
-    * 
254
-    * @since        2.0.0
255
-    * @since        3.0.0       Changed the scope to public from protected.
256
-    * @since        3.3.1       Moved from `AdminPageFramework`.
257
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
258
-    * @param        string      the tagged HTML link text.
259
-    * @param        string      (optional) another tagged HTML link text.
260
-    * @param        string      (optional) add more as many as want by adding items to the next parameters.
261
-    * @access       public
262
-    * @return       void
263
-    */    
247
+     * Adds the given link(s) into the title cell of the plugin listing table.
248
+     * 
249
+     * <h4>Example</h4>
250
+     * <code>$this->addLinkToPluginTitle( 
251
+     *       "<a href='http://www.wordpress.org'>WordPress</a>"
252
+     * );</code>
253
+     * 
254
+     * @since        2.0.0
255
+     * @since        3.0.0       Changed the scope to public from protected.
256
+     * @since        3.3.1       Moved from `AdminPageFramework`.
257
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
258
+     * @param        string      the tagged HTML link text.
259
+     * @param        string      (optional) another tagged HTML link text.
260
+     * @param        string      (optional) add more as many as want by adding items to the next parameters.
261
+     * @access       public
262
+     * @return       void
263
+     */    
264 264
     public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {    
265 265
         if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) {
266 266
             $this->oLink->_addLinkToPluginTitle( func_get_args() );     
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param       array       $aCustomArgs    (optional) The argument array for more advanced parameters.
108 108
      * @return      array       The array holing the queued items.
109 109
      */
110
-    public function enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
110
+    public function enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
111 111
         if ( method_exists( $this->oResource, '_enqueueStyles' ) ) {
112 112
             return $this->oResource->_enqueueStyles( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs );
113 113
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * </ul>
145 145
      * @return      string      The style handle ID. If the passed url is not a valid url string, an empty string will be returned.
146 146
      */    
147
-    public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
147
+    public function enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
148 148
         if ( method_exists( $this->oResource, '_enqueueStyle' ) ) {
149 149
             return $this->oResource->_enqueueStyle( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );     
150 150
         }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @param       array       (optional) The argument array for more advanced parameters.
172 172
      * @return      array        The array holding the queued items.
173 173
      */
174
-    public function enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
174
+    public function enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
175 175
         if ( method_exists( $this->oResource, '_enqueueScripts' ) ) {
176 176
             return $this->oResource->_enqueueScripts( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs );
177 177
         }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      * </ul>
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
      */
215
-    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
215
+    public function enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {    
216 216
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
217 217
             return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
218 218
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     * @access       public
238 238
     * @return       void
239 239
     */     
240
-    public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {
240
+    public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2 = null, $_and_more = null ) {
241 241
         if ( method_exists( $this->oLink, '_addLinkToPluginDescription' ) ) {
242 242
             $this->oLink->_addLinkToPluginDescription( func_get_args() );     
243 243
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     * @access       public
262 262
     * @return       void
263 263
     */    
264
-    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {    
264
+    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2 = null, $_and_more = null ) {    
265 265
         if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) {
266 266
             $this->oLink->_addLinkToPluginTitle( func_get_args() );     
267 267
         }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      * @param       string      (optional) The class selector used in the message HTML element. 'error' and 'updated' are prepared by WordPress but it's not limited to them and can pass a custom name. Default: 'error'.
318 318
      * @param       string      (optional) The ID of the message. If not set, the hash of the message will be used.
319 319
      */
320
-    public function setAdminNotice( $sMessage, $sClassSelector='error', $sID='' ) {
320
+    public function setAdminNotice( $sMessage, $sClassSelector = 'error', $sID = '' ) {
321 321
             
322 322
         $sID = $sID ? $sID : md5( $sMessage );
323 323
         
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
      * @param       boolean         If true, the passed key(s) will be appended to the property; otherwise, it will override the property.
355 355
      * @return      void
356 356
      */
357
-    public function setDisallowedQueryKeys( $asQueryKeys, $bAppend=true ) {
357
+    public function setDisallowedQueryKeys( $asQueryKeys, $bAppend = true ) {
358 358
         
359
-        if ( ! $bAppend ) {
359
+        if ( !$bAppend ) {
360 360
             $this->oProp->aDisallowedQueryKeys = ( array ) $asQueryKeys;
361 361
             return;
362 362
         }
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      * @param       mixed       $vDefault       the default value that will be returned if nothing is stored.
400 400
      * @return      mixed       If the field ID is not specified
401 401
      */
402
-    static public function getOption( $sOptionKey, $asKey=null, $vDefault=null ) {
402
+    static public function getOption( $sOptionKey, $asKey = null, $vDefault = null ) {
403 403
         return AdminPageFramework_WPUtility::getOption( $sOptionKey, $asKey, $vDefault );
404 404
     }    
405 405
     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      * </ul>
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
      */
215
-    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
215
+    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
216 216
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
217 217
             return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
218 218
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     * @access       public
262 262
     * @return       void
263 263
     */    
264
-    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {    
264
+    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {
265 265
         if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) {
266 266
             $this->oLink->_addLinkToPluginTitle( func_get_args() );     
267 267
         }
Please login to merge, or discard this patch.
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -224,6 +224,7 @@  discard block
 block discarded – undo
224 224
     * @param        string      the tagged HTML link text.
225 225
     * @param        string      (optional) another tagged HTML link text.
226 226
     * @param        string      (optional) add more as many as want by adding items to the next parameters.
227
+    * @param string $sTaggedLinkHTML1
227 228
     * @access       public
228 229
     * @return       void
229 230
     */     
@@ -249,6 +250,9 @@  discard block
 block discarded – undo
249 250
     * @param        string      the tagged HTML link text.
250 251
     * @param        string      (optional) another tagged HTML link text.
251 252
     * @param        string      (optional) add more as many as want by adding items to the next parameters.
253
+    * @param null|string $sTaggedLinkHTML1
254
+    * @param string $sTaggedLinkHTML2
255
+    * @param string $_and_more
252 256
     * @access       public
253 257
     * @return       void
254 258
     */    
@@ -268,6 +272,7 @@  discard block
 block discarded – undo
268 272
      * 
269 273
      * @since       3.1.0
270 274
      * @since       3.3.1       Moved from `AdminPageFramework`.
275
+     * @param string $sLabel
271 276
      */  
272 277
     public function setPluginSettingsLinkLabel( $sLabel ) {
273 278
         $this->oProp->sLabelPluginSettingsLink = $sLabel;
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Model_Form.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
      * @since       3.3.0
71 71
      * @since       3.3.1       Moved from `AdminPageFramework_Setting_Base`.
72 72
      */
73
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
73
+    public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
74 74
 
75 75
         parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain );
76 76
         
77 77
         if ( $this->oProp->bIsAdminAjax ) {
78 78
             return;
79 79
         }
80
-        if ( ! $this->oProp->bIsAdmin ) {
80
+        if ( !$this->oProp->bIsAdmin ) {
81 81
             return;
82 82
         }
83 83
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             'section_title' => null,
128 128
             'section_id'    => null,
129 129
         );
130
-        if ( ! $aFieldset[ 'help' ] ) {
130
+        if ( !$aFieldset[ 'help' ] ) {
131 131
             return;
132 132
         }
133 133
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                 'help_tab_id'               => $_sRootSectionID,
146 146
                 'help_tab_content'          => "<span class='contextual-help-tab-title'>" 
147 147
                         . $aFieldset[ 'title' ] 
148
-                    . "</span> - " . PHP_EOL
148
+                    . "</span> - ".PHP_EOL
149 149
                     . $aFieldset[ 'help' ],
150 150
                 'help_tab_sidebar_content'  => $aFieldset[ 'help_aside' ] 
151 151
                     ? $aFieldset[ 'help_aside' ] 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) {            
180 180
 // @todo Test if help pane item gets displayed        
181 181
 
182
-            foreach( $aSectionsets as $_aSectionset ) {
182
+            foreach ( $aSectionsets as $_aSectionset ) {
183 183
 // @todo check capability and conditions                
184 184
                 $_aSectionset = $_aSectionset + array(
185 185
                     'help'          => null,
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function _replyToDetermineSectionsetVisibility( $bVisible, $aSectionset ) {
215 215
 
216
-        if ( ! current_user_can( $aSectionset[ 'capability' ] ) ) {
216
+        if ( !current_user_can( $aSectionset[ 'capability' ] ) ) {
217 217
             return false;
218 218
         }
219
-        if ( ! $aSectionset[ 'if' ] ) { 
219
+        if ( !$aSectionset[ 'if' ] ) { 
220 220
             return false;
221 221
         }
222
-        if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) { 
222
+        if ( !$this->_isSectionOfCurrentPage( $aSectionset ) ) { 
223 223
             return false;
224 224
         }
225 225
         return $bVisible;
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
         private function _isSectionOfCurrentPage( array $aSectionset ) {
238 238
         
239 239
             // Make sure the value type is string so that when the page_slug is not set, it won't match.
240
-            $_sCurrentPageSlug  = ( string ) $this->oProp->getCurrentPageSlug();
240
+            $_sCurrentPageSlug = ( string ) $this->oProp->getCurrentPageSlug();
241 241
             
242 242
             // Make sure if it's in the loading page.
243
-            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug  ) { 
243
+            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug ) { 
244 244
                 return false; 
245 245
             }
246 246
 
247 247
             // If no tag is specified, the user wants to display the section regardless of the tab.
248
-            if ( ! $aSectionset[ 'tab_slug' ] ) {
248
+            if ( !$aSectionset[ 'tab_slug' ] ) {
249 249
                 return true;
250 250
             }
251 251
                 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     public function _replyToDetermineFieldsetVisibility( $bVisible, $aFieldset ) {
263 263
         
264
-        $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
264
+        $_sCurrentPageSlug = $this->oProp->getCurrentPageSlug();
265 265
         
266 266
         // If the specified field does not exist, do nothing.
267 267
         if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) { 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             array( $_sSectionPath, 'page_slug' ), 
292 292
             null 
293 293
         );        
294
-        $aFieldset[ 'tab_slug' ]        = $this->oUtil->getElement( 
294
+        $aFieldset[ 'tab_slug' ] = $this->oUtil->getElement( 
295 295
             $aSectionsets, 
296 296
             array( $_sSectionPath, 'tab_slug' ), 
297 297
             null 
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
             $aSectionsets,
303 303
             $_sSectionPath
304 304
         );
305
-        $aFieldset[ 'section_title' ]   = $this->oUtil->getElement( 
305
+        $aFieldset[ 'section_title' ] = $this->oUtil->getElement( 
306 306
             $_aSectionset, 
307 307
             'title'
308 308
         );
309
-        $aFieldset[ 'capability' ]   = $aFieldset[ 'capability' ]
309
+        $aFieldset[ 'capability' ] = $aFieldset[ 'capability' ]
310 310
             ? $aFieldset[ 'capability' ]
311 311
             : $this->_replyToGetCapabilityForForm( 
312 312
                 $this->oUtil->getElement( $_aSectionset, 'capability' ),
@@ -355,13 +355,13 @@  discard block
 block discarded – undo
355 355
             
356 356
             // Find the capability of the parent section if nested.
357 357
             if ( 0 < $aSectionset[ '_nested_depth' ] ) {
358
-                $_aSectionPath         = $aSectionset[ '_section_path_array' ];
358
+                $_aSectionPath = $aSectionset[ '_section_path_array' ];
359 359
                 array_pop( $_aSectionPath ); // remove the last element
360 360
                 $_sParentCapability = $this->oUtil->getElement(
361 361
                     $this->oForm->aSectionsets,
362 362
                     array_merge( $_aSectionPath, array( 'capability' ) )
363 363
                 );
364
-                if( $_sParentCapability ) {
364
+                if ( $_sParentCapability ) {
365 365
                     return $_sParentCapability;
366 366
                 }
367 367
             }
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
          * @return      void
177 177
          * @since       DEVVER
178 178
          */
179
-        public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) {            
179
+        public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) {
180 180
 // @todo Test if help pane item gets displayed        
181 181
 
182 182
             foreach( $aSectionsets as $_aSectionset ) {
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
         if ( ! current_user_can( $aSectionset[ 'capability' ] ) ) {
217 217
             return false;
218 218
         }
219
-        if ( ! $aSectionset[ 'if' ] ) { 
219
+        if ( ! $aSectionset[ 'if' ] ) {
220 220
             return false;
221 221
         }
222
-        if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) { 
222
+        if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) {
223 223
             return false;
224 224
         }
225 225
         return $bVisible;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $_sCurrentPageSlug  = ( string ) $this->oProp->getCurrentPageSlug();
241 241
             
242 242
             // Make sure if it's in the loading page.
243
-            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug  ) { 
243
+            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug  ) {
244 244
                 return false; 
245 245
             }
246 246
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
265 265
         
266 266
         // If the specified field does not exist, do nothing.
267
-        if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) { 
267
+        if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) {
268 268
             return false; 
269 269
         }        
270 270
         return parent::_replyToDetermineFieldsetVisibility( $bVisible, $aFieldset );
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
      */
278 278
     public function _replyToFormatFieldsetDefinition( $aFieldset, $aSectionsets ) {
279 279
         
280
-        if ( empty( $aFieldset ) ) { 
280
+        if ( empty( $aFieldset ) ) {
281 281
             return $aFieldset; 
282 282
         }
283 283
         
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Model_Page.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
      */         
38 38
     public function _replyToFinalizeInPageTabs() {
39 39
 
40
-        if ( ! $this->oProp->isPageAdded() ) { 
40
+        if ( !$this->oProp->isPageAdded() ) { 
41 41
             return; 
42 42
         }
43 43
 
44
-        foreach( $this->oProp->aPages as $_sPageSlug => $_aPage ) {
44
+        foreach ( $this->oProp->aPages as $_sPageSlug => $_aPage ) {
45 45
             
46
-            if ( ! isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) { 
46
+            if ( !isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) { 
47 47
                 continue; 
48 48
             }
49 49
             
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
          * @since       3.6.0
81 81
          */
82 82
         private function _getDefaultInPageTab( $sPageSlug, $aInPageTabs ) {
83
-            foreach( $aInPageTabs as $_aInPageTab ) {                 
84
-                if ( ! isset( $_aInPageTab[ 'tab_slug' ] ) ) { 
83
+            foreach ( $aInPageTabs as $_aInPageTab ) {                 
84
+                if ( !isset( $_aInPageTab[ 'tab_slug' ] ) ) { 
85 85
                     continue; 
86 86
                 }                
87 87
                 // Regardless of whether it's a hidden tab, it is stored as the default in-page tab.
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
      */         
38 38
     public function _replyToFinalizeInPageTabs() {
39 39
 
40
-        if ( ! $this->oProp->isPageAdded() ) { 
40
+        if ( ! $this->oProp->isPageAdded() ) {
41 41
             return; 
42 42
         }
43 43
 
44 44
         foreach( $this->oProp->aPages as $_sPageSlug => $_aPage ) {
45 45
             
46
-            if ( ! isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) { 
46
+            if ( ! isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) {
47 47
                 continue; 
48 48
             }
49 49
             
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
          * @since       3.6.0
81 81
          */
82 82
         private function _getDefaultInPageTab( $sPageSlug, $aInPageTabs ) {
83
-            foreach( $aInPageTabs as $_aInPageTab ) {                 
84
-                if ( ! isset( $_aInPageTab[ 'tab_slug' ] ) ) { 
83
+            foreach( $aInPageTabs as $_aInPageTab ) {
84
+                if ( ! isset( $_aInPageTab[ 'tab_slug' ] ) ) {
85 85
                     continue; 
86 86
                 }                
87 87
                 // Regardless of whether it's a hidden tab, it is stored as the default in-page tab.
Please login to merge, or discard this patch.
factory/admin_page/_model/AdminPageFramework_CustomSubmitFields.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function __construct( array $aPostElement ) {
36 36
             
37 37
         $this->aPost    = $aPostElement;
38
-        $this->sInputID = $this->getInputID( $aPostElement['submit'] ); // the submit element must be set by the field type.
38
+        $this->sInputID = $this->getInputID( $aPostElement[ 'submit' ] ); // the submit element must be set by the field type.
39 39
     
40 40
     }
41 41
     
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
      * @since   2.0.0
48 48
      * @since   3.4.0   Changed the name from `getElement()`.
49 49
      */ 
50
-    protected function getSubmitValueByType( $aElement, $sInputID, $sElementKey='format' ) {
50
+    protected function getSubmitValueByType( $aElement, $sInputID, $sElementKey = 'format' ) {
51 51
             
52 52
         return $this->getElement( 
53
-            $aElement,  // subject array
53
+            $aElement, // subject array
54 54
             array( $sInputID, $sElementKey ), // dimensional keys
55 55
             null    // default
56 56
         );
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // Only the pressed element will be stored in the array.
81 81
         // The input tag: name="__import[submit][my_section_my_import_field_the_index]" value="Import Button"
82 82
         // The array structure:  array( 'my_section_my_import_field_the_index' => 'Import Button' )
83
-        foreach( $aSubmitElement as $sInputID => $v ) { // $aSubmitElement should have been set in the constructor.
83
+        foreach ( $aSubmitElement as $sInputID => $v ) { // $aSubmitElement should have been set in the constructor.
84 84
             $this->sInputID = $sInputID;
85 85
             return $this->sInputID;
86 86
         }     
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * 
63 63
      * @since 2.1.5
64 64
      */
65
-    public function getSiblingValue( $sKey ) {    
65
+    public function getSiblingValue( $sKey ) {
66 66
         return $this->getSubmitValueByType( $this->aPost, $this->sInputID, $sKey );
67 67
     }
68 68
     
@@ -80,7 +80,8 @@  discard block
 block discarded – undo
80 80
         // Only the pressed element will be stored in the array.
81 81
         // The input tag: name="__import[submit][my_section_my_import_field_the_index]" value="Import Button"
82 82
         // The array structure:  array( 'my_section_my_import_field_the_index' => 'Import Button' )
83
-        foreach( $aSubmitElement as $sInputID => $v ) { // $aSubmitElement should have been set in the constructor.
83
+        foreach( $aSubmitElement as $sInputID => $v ) {
84
+// $aSubmitElement should have been set in the constructor.
84 85
             $this->sInputID = $sInputID;
85 86
             return $this->sInputID;
86 87
         }     
Please login to merge, or discard this patch.
development/factory/admin_page/_model/AdminPageFramework_ExportOptions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
      * @since       2.0.0
95 95
      * @since       3.5.4       Added the `$aHeader` parameter. Deprecated the `$sFileName` parameter as it is included in the $aHeader definition.
96 96
      */ 
97
-    public function doExport( $vData, $sFormatType=null, array $aHeader=array() ) {
97
+    public function doExport( $vData, $sFormatType = null, array $aHeader = array() ) {
98 98
 
99
-        $sFormatType    = isset( $sFormatType ) 
99
+        $sFormatType = isset( $sFormatType ) 
100 100
             ? $sFormatType 
101 101
             : $this->sFormatType;
102 102
 
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
          * @since       3.5.4
123 123
          * @return      void
124 124
          */
125
-        private function _outputHTTPHeader( array $aHeader, $sKey='' ) {
125
+        private function _outputHTTPHeader( array $aHeader, $sKey = '' ) {
126 126
             
127
-            foreach( $aHeader as $_sKey => $_asValue ) {
127
+            foreach ( $aHeader as $_sKey => $_asValue ) {
128 128
                 
129 129
                 // Nested items. Set the key to overrider array keys.
130 130
                 if ( is_array( $_asValue ) ) {
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                     return;
165 165
                 case 'json': // for json.
166 166
                     echo json_encode( ( array ) $vData );
167
-                    return ;
167
+                    return;
168 168
                 case 'array': // for serialized PHP array.
169 169
                 default: // for anything else, 
170 170
                     echo serialize( ( array ) $vData );
Please login to merge, or discard this patch.
_model/delegate/AdminPageFramework_Model__FormRedirectHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function __construct( $oFactory ) {
30 30
        
31
-        $this->oFactory         = $oFactory;        
31
+        $this->oFactory = $oFactory;        
32 32
         
33 33
         // wp_mail() will be loaded by the time 'after_setup_theme' is loaded.
34 34
         // @deprecated      DEVVER
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function _replyToCheckRedirects() {
54 54
   
55
-        if ( ! $this->_shouldProceed() ) {
55
+        if ( !$this->_shouldProceed() ) {
56 56
             return;
57 57
         }
58 58
 
59 59
         // The redirect transient key.
60
-        $_sTransient = 'apf_rurl' . md5( 
61
-            trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_GET['page']}" )
60
+        $_sTransient = 'apf_rurl'.md5( 
61
+            trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_GET[ 'page' ]}" )
62 62
         );
63 63
         
64 64
         // Check the settings error transient.
65 65
         $_aError = $this->oFactory->_getFieldErrors( $_GET[ 'page' ], false );
66
-        if ( ! empty( $_aError ) ) {
66
+        if ( !empty( $_aError ) ) {
67 67
             $this->deleteTransient( $_sTransient ); // we don't need it any more.
68 68
             return;
69 69
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         private function _shouldProceed() {
91 91
 
92 92
             // Check if it's one of the plugin's added page. If not, do nothing.
93
-            if ( ! $this->oFactory->_isInThePage() ) {
93
+            if ( !$this->oFactory->_isInThePage() ) {
94 94
                 return false;
95 95
             }
96 96
             
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 'settings-updated',
104 104
                 false
105 105
             );            
106
-            if ( ! $_bsSettingsUpdatedFlag ) {
106
+            if ( !$_bsSettingsUpdatedFlag ) {
107 107
                 return false;
108 108
             }
109 109
             
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator_Base.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             : 'add_filter';
37 37
             
38 38
         $_sFunctionName(
39
-            $this->sActionHookPrefix . $this->oFactory->oProp->sClassName,
39
+            $this->sActionHookPrefix.$this->oFactory->oProp->sClassName,
40 40
             array( $this, $this->sCallbackName ),
41 41
             $this->iHookPriority,
42 42
             $this->iCallbackParameters
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
      * @since   3.6.3       Moved from `AdminPageFramework_Validation`.
57 57
      * @return  array       The intact stored options.
58 58
      */
59
-    protected function _confirmSubmitButtonAction( $sPressedInputName, $sSectionID, $sType='reset' ) {
59
+    protected function _confirmSubmitButtonAction( $sPressedInputName, $sSectionID, $sType = 'reset' ) {
60 60
         
61
-        switch( $sType ) {
61
+        switch ( $sType ) {
62 62
             default:
63 63
             case 'reset':
64 64
                 $_sFieldErrorMessage = $this->oFactory->oMsg->get( 'reset_options' );
65
-                $_sTransientKey      =  'apf_rc_' . md5( $sPressedInputName . get_current_user_id() );
65
+                $_sTransientKey      = 'apf_rc_'.md5( $sPressedInputName.get_current_user_id() );
66 66
                 break;
67 67
             case 'email':
68 68
                 $_sFieldErrorMessage = $this->oFactory->oMsg->get( 'send_email' );
69
-                $_sTransientKey      =  'apf_ec_' . md5( $sPressedInputName . get_current_user_id() );
69
+                $_sTransientKey      = 'apf_ec_'.md5( $sPressedInputName.get_current_user_id() );
70 70
                 break;                
71 71
         }
72 72
         
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->oFactory->setFieldErrors( $_aErrors );
89 89
             
90 90
         // Set a flag that the confirmation is displayed
91
-        $this->setTransient( $_sTransientKey, $sPressedInputName, 60*2 );
91
+        $this->setTransient( $_sTransientKey, $sPressedInputName, 60 * 2 );
92 92
         
93 93
         // Set the admin notice
94 94
         $this->oFactory->setSettingNotice( $this->oFactory->oMsg->get( 'confirm_perform_task' ), 'error confirmation' );
Please login to merge, or discard this patch.