Completed
Branch master (e9f65a)
by
unknown
03:51 queued 01:58
created
factory/_common/form/error/AdminPageFramework_Form___FieldError.php 2 patches
Doc Comments   -5 removed lines patch added patch discarded remove patch
@@ -80,10 +80,6 @@  discard block
 block discarded – undo
80 80
      * `
81 81
      * @since        3.7.0
82 82
      * @access       public
83
-     * @param        string      $sMessage       the text message to be displayed.
84
-     * @param        string      $sType          (optional) the type of the message, either "error" or "updated"  is used.
85
-     * @param        array       $asAttributes   (optional) the tag attribute array applied to the message container HTML element. If a string is given, it is used as the ID attribute value.
86
-     * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
87 83
      * @return       void
88 84
      */
89 85
     public function set( $aErrors ) {
@@ -128,7 +124,6 @@  discard block
 block discarded – undo
128 124
      * Retrieves the settings error array set by the user in the validation callback.
129 125
      *
130 126
      * @since       3.7.0
131
-     * @param       boolean     $bDelete    whether or not the transient should be deleted after retrieving it.
132 127
      * @return      array
133 128
      */
134 129
     public function get() {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             $_sPageSlug = $this->getElement( $_GET, 'page', '' );
47 47
             $_sTabSlug  = $this->getElement( $_GET, 'tab', '' );
48 48
             $_sUserID   = get_current_user_id();
49
-            return "apf_fe_" . md5(
49
+            return "apf_fe_".md5(
50 50
                 $_sPageNow
51 51
                 . $_sPageSlug
52 52
                 . $_sTabSlug
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     public function get() {
135 135
 
136 136
         // Use a cache if exists.
137
-        self::$_aFieldErrorCaches[ $this->sTransientKey ]  = isset( self::$_aFieldErrorCaches[ $this->sTransientKey ] )
137
+        self::$_aFieldErrorCaches[ $this->sTransientKey ] = isset( self::$_aFieldErrorCaches[ $this->sTransientKey ] )
138 138
             ? self::$_aFieldErrorCaches[ $this->sTransientKey ]
139 139
             : $this->getTransient( $this->sTransientKey );
140 140
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * @since       3.7.0
152 152
      */
153 153
     public function delete() {
154
-        if ( $this->hasBeenCalled( 'delete_' . $this->sTransientKey ) ) {
154
+        if ( $this->hasBeenCalled( 'delete_'.$this->sTransientKey ) ) {
155 155
             return;
156 156
         }
157 157
         add_action( 'shutdown', array( $this, '_replyToDelete' ) );
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_size.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -211,6 +211,7 @@  discard block
 block discarded – undo
211 211
              * Returns the HTML output of the number input part.
212 212
              *
213 213
              * @since       3.5.3
214
+             * @param boolean $bMultiLabels
214 215
              * @return      string      The number input output.
215 216
              * @internal
216 217
              */
@@ -265,6 +266,7 @@  discard block
 block discarded – undo
265 266
              * Returns the HTML output of the unit select input part.
266 267
              *
267 268
              * @since       3.5.3
269
+             * @param boolean $bMultiLabels
268 270
              * @return      string      The unit select input output.
269 271
              * @internal
270 272
              */
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     /**
65 65
      * Defines the field type slugs used for this field type.
66 66
      */
67
-    public $aFieldTypeSlugs = array( 'size', );
67
+    public $aFieldTypeSlugs = array( 'size',);
68 68
 
69 69
     /**
70 70
      * Defines the default key-values of this field type.
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected $aDefaultKeys = array(
75 75
         'is_multiple'           => false, // indicates whether the select tag alloes multiple selections.
76
-        'units'                 => null,  // do not define units here since this will be merged with the user defined field array.
76
+        'units'                 => null, // do not define units here since this will be merged with the user defined field array.
77 77
         'attributes'            => array(
78 78
             'size'      => array(
79 79
                 'min'           => null,
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     protected $aDefaultUnits = array(
103 103
         'px'    => 'px', // pixel
104
-        '%'     => '%',  // percentage
104
+        '%'     => '%', // percentage
105 105
         'em'    => 'em', // font size
106 106
         'ex'    => 'ex', // font height
107 107
         'in'    => 'in', // inch
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
         );
162 162
 
163 163
         $_aOutput = array();
164
-        foreach( ( array ) $aField[ 'label' ] as $_isKey => $_sLabel ) {
165
-            $_aOutput[] = $this->_getFieldOutputByLabel(
164
+        foreach ( ( array ) $aField[ 'label' ] as $_isKey => $_sLabel ) {
165
+            $_aOutput[ ] = $this->_getFieldOutputByLabel(
166 166
                 $_isKey,
167 167
                 $_sLabel,
168 168
                 $aField
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
 
186 186
             $_aBaseAttributes   = $_bMultiLabels
187 187
                 ? array(
188
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$isKey}]",
189
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$isKey}",
188
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$isKey}]",
189
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$isKey}",
190 190
                         'value' => $aField[ 'value' ],
191 191
                     )
192 192
                     + $aField[ 'attributes' ]
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
 
199 199
             $_aOutput = array(
200 200
                 $this->getElementByLabel( $aField[ 'before_label' ], $isKey, $aField[ 'label' ] ),
201
-                    "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ) . ">",
202
-                        $this->_getNumberInputPart( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ),  // The size (number) part
203
-                        $this->_getUnitSelectInput( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ),  // The unit (select) part
201
+                    "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ).">",
202
+                        $this->_getNumberInputPart( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ), // The size (number) part
203
+                        $this->_getUnitSelectInput( $aField, $_aBaseAttributes, $isKey, is_array( $aField[ 'label' ] ) ), // The unit (select) part
204 204
                     "</div>",
205 205
                 $this->getElementByLabel( $aField[ 'after_label' ], $isKey, $aField[ 'label' ] )
206 206
             );
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             private function _getNumberInputPart( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) {
218 218
 
219 219
                 // Size and Size Label
220
-                $_aSizeAttributes       = $this->_getSizeAttributes(
220
+                $_aSizeAttributes = $this->_getSizeAttributes(
221 221
                     $aField,
222 222
                     $aBaseAttributes,
223 223
                     $bMultiLabels
@@ -225,32 +225,32 @@  discard block
 block discarded – undo
225 225
                         : ''
226 226
                 );
227 227
 
228
-                $_aSizeLabelAttributes  = array(
228
+                $_aSizeLabelAttributes = array(
229 229
                     'for'   => $_aSizeAttributes[ 'id' ],
230 230
                     'class' => $_aSizeAttributes[ 'disabled' ]
231 231
                         ? 'disabled'
232 232
                         : null,
233 233
                 );
234 234
 
235
-                $_sLabel                = $this->getElementByLabel(
235
+                $_sLabel = $this->getElementByLabel(
236 236
                     $aField[ 'label' ],
237 237
                     $isKey,
238 238
                     $aField[ 'label' ]
239 239
                 );
240
-                return "<label " . $this->getAttributes( $_aSizeLabelAttributes ) . ">"
240
+                return "<label ".$this->getAttributes( $_aSizeLabelAttributes ).">"
241 241
                     . $this->getElement(
242 242
                         $aField,
243 243
                         $bMultiLabels
244 244
                             ? array( 'before_label', $isKey, 'size' )
245 245
                             : array( 'before_label', 'size' )
246 246
                     )
247
-                    . ( $aField[ 'label' ] && ! $aField[ 'repeatable' ]
248
-                        ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">"
247
+                    . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
248
+                        ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">"
249 249
                                 . $_sLabel
250 250
                             . "</span>"
251 251
                         : ""
252 252
                     )
253
-                    . "<input " . $this->getAttributes( $_aSizeAttributes ) . " />"
253
+                    . "<input ".$this->getAttributes( $_aSizeAttributes )." />"
254 254
                     . $this->getElement(
255 255
                         $aField,
256 256
                         $bMultiLabels
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
                     )
294 294
                     : $aField[ 'units' ];
295 295
 
296
-                return "<label " . $this->getAttributes(
296
+                return "<label ".$this->getAttributes(
297 297
                         array(
298 298
                             'for'       => $_aUnitAttributes[ 'id' ],
299 299
                             'class'     => $_aUnitAttributes[ 'disabled' ]
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
                  * @return      array       an unit attribute array
326 326
                  * @internal
327 327
                  */
328
-                private function _getUnitAttributes( array $aField, array $aBaseAttributes, $isLabelKey='' ) {
328
+                private function _getUnitAttributes( array $aField, array $aBaseAttributes, $isLabelKey = '' ) {
329 329
 
330
-                    $_bIsMultiple    = $aField[ 'is_multiple' ]
330
+                    $_bIsMultiple = $aField[ 'is_multiple' ]
331 331
                         ? true
332 332
                         : $this->getElement(
333 333
                             $aField,
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 
340 340
                     $_aSelectAttributes = array(
341 341
                         'type'      => 'select',
342
-                        'id'        => $aField[ 'input_id' ] . ( '' === $isLabelKey ? '' : '_' . $isLabelKey ) . '_' . 'unit',
342
+                        'id'        => $aField[ 'input_id' ].( '' === $isLabelKey ? '' : '_'.$isLabelKey ).'_'.'unit',
343 343
                         'multiple'  => $_bIsMultiple
344 344
                             ? 'multiple'
345 345
                             : null,
346 346
                         'name'      => $_bIsMultiple
347
-                            ? "{$aField['_input_name']}" . ( '' === $isLabelKey ? '' : '[' . $isLabelKey . ']' ) . "[unit][]"
348
-                            : "{$aField['_input_name']}" . ( '' === $isLabelKey ? '' : '[' . $isLabelKey . ']' ) . "[unit]",
347
+                            ? "{$aField[ '_input_name' ]}".( '' === $isLabelKey ? '' : '['.$isLabelKey.']' )."[unit][]"
348
+                            : "{$aField[ '_input_name' ]}".( '' === $isLabelKey ? '' : '['.$isLabelKey.']' )."[unit]",
349 349
                         'value'     => $this->getElement(
350 350
                             $aField,
351 351
                             array( 'value', 'unit' ),
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
                         '' === $isLabelKey
358 358
                             ? array( 'attributes', 'unit' )
359 359
                             : array( 'attributes', $isLabelKey, 'unit' ),
360
-                        $this->aDefaultKeys['attributes']['unit']
360
+                        $this->aDefaultKeys[ 'attributes' ][ 'unit' ]
361 361
                     )
362 362
                     + $aBaseAttributes;
363 363
                     return $_aSelectAttributes;
@@ -371,15 +371,15 @@  discard block
 block discarded – undo
371 371
              * @return      array       an size attribute array
372 372
              * @internal
373 373
              */
374
-            private function _getSizeAttributes( array $aField, array $aBaseAttributes, $sLabelKey='' ) {
374
+            private function _getSizeAttributes( array $aField, array $aBaseAttributes, $sLabelKey = '' ) {
375 375
 
376 376
                 return array(
377 377
                         'type'  => 'number',
378
-                        'id'    => $aField['input_id'] . '_' . ( '' !== $sLabelKey ? $sLabelKey . '_' : '' ) . 'size',
379
-                        'name'  => $aField[ '_input_name' ] . ( '' !== $sLabelKey ? "[{$sLabelKey}]" : '' ) . '[size]',
378
+                        'id'    => $aField[ 'input_id' ].'_'.( '' !== $sLabelKey ? $sLabelKey.'_' : '' ).'size',
379
+                        'name'  => $aField[ '_input_name' ].( '' !== $sLabelKey ? "[{$sLabelKey}]" : '' ).'[size]',
380 380
                         'value' => $this->getElement(
381
-                            $aField,        // subject
382
-                            array( 'value', 'size' ),   // dimensional keys
381
+                            $aField, // subject
382
+                            array( 'value', 'size' ), // dimensional keys
383 383
                             ''  // default
384 384
                         ),
385 385
                     )
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_system.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -297,6 +297,7 @@  discard block
 block discarded – undo
297 297
             /**
298 298
              * Returns the system information by section.
299 299
              * @since       3.5.3
300
+             * @param integer $iPrintType
300 301
              * @return      string      The system information by section.
301 302
              * @internal
302 303
              */
@@ -421,6 +422,8 @@  discard block
 block discarded – undo
421 422
                     /**
422 423
                      *
423 424
                      * @since       3.5.12
425
+                     * @param string $asCategories
426
+                     * @param string $asRemovingCategories
424 427
                      * @return      string|array
425 428
                      * @internal
426 429
                      */
Please login to merge, or discard this patch.
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * </code>
73 73
      * @var         array
74 74
      */
75
-    public $aFieldTypeSlugs = array( 'system', );
75
+    public $aFieldTypeSlugs = array( 'system',);
76 76
 
77 77
     /**
78 78
      * Defines the default key-values of this field type.
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
      * @remark          `$_aDefaultKeys` holds shared default key-values defined in the base class.
93 93
      */
94 94
     protected $aDefaultKeys = array(
95
-        'data'          =>  array(),        // [3.2.0+] Stores the data to be displayed
96
-        'print_type'    =>  1,              // [3.4.6+] 1: readable representation of array. 2: print_r()
95
+        'data'          =>  array(), // [3.2.0+] Stores the data to be displayed
96
+        'print_type'    =>  1, // [3.4.6+] 1: readable representation of array. 2: print_r()
97 97
         'attributes'    =>    array(
98 98
             'rows'          => 60,
99 99
             'autofocus'     => null,
@@ -232,13 +232,13 @@  discard block
 block discarded – undo
232 232
             . "<div class='admin-page-framework-input-label-container'>"
233 233
                 . "<label for='{$aField[ 'input_id' ]}'>"
234 234
                     . $aField[ 'before_input' ]
235
-                    . ( $aField[ 'label' ] && ! $aField[ 'repeatable' ]
236
-                        ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">"
235
+                    . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
236
+                        ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">"
237 237
                                 . $aField[ 'label' ]
238 238
                             . "</span>"
239 239
                         : ""
240 240
                     )
241
-                    . "<textarea " . $this->getAttributes( $_aInputAttributes ) . " >"
241
+                    . "<textarea ".$this->getAttributes( $_aInputAttributes )." >"
242 242
                         . esc_textarea( $this->_getSystemInfomation( $aField[ 'value' ], $aField[ 'data' ], $aField[ 'print_type' ] ) )
243 243
                     . "</textarea>"
244 244
                     . $aField[ 'after_input' ]
@@ -253,15 +253,15 @@  discard block
 block discarded – undo
253 253
          * @return      string      The human readable system information.
254 254
          * @internal
255 255
          */
256
-        private function _getSystemInfomation( $asValue=null, $asCustomData=null, $iPrintType=1 ) {
256
+        private function _getSystemInfomation( $asValue = null, $asCustomData = null, $iPrintType = 1 ) {
257 257
 
258 258
             if ( isset( $asValue ) ) {
259 259
                 return $asValue;
260 260
             }
261 261
 
262
-            $_aOutput   = array();
263
-            foreach( $this->_getFormattedSystemInformation( $asCustomData ) as $_sSection => $_aInfo ) {
264
-                $_aOutput[] = $this->_getSystemInfoBySection( $_sSection, $_aInfo, $iPrintType );
262
+            $_aOutput = array();
263
+            foreach ( $this->_getFormattedSystemInformation( $asCustomData ) as $_sSection => $_aInfo ) {
264
+                $_aOutput[ ] = $this->_getSystemInfoBySection( $_sSection, $_aInfo, $iPrintType );
265 265
             }
266 266
             return implode( PHP_EOL, $_aOutput );
267 267
 
@@ -276,18 +276,18 @@  discard block
 block discarded – undo
276 276
 
277 277
                 $_aData = $this->getAsArray( $asCustomData );
278 278
                 $_aData = $_aData + array(
279
-                    'Admin Page Framework'  => isset( $_aData['Admin Page Framework'] )
279
+                    'Admin Page Framework'  => isset( $_aData[ 'Admin Page Framework' ] )
280 280
                         ? null
281 281
                         : AdminPageFramework_Registry::getInfo(),
282
-                    'WordPress'             => $this->_getSiteInfoWithCache( ! isset( $_aData['WordPress'] ) ),
283
-                    'PHP'                   => $this->_getPHPInfo( ! isset( $_aData['PHP'] ) ),
284
-                    'PHP Error Log'         => $this->_getErrorLogByType( 'php', ! isset( $_aData['PHP Error Log'] ) ),
285
-                    'MySQL'                 => isset( $_aData['MySQL'] )
282
+                    'WordPress'             => $this->_getSiteInfoWithCache( !isset( $_aData[ 'WordPress' ] ) ),
283
+                    'PHP'                   => $this->_getPHPInfo( !isset( $_aData[ 'PHP' ] ) ),
284
+                    'PHP Error Log'         => $this->_getErrorLogByType( 'php', !isset( $_aData[ 'PHP Error Log' ] ) ),
285
+                    'MySQL'                 => isset( $_aData[ 'MySQL' ] )
286 286
                         ? null
287
-                        : $this->getMySQLInfo(),    // defined in the utility class.
288
-                    'MySQL Error Log'       => $this->_getErrorLogByType( 'mysql', ! isset( $_aData['MySQL Error Log'] ) ),
289
-                    'Server'                => $this->_getWebServerInfo( ! isset( $_aData['Server'] ) ),
290
-                    'Browser'               => $this->_getClientInfo( ! isset( $_aData['Browser'] ) ),
287
+                        : $this->getMySQLInfo(), // defined in the utility class.
288
+                    'MySQL Error Log'       => $this->_getErrorLogByType( 'mysql', !isset( $_aData[ 'MySQL Error Log' ] ) ),
289
+                    'Server'                => $this->_getWebServerInfo( !isset( $_aData[ 'Server' ] ) ),
290
+                    'Browser'               => $this->_getClientInfo( !isset( $_aData[ 'Browser' ] ) ),
291 291
                 );
292 292
 
293 293
                 // Dropping empty elements allows the user to remove a section by setting an empty section.
@@ -304,10 +304,10 @@  discard block
 block discarded – undo
304 304
                 switch ( $iPrintType ) {
305 305
                     default:
306 306
                     case 1: // use the framework readable representation of arrays.
307
-                        return $this->getReadableArrayContents( $sSectionName, $aData, 32 ) . PHP_EOL;
307
+                        return $this->getReadableArrayContents( $sSectionName, $aData, 32 ).PHP_EOL;
308 308
                     case 2: // use print_r()
309
-                        return "[{$sSectionName}]" . PHP_EOL
310
-                            . print_r( $aData, true ) . PHP_EOL;
309
+                        return "[{$sSectionName}]".PHP_EOL
310
+                            . print_r( $aData, true ).PHP_EOL;
311 311
                 }
312 312
             }
313 313
             /**
@@ -317,17 +317,17 @@  discard block
 block discarded – undo
317 317
              * @since       3.4.6
318 318
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
319 319
              */
320
-            private function _getClientInfo( $bGenerateInfo=true ) {
320
+            private function _getClientInfo( $bGenerateInfo = true ) {
321 321
 
322
-                if ( ! $bGenerateInfo ) {
322
+                if ( !$bGenerateInfo ) {
323 323
                     return '';
324 324
                 }
325 325
 
326 326
                 // Check the browscap value in the ini file first to prevent warnings from being populated
327 327
                 $_aBrowser = @ini_get( 'browscap' )
328
-                    ? get_browser( $_SERVER['HTTP_USER_AGENT'], true )
328
+                    ? get_browser( $_SERVER[ 'HTTP_USER_AGENT' ], true )
329 329
                     : array();
330
-                unset( $_aBrowser['browser_name_regex'] );  // this element causes output to be blank
330
+                unset( $_aBrowser[ 'browser_name_regex' ] ); // this element causes output to be blank
331 331
                 return empty( $_aBrowser )
332 332
                     ? __( 'No browser information found.', 'admin-page-framework' )
333 333
                     : $_aBrowser;
@@ -343,9 +343,9 @@  discard block
 block discarded – undo
343 343
              * @param       string      $sType          The error log type. Either 'php' or 'mysql' is accepted.
344 344
              * @param       boolean     $bGenerateInfo  Whether to generate a log. This is for the caller method to reduce a conditinal statement.
345 345
              */
346
-            private function _getErrorLogByType( $sType, $bGenerateInfo=true ) {
346
+            private function _getErrorLogByType( $sType, $bGenerateInfo = true ) {
347 347
 
348
-                if ( ! $bGenerateInfo ) {
348
+                if ( !$bGenerateInfo ) {
349 349
                     return '';
350 350
                 }
351 351
                 switch ( $sType ) {
@@ -377,9 +377,9 @@  discard block
 block discarded – undo
377 377
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
378 378
              * @return      array      The generated site information array.
379 379
              */
380
-            private function _getSiteInfoWithCache( $bGenerateInfo=true ) {
380
+            private function _getSiteInfoWithCache( $bGenerateInfo = true ) {
381 381
 
382
-                if ( ! $bGenerateInfo || isset( self::$_aSiteInfo ) ) {
382
+                if ( !$bGenerateInfo || isset( self::$_aSiteInfo ) ) {
383 383
                     return self::$_aSiteInfo;
384 384
                 }
385 385
                 self::$_aSiteInfo = self::_getSiteInfo();
@@ -413,8 +413,8 @@  discard block
 block discarded – undo
413 413
                         'wp_remote_get()'                                           => $this->_getWPRemoteGetStatus(),
414 414
                         __( 'Multibite String Extension', 'admin-page-framework' )  => $this->getAOrB( function_exists( 'mb_detect_encoding' ), $this->oMsg->get( 'enabled' ), $this->oMsg->get( 'disabled' ) ),
415 415
                         __( 'WP_CONTENT_DIR Writeable', 'admin-page-framework' )    => $this->getAOrB( is_writable( WP_CONTENT_DIR ), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
416
-                        __( 'Active Plugins', 'admin-page-framework' )              => PHP_EOL . $this->_getActivePlugins(),
417
-                        __( 'Network Active Plugins', 'admin-page-framework' )      => PHP_EOL . $this->_getNetworkActivePlugins(),
416
+                        __( 'Active Plugins', 'admin-page-framework' )              => PHP_EOL.$this->_getActivePlugins(),
417
+                        __( 'Network Active Plugins', 'admin-page-framework' )      => PHP_EOL.$this->_getNetworkActivePlugins(),
418 418
                         __( 'Constants', 'admin-page-framework' )                   => $this->_getDefinedConstants( 'user' ),
419 419
                     );
420 420
                 }
@@ -424,9 +424,9 @@  discard block
 block discarded – undo
424 424
                      * @return      string|array
425 425
                      * @internal
426 426
                      */
427
-                    private function _getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
427
+                    private function _getDefinedConstants( $asCategories = null, $asRemovingCategories = null ) {
428 428
                         $_asConstants = $this->getDefinedConstants( $asCategories, $asRemovingCategories );
429
-                        if ( ! is_array( $_asConstants ) ) {
429
+                        if ( !is_array( $_asConstants ) ) {
430 430
                             return $_asConstants;
431 431
                         }
432 432
                         if ( isset( $_asConstants[ 'user' ] ) ) {
@@ -462,13 +462,13 @@  discard block
 block discarded – undo
462 462
                 private function _getActiveThemeName() {
463 463
 
464 464
                     // If the WordPress version is less than 3.4,
465
-                    if ( version_compare( $GLOBALS['wp_version'], '3.4', '<' ) ) {
466
-                        $_aThemeData = get_theme_data( get_stylesheet_directory() . '/style.css' );
467
-                        return $_aThemeData['Name'] . ' ' . $_aThemeData['Version'];
465
+                    if ( version_compare( $GLOBALS[ 'wp_version' ], '3.4', '<' ) ) {
466
+                        $_aThemeData = get_theme_data( get_stylesheet_directory().'/style.css' );
467
+                        return $_aThemeData[ 'Name' ].' '.$_aThemeData[ 'Version' ];
468 468
                     }
469 469
 
470 470
                     $_oThemeData = wp_get_theme();
471
-                    return $_oThemeData->Name . ' ' . $_oThemeData->Version;
471
+                    return $_oThemeData->Name.' '.$_oThemeData->Version;
472 472
 
473 473
                 }
474 474
                 /**
@@ -482,10 +482,10 @@  discard block
 block discarded – undo
482 482
                     $_aPluginList       = array();
483 483
                     $_aActivePlugins    = get_option( 'active_plugins', array() );
484 484
                     foreach ( get_plugins() as $_sPluginPath => $_aPlugin ) {
485
-                        if ( ! in_array( $_sPluginPath, $_aActivePlugins ) ) {
485
+                        if ( !in_array( $_sPluginPath, $_aActivePlugins ) ) {
486 486
                             continue;
487 487
                         }
488
-                        $_aPluginList[] = '    ' . $_aPlugin['Name'] . ': ' . $_aPlugin['Version'];
488
+                        $_aPluginList[ ] = '    '.$_aPlugin[ 'Name' ].': '.$_aPlugin[ 'Version' ];
489 489
                     }
490 490
                     return implode( PHP_EOL, $_aPluginList );
491 491
 
@@ -497,17 +497,17 @@  discard block
 block discarded – undo
497 497
                  */
498 498
                 private function _getNetworkActivePlugins() {
499 499
 
500
-                    if ( ! is_multisite() ) {
500
+                    if ( !is_multisite() ) {
501 501
                         return '';
502 502
                     }
503 503
                     $_aPluginList       = array();
504 504
                     $_aActivePlugins    = get_site_option( 'active_sitewide_plugins', array() );
505 505
                     foreach ( wp_get_active_network_plugins() as $_sPluginPath ) {
506
-                        if ( ! array_key_exists( plugin_basename( $_sPluginPath ), $_aActivePlugins ) ) {
506
+                        if ( !array_key_exists( plugin_basename( $_sPluginPath ), $_aActivePlugins ) ) {
507 507
                             continue;
508 508
                         }
509 509
                         $_aPlugin       = get_plugin_data( $_sPluginPath );
510
-                        $_aPluginList[] = '    ' . $_aPlugin['Name'] . ' :' . $_aPlugin['Version'];
510
+                        $_aPluginList[ ] = '    '.$_aPlugin[ 'Name' ].' :'.$_aPlugin[ 'Version' ];
511 511
                     }
512 512
                     return implode( PHP_EOL, $_aPluginList );
513 513
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
                     $_vResponse = false === $_vResponse
526 526
                         ? wp_remote_post(
527 527
                             // 'https://www.paypal.com/cgi-bin/webscr',
528
-                            add_query_arg( $_GET, admin_url( $GLOBALS['pagenow'] ) ),
528
+                            add_query_arg( $_GET, admin_url( $GLOBALS[ 'pagenow' ] ) ),
529 529
                             array(
530 530
                                 'sslverify'     => false,
531 531
                                 'timeout'       => 60,
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
                     $_vResponse = $this->getTransient( 'apf_rg_check' );
549 549
                     $_vResponse = false === $_vResponse
550 550
                         ? wp_remote_get(
551
-                            add_query_arg( $_GET + array( 'apf_remote_request_test' => '_testing' ), admin_url( $GLOBALS['pagenow'] ) ),
551
+                            add_query_arg( $_GET + array( 'apf_remote_request_test' => '_testing' ), admin_url( $GLOBALS[ 'pagenow' ] ) ),
552 552
                             array(
553 553
                                 'sslverify'     => false,
554 554
                                 'timeout'       => 60,
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
                         if ( is_wp_error( $mResponse ) ) {
574 574
                             return true;
575 575
                         }
576
-                        if ( $mResponse[ 'response'][ 'code' ] < 200 ) {
576
+                        if ( $mResponse[ 'response' ][ 'code' ] < 200 ) {
577 577
                             return true;
578 578
                         }
579 579
                         if ( $mResponse[ 'response' ][ 'code' ] >= 300 ) {
@@ -596,13 +596,13 @@  discard block
 block discarded – undo
596 596
              * @since       3.4.6
597 597
              * @since       3.5.3       Added the $bGenerateInfo parameter. This is to reduce conditional statement in the caller method.
598 598
              */
599
-            private function _getPHPInfo( $bGenerateInfo=true ) {
599
+            private function _getPHPInfo( $bGenerateInfo = true ) {
600 600
 
601
-                if ( ! $bGenerateInfo || isset( self::$_aPHPInfo ) ) {
601
+                if ( !$bGenerateInfo || isset( self::$_aPHPInfo ) ) {
602 602
                     return self::$_aPHPInfo;
603 603
                 }
604 604
 
605
-                $_oErrorReporting   = new AdminPageFramework_ErrorReporting;
605
+                $_oErrorReporting = new AdminPageFramework_ErrorReporting;
606 606
                 self::$_aPHPInfo = array(
607 607
                     __( 'Version', 'admin-page-framework' )                 => phpversion(),
608 608
                     __( 'Safe Mode', 'admin-page-framework' )               => $this->getAOrB( @ini_get( 'safe_mode' ), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
@@ -613,16 +613,16 @@  discard block
 block discarded – undo
613 613
                     __( 'Max Execution Time', 'admin-page-framework' )      => @ini_get( 'max_execution_time' ),
614 614
                     __( 'Max Input Vars', 'admin-page-framework' )          => @ini_get( 'max_input_vars' ),
615 615
                     __( 'Argument Separator', 'admin-page-framework' )      => @ini_get( 'arg_separator.output' ),
616
-                    __( 'Allow URL File Open', 'admin-page-framework' )     => $this->getAOrB( @ini_get( 'allow_url_fopen' ),    $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
617
-                    __( 'Display Errors', 'admin-page-framework' )          => $this->getAOrB( @ini_get( 'display_errors' ),     $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
618
-                    __( 'Log Errors', 'admin-page-framework' )              => $this->getAOrB( @ini_get( 'log_errors' ),         $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
616
+                    __( 'Allow URL File Open', 'admin-page-framework' )     => $this->getAOrB( @ini_get( 'allow_url_fopen' ), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
617
+                    __( 'Display Errors', 'admin-page-framework' )          => $this->getAOrB( @ini_get( 'display_errors' ), $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
618
+                    __( 'Log Errors', 'admin-page-framework' )              => $this->getAOrB( @ini_get( 'log_errors' ), $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
619 619
                     __( 'Error log location', 'admin-page-framework' )      => @ini_get( 'error_log' ),
620 620
                     __( 'Error Reporting Level', 'admin-page-framework' )   => $_oErrorReporting->getErrorLevel(),
621
-                    __( 'FSOCKOPEN', 'admin-page-framework' )               => $this->getAOrB( function_exists( 'fsockopen' ),   $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
622
-                    __( 'cURL', 'admin-page-framework' )                    => $this->getAOrB( function_exists( 'curl_init' ),   $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
623
-                    __( 'SOAP', 'admin-page-framework' )                    => $this->getAOrB( class_exists( 'SoapClient' ),     $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
624
-                    __( 'SUHOSIN', 'admin-page-framework' )                 => $this->getAOrB( extension_loaded( 'suhosin' ),    $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
625
-                    'ini_set()'                                             => $this->getAOrB( function_exists( 'ini_set' ),     $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
621
+                    __( 'FSOCKOPEN', 'admin-page-framework' )               => $this->getAOrB( function_exists( 'fsockopen' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
622
+                    __( 'cURL', 'admin-page-framework' )                    => $this->getAOrB( function_exists( 'curl_init' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
623
+                    __( 'SOAP', 'admin-page-framework' )                    => $this->getAOrB( class_exists( 'SoapClient' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
624
+                    __( 'SUHOSIN', 'admin-page-framework' )                 => $this->getAOrB( extension_loaded( 'suhosin' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
625
+                    'ini_set()'                                             => $this->getAOrB( function_exists( 'ini_set' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
626 626
                 )
627 627
                 + $this->getPHPInfo()
628 628
                 + array(
@@ -641,11 +641,11 @@  discard block
 block discarded – undo
641 641
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
642 642
              * @return      array|string
643 643
              */
644
-            private function _getWebServerInfo( $bGenerateInfo=true ) {
644
+            private function _getWebServerInfo( $bGenerateInfo = true ) {
645 645
 
646 646
                 return $bGenerateInfo
647 647
                     ? array(
648
-                        __( 'Web Server', 'admin-page-framework' )                  => $_SERVER['SERVER_SOFTWARE'],
648
+                        __( 'Web Server', 'admin-page-framework' )                  => $_SERVER[ 'SERVER_SOFTWARE' ],
649 649
                         'SSL'                                                       => $this->getAOrB( is_ssl(), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
650 650
                         __( 'Session', 'admin-page-framework' )                     => $this->getAOrB( isset( $_SESSION ), $this->oMsg->get( 'enabled' ), $this->oMsg->get( 'disabled' ) ),
651 651
                         __( 'Session Name', 'admin-page-framework' )                => esc_html( @ini_get( 'session.name' ) ),
Please login to merge, or discard this patch.
factory/_common/form/input/AdminPageFramework_Input_checkbox.php 3 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,6 @@
 block discarded – undo
27 27
      * Returns the output of the input element.
28 28
      *
29 29
      * @since       3.4.0
30
-     * @param       string      $sLabel         The label text.
31
-     * @param       array       $aAttributes    (optional) The attribute array. If set, it will be merged with the attribute set in the constructor.
32 30
      */
33 31
     public function get( /* $sLabel, $aAttributes=array() */ ) {
34 32
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         // Output
49 49
         return
50
-           "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
50
+            "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
51 51
                 . $this->_getInputElements( $_aAttributes, $this->aOptions )
52 52
             . "</{$this->aOptions[ 'input_container_tag' ]}>"
53 53
             . "<{$this->aOptions[ 'label_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ) . ">"
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
     public function get( /* $sLabel, $aAttributes=array() */ ) {
34 34
 
35 35
         // Parameters
36
-        $_aParams       = func_get_args() + array(
37
-            0 => '',            // 1st parameter
36
+        $_aParams = func_get_args() + array(
37
+            0 => '', // 1st parameter
38 38
             1 => array()        // 2nd parameter
39 39
         );
40
-        $_sLabel        = $_aParams[ 0 ];       // first parameter
40
+        $_sLabel        = $_aParams[ 0 ]; // first parameter
41 41
 
42 42
         // Attributes
43 43
         $_aAttributes   = $this->uniteArrays(   // second parameter
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 
48 48
         // Output
49 49
         return
50
-           "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
50
+           "<{$this->aOptions[ 'input_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ).">"
51 51
                 . $this->_getInputElements( $_aAttributes, $this->aOptions )
52 52
             . "</{$this->aOptions[ 'input_container_tag' ]}>"
53
-            . "<{$this->aOptions[ 'label_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ) . ">"
53
+            . "<{$this->aOptions[ 'label_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ).">"
54 54
                 . $_sLabel
55 55
             . "</{$this->aOptions[ 'label_container_tag' ]}>"
56 56
         ;
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
         private function _getInputElements( $aAttributes, $aOptions ) {
65 65
             $_sOutput = $this->aOptions[ 'save_unchecked' ]
66 66
                 // the unchecked value must be set prior to the checkbox input field.
67
-                ? "<input " . $this->getAttributes(
67
+                ? "<input ".$this->getAttributes(
68 68
                     array(
69 69
                         'type'      => 'hidden',
70 70
                         'class'     => $aAttributes[ 'class' ],
71 71
                         'name'      => $aAttributes[ 'name' ],
72 72
                         'value'     => '0',
73 73
                     )
74
-                ) . " />"
74
+                )." />"
75 75
                 : '';
76
-            $_sOutput .= "<input " . $this->getAttributes( $aAttributes ) . " />";
76
+            $_sOutput .= "<input ".$this->getAttributes( $aAttributes )." />";
77 77
             return $_sOutput;
78 78
         }
79 79
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function getAttributesByKey( /* $sKey */ ) {
87 87
 
88 88
         // Parameters
89
-        $_aParams       = func_get_args() + array( 0 => '', );
89
+        $_aParams       = func_get_args() + array( 0 => '',);
90 90
         $_sKey          = $_aParams[ 0 ];
91 91
         $_bIsMultiple   = '' !== $_sKey;
92 92
 
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
             // The type needs to be specified since the postytpe field type extends this class. If not set, the 'posttype' will be passed to the type attribute.
99 99
             + array(
100 100
                 'type'      => 'checkbox',
101
-                'id'        => $this->aAttributes[ 'id' ] . '_' . $_sKey,
101
+                'id'        => $this->aAttributes[ 'id' ].'_'.$_sKey,
102 102
                 'checked'   => $this->_getCheckedAttributeValue( $_sKey ),
103
-                'value'     => 1,   // this must be always 1 because the key value can be zero. In that case, the value always will be false and unchecked.
103
+                'value'     => 1, // this must be always 1 because the key value can be zero. In that case, the value always will be false and unchecked.
104 104
                 'name'      => $_bIsMultiple
105 105
                     ? "{$this->aAttributes[ 'name' ]}[{$_sKey}]"
106 106
                     : $this->aAttributes[ 'name' ],
107
-                'data-id'   => $this->aAttributes[ 'id' ],       // referenced by the JavaScript scripts such as the revealer script.
107
+                'data-id'   => $this->aAttributes[ 'id' ], // referenced by the JavaScript scripts such as the revealer script.
108 108
             )
109 109
             + $this->aAttributes
110 110
             ;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 : array( 'value', $_sKey );
122 122
             return $this->getElement( $this->aAttributes, $_aValueDimension )
123 123
                 ? 'checked'
124
-                : null;    // to not to set, pass null. An empty value '' will still set the attribute.
124
+                : null; // to not to set, pass null. An empty value '' will still set the attribute.
125 125
 
126 126
         }
127 127
 
Please login to merge, or discard this patch.
development/factory/_common/form/input/AdminPageFramework_Input_select.php 2 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
          * @internal
122 122
          * @param       string      $sInputID           The input ID that will be the base of each generated option tag ID.
123 123
          * @param       array       $aLabels            The array holding labels.
124
-         * @param       array       $aAttributes        The attribute arrays. Accepts the following arguments.
124
+         * @param       array       $aBaseAttributes        The attribute arrays. Accepts the following arguments.
125 125
          * - optgroup
126 126
          * - option
127 127
          */
@@ -159,6 +159,7 @@  discard block
 block discarded – undo
159 159
             /**
160 160
              * Returns an HTML output of optgroup tag.
161 161
              * @since       3.5.3
162
+             * @param string $sInputID
162 163
              * @return      string      an HTML output of optgroup tag.
163 164
              */
164 165
             private function _getOptGroup( array $aBaseAttributes, $sInputID, $sKey, $asLabel ) {
@@ -178,6 +179,7 @@  discard block
 block discarded – undo
178 179
             /**
179 180
              *
180 181
              * @since        3.5.3
182
+             * @param string $sInputID
181 183
              */
182 184
             private function _getOptionTagAttributes( array $aBaseAttributes, $sInputID, $sKey, $aValues ) {
183 185
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
         );
69 69
 
70 70
         return
71
-            "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
72
-                . "<select " . $this->getAttributes( $this->_getSelectAttributes( $_aAttributes ) ) . " >"
71
+            "<{$this->aOptions[ 'input_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ).">"
72
+                . "<select ".$this->getAttributes( $this->_getSelectAttributes( $_aAttributes ) )." >"
73 73
                     . $this->_getDropDownList(
74 74
                         $this->getAttribute( 'id' ),
75 75
                         $this->getAsArray(
76 76
                             isset( $_aLabels )
77 77
                                 ? $_aLabels
78
-                                : $this->aField[ 'label' ],    // backward compatibility
78
+                                : $this->aField[ 'label' ], // backward compatibility
79 79
                             true
80 80
                         ),
81 81
                         $_aAttributes
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
                         ? 'multiple'
104 104
                         : null,
105 105
                     'name'      => $_bIsMultiple
106
-                        ? $this->getAttribute( 'name' ) . '[]'
106
+                        ? $this->getAttribute( 'name' ).'[]'
107 107
                         : $this->getAttribute( 'name' ),
108
-                    'data-id'   => $this->getAttribute( 'id' ),       // referenced by the JavaScript scripts such as the revealer script.
108
+                    'data-id'   => $this->getAttribute( 'id' ), // referenced by the JavaScript scripts such as the revealer script.
109 109
                 )
110 110
             );
111 111
 
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
          */
128 128
         private function _getDropDownList( $sInputID, array $aLabels, array $aBaseAttributes ) {
129 129
 
130
-            $_aOutput   = array();
131
-            foreach( $aLabels as $__sKey => $__asLabel ) {
130
+            $_aOutput = array();
131
+            foreach ( $aLabels as $__sKey => $__asLabel ) {
132 132
 
133 133
                 // For an optgroup tag,
134 134
                 if ( is_array( $__asLabel ) ) {
135
-                    $_aOutput[] = $this->_getOptGroup(
135
+                    $_aOutput[ ] = $this->_getOptGroup(
136 136
                         $aBaseAttributes,
137 137
                         $sInputID,
138 138
                         $__sKey,
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
                 }
143 143
 
144 144
                 // A normal option tag,
145
-                $_aOutput[] = $this->_getOptionTag(
146
-                    $__asLabel,   // the text label the user sees to be selected
145
+                $_aOutput[ ] = $this->_getOptionTag(
146
+                    $__asLabel, // the text label the user sees to be selected
147 147
                     $this->_getOptionTagAttributes(
148 148
                         $aBaseAttributes,
149 149
                         $sInputID,
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 $_aOptGroupAttributes = array(
170 170
                     'label' => $sKey,
171 171
                 ) + $_aOptGroupAttributes;
172
-                return "<optgroup " . $this->getAttributes( $_aOptGroupAttributes ) . ">"
172
+                return "<optgroup ".$this->getAttributes( $_aOptGroupAttributes ).">"
173 173
                         . $this->_getDropDownList( $sInputID, $asLabel, $aBaseAttributes )
174 174
                     . "</optgroup>";
175 175
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                     $aValues
188 188
                 );
189 189
                 return array(
190
-                        'id'        => $sInputID . '_' . $sKey,
190
+                        'id'        => $sInputID.'_'.$sKey,
191 191
                         'value'     => $sKey,
192 192
                         'selected'  => in_array( ( string ) $sKey, $aValues )
193 193
                             ? 'selected'
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
              * @sicne       3.4.0
204 204
              * @return      string      The generated option tag HTML output.
205 205
              */
206
-            private function _getOptionTag( $sLabel, array $aOptionTagAttributes=array() ) {
207
-                return "<option " . $this->getAttributes( $aOptionTagAttributes ) . " >"
206
+            private function _getOptionTag( $sLabel, array $aOptionTagAttributes = array() ) {
207
+                return "<option ".$this->getAttributes( $aOptionTagAttributes )." >"
208 208
                         . $sLabel
209 209
                     . "</option>";
210 210
             }
Please login to merge, or discard this patch.
development/factory/_common/utility/AdminPageFramework_ArrayHandler.php 2 patches
Doc Comments   -14 removed lines patch added patch discarded remove patch
@@ -83,12 +83,6 @@  discard block
 block discarded – undo
83 83
      * Returns the specified option value.
84 84
      *
85 85
      * @since       3.6.0
86
-     * @param       string|array        $sKey1|$aKeys       The dimensional key or keys of an array of the element to extract its value.
87
-     * If a string is set to the first parameter, the second parameter is also expected to be a string serving as a second dimensional key.
88
-     * For example, there is a multi-dimensional array, `array( 'a' => array( 'b' => 'bbb' ) )` to extract the value of the 'b' element in the second depth,
89
-     * set the parameter as follows. `get( 'a', 'b' )` or `get( array( 'a', 'b' ) );`
90
-     * @param       string|variant      $sKey2|$vDefault    The second dimensional key or the default value in case the value is not set.
91
-     * @param       string              $sKey3              The third dimensional key and so on.
92 86
      */
93 87
     public function get( /* $sKey1, $sKey2, $sKey3, ... OR $aKeys, $vDefault */ ) {
94 88
 
@@ -138,10 +132,6 @@  discard block
 block discarded – undo
138 132
      *
139 133
      * @since       3.6.0
140 134
      * @return      void
141
-     * @param       string|array        $asKeys       The key or keys of an array of the element to set its value.
142
-     * If a string is passed, it specifies the element with the set key. If an array is passed, it specifies the element with the dimensional keys.
143
-     * For example, `set( 'a', 'aaa' )` will set a value, `array( 'a' => 'aaa' )` and `set( array( 'a', 'b' ), 'bbb' )` will set `array( 'a' => array( 'b' => 'bbb' ) )`.
144
-     * @param       variant             $mValue       The value to be set.
145 135
      */
146 136
     public function set( /* $asKeys, $mValue */ ) {
147 137
 
@@ -167,10 +157,6 @@  discard block
 block discarded – undo
167 157
      * Removes an element by dimensional keys.
168 158
      * @since       3.6.0
169 159
      * @return      void
170
-     * @param       string|array        $asKeys       The key or keys of an array of the element to set its value.
171
-     * If a string is passed, it specifies the element with the set key. If an array is passed, it specifies the element with the dimensional keys.
172
-     * For example, `delete( 'a' )` will unset an element of `a` in `array( 'a' => 'some value' )` so it becomes `array()`.
173
-     * `delete( array( 'a', 'b' ) )` will unset the element of `b` in `array( 'a' => array( 'b' => 'bbb' ) )`.
174 160
      */
175 161
     public function delete( /* $sKey1, $sKey2, $sKey3 ... OR $aKeys */ ) {
176 162
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
      * @since       3.6.0
52 52
      * @var         array
53 53
      */
54
-    public $aData            = array();
54
+    public $aData = array();
55 55
 
56 56
     /**
57 57
      * Stores the default values.
58 58
      * @since       3.6.0
59 59
      * @var         array
60 60
      */
61
-    public $aDefault         = array();
61
+    public $aDefault = array();
62 62
     /**#@-*/
63 63
 
64 64
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $_aKeys     = func_get_args() + array( null );
97 97
 
98 98
         // If no key is specified, return the whole array.
99
-        if ( ! isset( $_aKeys[ 0 ] ) ) {
99
+        if ( !isset( $_aKeys[ 0 ] ) ) {
100 100
             return $this->uniteArrays(
101 101
                 $this->aData,
102 102
                 $this->aDefault
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 
112 112
         // Now either the section ID or field ID is given.
113 113
         return $this->getArrayValueByArrayKeys(
114
-            $this->aData,   // subject array
115
-            $_aKeys,        // dimensional keys
114
+            $this->aData, // subject array
115
+            $_aKeys, // dimensional keys
116 116
             $this->_getDefaultValue( // default value
117 117
                 $_mDefault,
118 118
                 $_aKeys
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function set( /* $asKeys, $mValue */ ) {
147 147
 
148
-        $_aParameters   = func_get_args();
149
-        if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
148
+        $_aParameters = func_get_args();
149
+        if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
150 150
             return;
151 151
         }
152 152
         $_asKeys        = $_aParameters[ 0 ];
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function delete( /* $sKey1, $sKey2, $sKey3 ... OR $aKeys */ ) {
176 176
 
177
-        $_aParameters   = func_get_args();
178
-        if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
177
+        $_aParameters = func_get_args();
178
+        if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
179 179
             return;
180 180
         }
181 181
         $_asKeys        = $_aParameters[ 0 ];
Please login to merge, or discard this patch.
factory/_common/utility/base_utility/AdminPageFramework_Utility_URL.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @since       2.0.0
24 24
      * @since       3.5.7       Moved from `AdminPageFramework_Utility`.
25
+     * @param string $sQueryKey
25 26
      * @return      string|null
26 27
      */
27 28
     static public function getQueryValueInURLByKey( $sURL, $sQueryKey ) {
@@ -71,6 +72,7 @@  discard block
 block discarded – undo
71 72
         /**
72 73
          * Returns the port suffix in the currently loading url.
73 74
          * @since       3.5.7
75
+         * @param boolean $_bSSL
74 76
          * @return      string
75 77
          */
76 78
         static private function _getURLPortSuffix( $_bSSL ) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             0 => '',
52 52
             1 => 's',
53 53
         );
54
-        $_sProtocol         = substr( $_sServerProtocol, 0, strpos( $_sServerProtocol, '/' ) )
54
+        $_sProtocol = substr( $_sServerProtocol, 0, strpos( $_sServerProtocol, '/' ) )
55 55
             . $_aProrocolSuffix[ ( int ) $_bSSL ];
56 56
 
57 57
         // Port: e.g. :80
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 : $_SERVER[ 'SERVER_NAME' ]
66 66
             );
67 67
 
68
-        return $_sProtocol . '://' . $_sHost . $_sPort . $_SERVER[ 'REQUEST_URI' ];
68
+        return $_sProtocol.'://'.$_sHost.$_sPort.$_SERVER[ 'REQUEST_URI' ];
69 69
 
70 70
     }
71 71
         /**
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
                 ? ( string ) $_SERVER[ 'SERVER_PORT' ]
79 79
                 : '';
80 80
             $_aPort     = array(
81
-                0 => ':' . $_sPort,
81
+                0 => ':'.$_sPort,
82 82
                 1 => '',
83 83
             );
84
-            $_bPortSet  = ( ! $_bSSL && '80' === $_sPort ) || ( $_bSSL && '443' === $_sPort );
84
+            $_bPortSet = ( !$_bSSL && '80' === $_sPort ) || ( $_bSSL && '443' === $_sPort );
85 85
             return $_aPort[ ( int ) $_bPortSet ];
86 86
         }
87 87
 
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_Hook.php 2 patches
Doc Comments   +1 added lines, -9 removed lines patch added patch discarded remove patch
@@ -88,11 +88,6 @@  discard block
 block discarded – undo
88 88
      * @access      public
89 89
      * @since       2.0.0
90 90
      * @remark      Accepts variadic parameters.
91
-     * @param       object      $oCallerObject      the object that holds the callback method that matches the action hook name.
92
-     * @param       array       $aActionHooks       a numerically index array consisting of action hook names that serve as the callback method names.
93
-     * @param       mixed       $vArgs1             the argument to pass to the hook callback functions.
94
-     * @param       mixed       $vArgs2             another argument to pass to the hook callback functions.
95
-     * @param       mixed       $_and_more          add as many arguments as necessary to the next parameters.
96 91
      * @return      void
97 92
      */
98 93
     static public function addAndDoActions( /* $oCallerObject, $aActionHooks, $vArgs1=null, $vArgs2=null, $_and_more=null */ ) {
@@ -191,10 +186,6 @@  discard block
 block discarded – undo
191 186
      * `
192 187
      *
193 188
      * @since       2.0.0
194
-     * @param       object      $oCallerObject
195
-     * @param       string      $sFilter            The filter hook name.
196
-     * @param       mixed       $vData              The filtering data
197
-     * @param       mixed       $vArgs              The arguments.
198 189
      */
199 190
     static public function addAndApplyFilter( /* $oCallerObject, $sFilter, $vData, $vArgs... */ ) {
200 191
 
@@ -232,6 +223,7 @@  discard block
 block discarded – undo
232 223
      *
233 224
      * @since       2.0.0
234 225
      * @access      public
226
+     * @param string $sPrefix
235 227
      * @return      array       Returns an array consisting of the filters.
236 228
      */
237 229
     static public function getFilterArrayByPrefix( $sPrefix, $sClassName, $sPageSlug, $sTabSlug, $bReverse=false ) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @since       3.4.2
26 26
      * @todo        Create a similar function for filters.
27 27
      */
28
-    static public function registerAction( $sActionHook, $oCallable, $iPriority=10 ) {
28
+    static public function registerAction( $sActionHook, $oCallable, $iPriority = 10 ) {
29 29
 
30 30
         if ( did_action( $sActionHook ) ) {
31 31
             return call_user_func_array( $oCallable, array() );
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
      * @param       mixed       $_and_more      add as many arguments as necessary to the next parameters.
63 63
      * @return      void        does not return a value.
64 64
      */
65
-    static public function doActions( $aActionHooks, $vArgs1=null, $vArgs2=null, $_and_more=null ) {
65
+    static public function doActions( $aActionHooks, $vArgs1 = null, $vArgs2 = null, $_and_more = null ) {
66 66
 
67 67
         $aArgs          = func_get_args();
68 68
         $aActionHooks   = $aArgs[ 0 ];
69
-        foreach( ( array ) $aActionHooks as $sActionHook  ) {
69
+        foreach ( ( array ) $aActionHooks as $sActionHook ) {
70 70
             $aArgs[ 0 ] = $sActionHook;
71
-            call_user_func_array( 'do_action' , $aArgs );
71
+            call_user_func_array( 'do_action', $aArgs );
72 72
         }
73 73
 
74 74
     }
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
         $aArgs          = func_get_args();
101 101
         $oCallerObject  = $aArgs[ 0 ];
102 102
         $aActionHooks   = $aArgs[ 1 ];
103
-        foreach( ( array ) $aActionHooks as $sActionHook ) {
104
-            if ( ! $sActionHook ) {
103
+        foreach ( ( array ) $aActionHooks as $sActionHook ) {
104
+            if ( !$sActionHook ) {
105 105
                 continue;
106 106
             }
107 107
             $aArgs[ 1 ] = $sActionHook;
108
-            call_user_func_array( array( get_class(), 'addAndDoAction' ) , $aArgs );
108
+            call_user_func_array( array( get_class(), 'addAndDoAction' ), $aArgs );
109 109
         }
110 110
 
111 111
     }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $_aArgs          = func_get_args();
125 125
         $_oCallerObject  = $_aArgs[ 0 ];
126 126
         $_sActionHook    = $_aArgs[ 1 ];
127
-        if ( ! $_sActionHook ) {
127
+        if ( !$_sActionHook ) {
128 128
             return;
129 129
         }
130 130
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         // Remove the first element, the caller object.
138 138
         array_shift( $_aArgs );
139
-        call_user_func_array( 'do_action' , $_aArgs );
139
+        call_user_func_array( 'do_action', $_aArgs );
140 140
 
141 141
     }
142 142
 
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
         $_aFilters      = $_aArgs[ 1 ];
165 165
         $_vInput        = $_aArgs[ 2 ];
166 166
 
167
-        foreach( ( array ) $_aFilters as $_sFilter ) {
168
-            if ( ! $_sFilter ) {
167
+        foreach ( ( array ) $_aFilters as $_sFilter ) {
168
+            if ( !$_sFilter ) {
169 169
                 continue;
170 170
             }
171 171
             $_aArgs[ 1 ] = $_sFilter;
172
-            $_aArgs[ 2 ] = $_vInput;    // assigns the updated value as it is filtered in previous iterations
172
+            $_aArgs[ 2 ] = $_vInput; // assigns the updated value as it is filtered in previous iterations
173 173
             $_vInput = call_user_func_array(
174 174
                 array( get_class(), 'addAndApplyFilter' ),
175 175
                 $_aArgs
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $_aArgs          = func_get_args();
204 204
         $_oCallerObject  = $_aArgs[ 0 ];
205 205
         $_sFilter        = $_aArgs[ 1 ];
206
-        if ( ! $_sFilter ) {
206
+        if ( !$_sFilter ) {
207 207
             return $_aArgs[ 2 ];
208 208
         }
209 209
 
@@ -234,17 +234,17 @@  discard block
 block discarded – undo
234 234
      * @access      public
235 235
      * @return      array       Returns an array consisting of the filters.
236 236
      */
237
-    static public function getFilterArrayByPrefix( $sPrefix, $sClassName, $sPageSlug, $sTabSlug, $bReverse=false ) {
237
+    static public function getFilterArrayByPrefix( $sPrefix, $sClassName, $sPageSlug, $sTabSlug, $bReverse = false ) {
238 238
 
239 239
         $_aFilters = array();
240 240
         if ( $sTabSlug && $sPageSlug ) {
241
-            $_aFilters[] = "{$sPrefix}{$sPageSlug}_{$sTabSlug}";
241
+            $_aFilters[ ] = "{$sPrefix}{$sPageSlug}_{$sTabSlug}";
242 242
         }
243 243
         if ( $sPageSlug ) {
244
-            $_aFilters[] = "{$sPrefix}{$sPageSlug}";
244
+            $_aFilters[ ] = "{$sPrefix}{$sPageSlug}";
245 245
         }
246 246
         if ( $sClassName ) {
247
-            $_aFilters[] = "{$sPrefix}{$sClassName}";
247
+            $_aFilters[ ] = "{$sPrefix}{$sClassName}";
248 248
         }
249 249
         return $bReverse
250 250
             ? array_reverse( $_aFilters )
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Import.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -142,6 +142,7 @@  discard block
 block discarded – undo
142 142
                 /**
143 143
                  * Sets update admin notice.
144 144
                  * @since       3.5.3
145
+                 * @param boolean $bEmpty
145 146
                  * @return      void
146 147
                  */
147 148
                 private function _setImportAdminNotice( $bEmpty ) {
@@ -209,6 +210,8 @@  discard block
 block discarded – undo
209 210
                  * @since       3.5.3
210 211
                  * @since       3.6.3       Moved from `AdminPageFramework_Form_Model_Import`.
211 212
                  * @internal
213
+                 * @param string $sFormatType
214
+                 * @param string $sImportOptionKey
212 215
                  * @return      string      The filtered import data.
213 216
                  */
214 217
                 private function _getFilteredImportData( array $aArguments, $mData, $aStoredOptions, $sFormatType, $sImportOptionKey ) {
@@ -237,6 +240,7 @@  discard block
 block discarded – undo
237 240
      * @param       string      The filter prefix.
238 241
      * @param       mixed       The subject filtering value.
239 242
      * @param       array       An argument array holding submit information. Part of this will be passed to the filter callbacks but this itself does not mean is for the filter callbacks.
243
+     * @param string $sPrefix
240 244
      */
241 245
     protected function _getFilteredItemForPortByPrefix( $sPrefix, $mFilteringValue, array $aArguments ) {
242 246
         return $this->addAndApplyFilters(
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @callback    action      try_validation_after_{class name}
32 32
      */
33 33
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
34
-        if ( ! $this->_shouldProceed() ) {
34
+        if ( !$this->_shouldProceed() ) {
35 35
             return;
36 36
         }
37 37
         $this->_doImportOptions(
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
                 // Check the uploaded file MIME type.
102 102
                 $_aMIMEType = $this->_getImportMIMEType( $_aArguments );
103 103
                 $_sType     = $_oImport->getType();
104
-                if ( ! in_array( $_sType, $_aMIMEType ) ) {
104
+                if ( !in_array( $_sType, $_aMIMEType ) ) {
105 105
                     $this->oFactory->setSettingNotice( sprintf( $this->oFactory->oMsg->get( 'uploaded_file_type_not_supported' ), $_sType ) );
106
-                    return $aStoredOptions;        // do not change the framework's options.
106
+                    return $aStoredOptions; // do not change the framework's options.
107 107
                 }
108 108
 
109 109
                 // Retrieve the importing data.
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
                         array(
169 169
                             'text/plain',
170 170
                             'application/octet-stream', // .json file is dealt as a binary file.
171
-                            'application/json',         // 3.7.0+ some servers cannot upload json files without this
172
-                            'text/html',                // 3.7.2+
173
-                            'application/txt',          // 3.7.2+
171
+                            'application/json', // 3.7.0+ some servers cannot upload json files without this
172
+                            'text/html', // 3.7.2+
173
+                            'application/txt', // 3.7.2+
174 174
                         ),
175 175
                         $aArguments
176 176
                     );
@@ -259,18 +259,18 @@  discard block
 block discarded – undo
259 259
     protected function _getPortFilterHookNames( $sPrefix, array $aArguments ) {
260 260
 
261 261
         return array(
262
-            $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'pressed_input_id' ],
262
+            $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'pressed_input_id' ],
263 263
             $aArguments[ 'section_id' ]
264
-                ? $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'section_id' ] .'_' . $aArguments[ 'pressed_field_id' ]
265
-                : $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'pressed_field_id' ],
264
+                ? $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'section_id' ].'_'.$aArguments[ 'pressed_field_id' ]
265
+                : $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'pressed_field_id' ],
266 266
             $aArguments[ 'section_id' ]
267
-                ? $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'section_id' ]
267
+                ? $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'section_id' ]
268 268
                 : null,
269 269
             $aArguments[ 'tab_slug' ]
270
-                ? $sPrefix . $aArguments[ 'page_slug' ] . '_' . $aArguments[ 'tab_slug' ]
270
+                ? $sPrefix.$aArguments[ 'page_slug' ].'_'.$aArguments[ 'tab_slug' ]
271 271
                 : null,
272
-            $sPrefix . $aArguments[ 'page_slug' ],
273
-            $sPrefix . $aArguments[ 'class_name' ]
272
+            $sPrefix.$aArguments[ 'page_slug' ],
273
+            $sPrefix.$aArguments[ 'class_name' ]
274 274
         );
275 275
 
276 276
     }
Please login to merge, or discard this patch.