Completed
Branch master (7ff82b)
by
unknown
01:54
created
factory/_common/form/field_type/AdminPageFramework_FieldType_submit.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -337,8 +337,8 @@
 block discarded – undo
337 337
                 ) + $_aAttributes
338 338
             );
339 339
             return "<p class='submit-confirm-container'><label>"
340
-                   . $_sInput
341
-                   . "<span>{$_aConfirm[ 'label' ]}</span>"
340
+                    . $_sInput
341
+                    . "<span>{$_aConfirm[ 'label' ]}</span>"
342 342
                 . "</label></p>";
343 343
         }
344 344
 
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * Defines the field type slugs used for this field type.
193 193
      */
194
-    public $aFieldTypeSlugs = array( 'submit', );
194
+    public $aFieldTypeSlugs = array( 'submit',);
195 195
     
196 196
     /**
197 197
      * Defines the default key-values of this field type. 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         'redirect_url'  => null,
203 203
         'href'          => null,
204 204
         'reset'         => null, 
205
-        'email'         => null,    // [3.3.0+] string of an email address to send to or it can be an array with the following keys.
205
+        'email'         => null, // [3.3.0+] string of an email address to send to or it can be an array with the following keys.
206 206
         'confirm'       => '',
207 207
         /* 
208 208
             array(
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                 'attachments'   => null,    // string|array     The file path(s) or an array representing the key structure of the submitted form data holding the value. The first key should be the section ID and the second key is the the field ID.
214 214
             )
215 215
         */
216
-        'skip_confirmation' => false,   // 3.7.6+ For emails.
216
+        'skip_confirmation' => false, // 3.7.6+ For emails.
217 217
         'attributes'    => array(
218 218
             'class' => 'button button-primary',
219 219
         ),    
@@ -294,17 +294,17 @@  discard block
 block discarded – undo
294 294
 
295 295
         return 
296 296
             $aField[ 'before_label' ]
297
-            . "<div " . $this->getAttributes( $_aLabelContainerAttributes ) . ">"
297
+            . "<div ".$this->getAttributes( $_aLabelContainerAttributes ).">"
298 298
                 . $this->_getExtraFieldsBeforeLabel( $aField ) // this is for the import field type that cannot place file input tag inside the label tag.
299
-                . "<label " . $this->getAttributes( $_aLabelAttributes ) . ">"
299
+                . "<label ".$this->getAttributes( $_aLabelAttributes ).">"
300 300
                     . $aField[ 'before_input' ]
301 301
                     . $this->_getExtraInputFields( $aField )
302
-                    . "<input " . $this->getAttributes( $_aInputAttributes ) . " />" // this method is defined in the base class
302
+                    . "<input ".$this->getAttributes( $_aInputAttributes )." />" // this method is defined in the base class
303 303
                     . $aField[ 'after_input' ]
304 304
                 . "</label>"
305 305
                 . $this->___getConfirmationCheckbox( $aField )
306 306
             . "</div>"
307
-            . $aField['after_label'];
307
+            . $aField[ 'after_label' ];
308 308
         
309 309
     }
310 310
         /**
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
             if ( empty( $aField[ 'confirm' ] ) ) {
317 317
                 return '';
318 318
             }
319
-            $_aConfirm    = is_string( $aField[ 'confirm' ] )
319
+            $_aConfirm = is_string( $aField[ 'confirm' ] )
320 320
                 ? array(
321 321
                     'label' => $aField[ 'confirm' ]
322 322
                 )
323 323
                 : $this->getAsArray( $aField[ 'confirm' ] );
324
-            $_aConfirm    = $_aConfirm + array(
324
+            $_aConfirm = $_aConfirm + array(
325 325
                 'label' => $this->oMsg->get( 'submit_confirmation_label' ),
326 326
                 'error' => $this->oMsg->get( 'submit_confirmation_error' ),
327 327
             );
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         private function _getLabelAttributes( array $aField, array $aInputAttributes ) {
373 373
             return array(
374 374
                 'style' => $aField[ 'label_min_width' ] 
375
-                    ? "min-width:" . $this->getLengthSanitized( $aField[ 'label_min_width' ] ) . ";" 
375
+                    ? "min-width:".$this->getLengthSanitized( $aField[ 'label_min_width' ] ).";" 
376 376
                     : null,
377 377
                 'for'   => $aInputAttributes[ 'id' ],
378 378
                 'class' => $aInputAttributes[ 'disabled' ] 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         private function _getLabelContainerAttributes( array $aField ) {           
392 392
             return array(
393 393
                 'style' => $aField[ 'label_min_width' ] || '0' === ( string ) $aField[ 'label_min_width' ]
394
-                    ? "min-width:" . $this->getLengthSanitized( $aField[ 'label_min_width' ] ) . ";" 
394
+                    ? "min-width:".$this->getLengthSanitized( $aField[ 'label_min_width' ] ).";" 
395 395
                     : null,
396 396
                 'class' => 'admin-page-framework-input-label-container'
397 397
                     . ' admin-page-framework-input-button-container'
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     protected function _getExtraInputFields( &$aField ) {
446 446
         
447 447
         $_aOutput   = array();
448
-        $_aOutput[] = $this->getHTMLTag( 
448
+        $_aOutput[ ] = $this->getHTMLTag( 
449 449
             'input',
450 450
             array(
451 451
                 'type'  => 'hidden',
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 'value' => $aField[ 'input_id' ],
454 454
             )
455 455
         );
456
-        $_aOutput[] = $this->getHTMLTag( 
456
+        $_aOutput[ ] = $this->getHTMLTag( 
457 457
             'input',
458 458
             array(
459 459
                 'type'  => 'hidden',
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
                 'value' => $aField[ 'field_id' ],
462 462
             ) 
463 463
         );            
464
-        $_aOutput[] = $this->getHTMLTag( 
464
+        $_aOutput[ ] = $this->getHTMLTag( 
465 465
             'input',
466 466
             array(
467 467
                 'type'  => 'hidden',
@@ -469,11 +469,11 @@  discard block
 block discarded – undo
469 469
                 'value' => $aField[ '_input_name_flat' ],
470 470
             ) 
471 471
         );         
472
-        $_aOutput[] = $this->_getHiddenInput_SectionID( $aField );
473
-        $_aOutput[] = $this->_getHiddenInputByKey( $aField, 'redirect_url' );       
474
-        $_aOutput[] = $this->_getHiddenInputByKey( $aField, 'href' );       
475
-        $_aOutput[] = $this->_getHiddenInput_Reset( $aField );
476
-        $_aOutput[] = $this->_getHiddenInput_Email( $aField );
472
+        $_aOutput[ ] = $this->_getHiddenInput_SectionID( $aField );
473
+        $_aOutput[ ] = $this->_getHiddenInputByKey( $aField, 'redirect_url' );       
474
+        $_aOutput[ ] = $this->_getHiddenInputByKey( $aField, 'href' );       
475
+        $_aOutput[ ] = $this->_getHiddenInput_Reset( $aField );
476
+        $_aOutput[ ] = $this->_getHiddenInput_Email( $aField );
477 477
         return implode( PHP_EOL, array_filter( $_aOutput ) );  
478 478
         
479 479
     }
@@ -490,9 +490,9 @@  discard block
 block discarded – undo
490 490
                 'input',
491 491
                 array(
492 492
                     'type'  => 'hidden',
493
-                    'name'  => "__submit[{$aField['input_id']}][section_id]",
494
-                    'value' => isset( $aField['section_id'] ) && '_default' !== $aField['section_id'] 
495
-                        ? $aField['section_id'] 
493
+                    'name'  => "__submit[{$aField[ 'input_id' ]}][section_id]",
494
+                    'value' => isset( $aField[ 'section_id' ] ) && '_default' !== $aField[ 'section_id' ] 
495
+                        ? $aField[ 'section_id' ] 
496 496
                         : '',
497 497
                 ) 
498 498
             );                  
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
                     'input',
513 513
                     array(
514 514
                         'type'  => 'hidden',
515
-                        'name'  => "__submit[{$aField['input_id']}][{$sKey}]",
515
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][{$sKey}]",
516 516
                         'value' => $aField[ $sKey ],
517 517
                     ) 
518 518
                 )
@@ -527,15 +527,15 @@  discard block
 block discarded – undo
527 527
          * @return      string      the HTML input tag output for the 'reset' argument.
528 528
          */        
529 529
         private function _getHiddenInput_Reset( array $aField ) {
530
-            if ( ! $aField[ 'reset' ] ) {
530
+            if ( !$aField[ 'reset' ] ) {
531 531
                 return '';
532 532
             }
533
-            return ! $this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'reset' )
533
+            return !$this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'reset' )
534 534
                 ? $this->getHTMLTag( 
535 535
                     'input',
536 536
                     array(
537 537
                         'type'  => 'hidden',
538
-                        'name'  => "__submit[{$aField['input_id']}][is_reset]",
538
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][is_reset]",
539 539
                         'value' => '1',
540 540
                     ) 
541 541
                 )
@@ -564,10 +564,10 @@  discard block
 block discarded – undo
564 564
                 return '';
565 565
             }
566 566
             $this->setTransient( 
567
-                'apf_em_' . md5( $aField[ '_input_name_flat' ] . get_current_user_id() ), 
567
+                'apf_em_'.md5( $aField[ '_input_name_flat' ].get_current_user_id() ), 
568 568
                 $aField[ 'email' ] 
569 569
             );
570
-            return ! $this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'email' )
570
+            return !$this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'email' )
571 571
                 ? $this->getHTMLTag( 
572 572
                     'input',
573 573
                     array(
@@ -595,19 +595,19 @@  discard block
 block discarded – undo
595 595
          * @return      boolean
596 596
          * @internal
597 597
          */
598
-        private function _checkConfirmationDisplayed( $aField, $sFlatFieldName, $sType='reset' ) {
598
+        private function _checkConfirmationDisplayed( $aField, $sFlatFieldName, $sType = 'reset' ) {
599 599
                             
600
-            switch( $sType ) {
600
+            switch ( $sType ) {
601 601
                 default:
602 602
                 case 'reset':       // admin page framework _ reset confirmation
603
-                    $_sTransientKey = 'apf_rc_' . md5( $sFlatFieldName . get_current_user_id() );
603
+                    $_sTransientKey = 'apf_rc_'.md5( $sFlatFieldName.get_current_user_id() );
604 604
                     break;
605 605
                 case 'email':       // admin page framework _ email confirmation
606
-                    $_sTransientKey = 'apf_ec_' . md5( $sFlatFieldName . get_current_user_id() );   
606
+                    $_sTransientKey = 'apf_ec_'.md5( $sFlatFieldName.get_current_user_id() );   
607 607
                     break;
608 608
             }
609 609
             
610
-            $_bConfirmed = false === $this->getTransient( $_sTransientKey ) && ! $aField[ 'skip_confirmation' ]
610
+            $_bConfirmed = false === $this->getTransient( $_sTransientKey ) && !$aField[ 'skip_confirmation' ]
611 611
                 ? false
612 612
                 : true;
613 613
             
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
          * @return      array   The label container attribute array.
389 389
          * @internal
390 390
          */        
391
-        private function _getLabelContainerAttributes( array $aField ) {           
391
+        private function _getLabelContainerAttributes( array $aField ) {
392 392
             return array(
393 393
                 'style' => $aField[ 'label_min_width' ] || '0' === ( string ) $aField[ 'label_min_width' ]
394 394
                     ? "min-width:" . $this->getLengthSanitized( $aField[ 'label_min_width' ] ) . ";" 
@@ -636,19 +636,19 @@  discard block
 block discarded – undo
636 636
      * @internal
637 637
      * @param       array   $aField
638 638
      */ 
639
-    protected function _getInputFieldValueFromLabel( $aField ) {    
639
+    protected function _getInputFieldValueFromLabel( $aField ) {
640 640
         
641 641
         // If the value key is explicitly set, use it. But the empty string will be ignored.
642
-        if ( isset( $aField[ 'value' ] ) && $aField[ 'value' ] != '' ) { 
642
+        if ( isset( $aField[ 'value' ] ) && $aField[ 'value' ] != '' ) {
643 643
             return $aField[ 'value' ]; 
644 644
         }
645 645
         
646
-        if ( isset( $aField[ 'label' ] ) ) { 
646
+        if ( isset( $aField[ 'label' ] ) ) {
647 647
             return $aField[ 'label' ]; 
648 648
         }
649 649
         
650 650
         // If the default value is set,
651
-        if ( isset( $aField[ 'default' ] ) ) { 
651
+        if ( isset( $aField[ 'default' ] ) ) {
652 652
             return $aField[ 'default' ]; 
653 653
         }
654 654
         
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_import.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * Defines the field type slugs used for this field type.
42 42
      */
43
-    public $aFieldTypeSlugs = array( 'import', );
43
+    public $aFieldTypeSlugs = array( 'import',);
44 44
 
45 45
     /**
46 46
      * Defines the default key-values of this field type.
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @return      string
135 135
      */
136 136
     protected function getField( $aField ) {
137
-        $aField[ 'attributes'][ 'name' ]  = "__import[submit][{$aField[ 'input_id' ]}]";
137
+        $aField[ 'attributes' ][ 'name' ]  = "__import[submit][{$aField[ 'input_id' ]}]";
138 138
         $aField[ 'label' ]                = $aField[ 'label' ]
139 139
             ? $aField[ 'label' ]
140 140
             : $this->oMsg->get( 'import' );
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
      */
154 154
     protected function _getExtraFieldsBeforeLabel( &$aField ) {
155 155
         return "<label>"
156
-                . "<input " . $this->getAttributes(
156
+                . "<input ".$this->getAttributes(
157 157
                     array(
158 158
                         'id' => "{$aField[ 'input_id' ]}_file",
159 159
                         'type' => 'file',
160 160
                         'name' => "__import[{$aField[ 'input_id' ]}]",
161 161
                     ) + $aField[ 'attributes' ][ 'file' ]
162
-                ) . " />"
162
+                )." />"
163 163
             . "</label>";
164 164
     }
165 165
 
@@ -172,44 +172,44 @@  discard block
 block discarded – undo
172 172
      */
173 173
     protected function _getExtraInputFields( &$aField ) {
174 174
 
175
-        $aHiddenAttributes = array( 'type' => 'hidden', );
175
+        $aHiddenAttributes = array( 'type' => 'hidden',);
176 176
         return
177
-            "<input " . $this->getAttributes(
177
+            "<input ".$this->getAttributes(
178 178
                 array(
179
-                    'name' => "__import[{$aField['input_id']}][input_id]",
180
-                    'value' => $aField['input_id'],
179
+                    'name' => "__import[{$aField[ 'input_id' ]}][input_id]",
180
+                    'value' => $aField[ 'input_id' ],
181 181
                 ) + $aHiddenAttributes
182
-            ) . "/>"
183
-            . "<input " . $this->getAttributes(
182
+            )."/>"
183
+            . "<input ".$this->getAttributes(
184 184
                 array(
185
-                    'name' => "__import[{$aField['input_id']}][field_id]",
186
-                    'value' => $aField['field_id'],
185
+                    'name' => "__import[{$aField[ 'input_id' ]}][field_id]",
186
+                    'value' => $aField[ 'field_id' ],
187 187
                 ) + $aHiddenAttributes
188
-            ) . "/>"
189
-            . "<input " . $this->getAttributes(
188
+            )."/>"
189
+            . "<input ".$this->getAttributes(
190 190
                 array(
191
-                    'name' => "__import[{$aField['input_id']}][section_id]",
192
-                    'value' => isset( $aField['section_id'] ) && $aField['section_id'] != '_default' ? $aField['section_id'] : '',
191
+                    'name' => "__import[{$aField[ 'input_id' ]}][section_id]",
192
+                    'value' => isset( $aField[ 'section_id' ] ) && $aField[ 'section_id' ] != '_default' ? $aField[ 'section_id' ] : '',
193 193
                 ) + $aHiddenAttributes
194
-            ) . "/>"
195
-            . "<input " . $this->getAttributes(
194
+            )."/>"
195
+            . "<input ".$this->getAttributes(
196 196
                 array(
197
-                    'name' => "__import[{$aField['input_id']}][is_merge]",
198
-                    'value' => $aField['is_merge'],
197
+                    'name' => "__import[{$aField[ 'input_id' ]}][is_merge]",
198
+                    'value' => $aField[ 'is_merge' ],
199 199
                 ) + $aHiddenAttributes
200
-            ) . "/>"
201
-            . "<input " . $this->getAttributes(
200
+            )."/>"
201
+            . "<input ".$this->getAttributes(
202 202
                 array(
203
-                    'name' => "__import[{$aField['input_id']}][option_key]",
204
-                    'value' => $aField['option_key'],
203
+                    'name' => "__import[{$aField[ 'input_id' ]}][option_key]",
204
+                    'value' => $aField[ 'option_key' ],
205 205
                 ) + $aHiddenAttributes
206
-            ) . "/>"
207
-            . "<input " . $this->getAttributes(
206
+            )."/>"
207
+            . "<input ".$this->getAttributes(
208 208
                 array(
209
-                    'name' => "__import[{$aField['input_id']}][format]",
210
-                    'value' => $aField['format'],
209
+                    'name' => "__import[{$aField[ 'input_id' ]}][format]",
210
+                    'value' => $aField[ 'format' ],
211 211
                 ) + $aHiddenAttributes
212
-            ) . "/>"
212
+            )."/>"
213 213
             ;
214 214
     }
215 215
 
Please login to merge, or discard this patch.
form/_model/modifier/AdminPageFramework_Form_Model___Modifier_SortInput.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function get() {
43 43
 
44
-        foreach( $this->_getFormattedDimensionalKeys( $this->aFieldAddresses ) as $_sFlatFieldAddress ) {
44
+        foreach ( $this->_getFormattedDimensionalKeys( $this->aFieldAddresses ) as $_sFlatFieldAddress ) {
45 45
 
46 46
             $_aDimensionalKeys = explode( '|', $_sFlatFieldAddress );
47 47
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
             // If the retrieved value does not exist, null will be given.
54 54
             // This occurs with page meta boxes.
55
-            if ( ! is_array( $_aDynamicElements ) ) {
55
+            if ( !is_array( $_aDynamicElements ) ) {
56 56
                 continue;
57 57
             }
58 58
 
Please login to merge, or discard this patch.
development/factory/_common/_abstract/_model/AdminPageFramework_Message.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         'confirm_perform_task'                  => 'Please confirm your action.',
82 82
         'specified_option_been_deleted'         => 'The specified options have been deleted.',
83 83
         'nonce_verification_failed'             => 'A problem occurred while processing the form data. Please try again.',
84
-        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s',  // 3.5.11+
85
-        'send_email'                            => 'Is it okay to send the email?',     // 3.3.0+
86
-        'email_sent'                            => 'The email has been sent.',  // 3.3.0+, 3.3.5+ deprecated
84
+        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+
85
+        'send_email'                            => 'Is it okay to send the email?', // 3.3.0+
86
+        'email_sent'                            => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated
87 87
         'email_scheduled'                       => 'The email has been scheduled.', // 3.3.5+
88
-        'email_could_not_send'                  => 'There was a problem sending the email',     // 3.3.0+
88
+        'email_could_not_send'                  => 'There was a problem sending the email', // 3.3.0+
89 89
 
90 90
         // AdminPageFramework_PostType
91 91
         'title'                                 => 'Title',
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
         'upload_file'                           => 'Upload File',
113 113
         'use_this_file'                         => 'Use This File',
114 114
         'select_file'                           => 'Select File',
115
-        'remove_value'                          => 'Remove Value',  // 3.2.0+
116
-        'select_all'                            => 'Select All',    // 3.3.0+
117
-        'select_none'                           => 'Select None',   // 3.3.0+
115
+        'remove_value'                          => 'Remove Value', // 3.2.0+
116
+        'select_all'                            => 'Select All', // 3.3.0+
117
+        'select_none'                           => 'Select None', // 3.3.0+
118 118
         'no_term_found'                         => 'No term found.', // 3.3.2+
119 119
 
120 120
         // AdminPageFramework_Form_View___Script_{...}
121 121
         'select'                                => 'Select', // 3.4.2+
122
-        'insert'                                => 'Insert',  // 3.4.2+
122
+        'insert'                                => 'Insert', // 3.4.2+
123 123
         'use_this'                              => 'Use This', // 3.4.2+
124 124
         'return_to_library'                     => 'Return to Library', // 3.4.2+
125 125
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 
132 132
         // Repeatable sections & fields
133 133
         'repeatable_section_is_disabled'        => 'The ability to repeat sections is disabled.', // 3.8.13+
134
-        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.',   // 3.8.13+
135
-        'warning_caption'                       => 'Warning',   // 3.8.13+
134
+        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.', // 3.8.13+
135
+        'warning_caption'                       => 'Warning', // 3.8.13+
136 136
 
137 137
         // AdminPageFramework_FormField
138 138
         'allowed_maximum_number_of_fields'      => 'The allowed maximum number of fields is {0}.',
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      * @remark      This class should be instantiated via this method.
215 215
      * @return      AdminPageFramework_Message
216 216
      */
217
-    public static function getInstance( $sTextDomain='admin-page-framework' ) {
217
+    public static function getInstance( $sTextDomain = 'admin-page-framework' ) {
218 218
 
219 219
         $_oInstance = isset( self::$_aInstancesByTextDomain[ $sTextDomain ] ) && ( self::$_aInstancesByTextDomain[ $sTextDomain ] instanceof AdminPageFramework_Message )
220 220
             ? self::$_aInstancesByTextDomain[ $sTextDomain ]
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
          * Ensures that only one instance of this class object exists. ( no multiple instances of this object )
228 228
          * @deprecated  3.2.0
229 229
          */
230
-        public static function instantiate( $sTextDomain='admin-page-framework' ) {
230
+        public static function instantiate( $sTextDomain = 'admin-page-framework' ) {
231 231
             return self::getInstance( $sTextDomain );
232 232
         }
233 233
 
@@ -235,14 +235,14 @@  discard block
 block discarded – undo
235 235
      * Sets up properties.
236 236
      * @param string $sTextDomain
237 237
      */
238
-    public function __construct( $sTextDomain='admin-page-framework' ) {
238
+    public function __construct( $sTextDomain = 'admin-page-framework' ) {
239 239
 
240 240
         $this->_sTextDomain = $sTextDomain;
241 241
 
242 242
         // Fill the $aMessages property with the keys extracted from the $aDefaults property
243 243
         // with the value of null.  The null is set to let it trigger the __get() method
244 244
         // so that each translation item gets processed individually.
245
-        $this->aMessages    = array_fill_keys(
245
+        $this->aMessages = array_fill_keys(
246 246
             array_keys( $this->aDefaults ),
247 247
             null
248 248
         );
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
      * @param       string       $sKey
278 278
      * @return      string|array
279 279
      */
280
-    public function get( $sKey='' ) {
281
-        if ( ! $sKey ) {
280
+    public function get( $sKey = '' ) {
281
+        if ( !$sKey ) {
282 282
             return $this->_getAllMessages();
283 283
         }
284 284
         return isset( $this->aMessages[ $sKey ] )
285 285
             ? __( $this->aMessages[ $sKey ], $this->_sTextDomain )
286
-            : __( $this->{$sKey}, $this->_sTextDomain );     // triggers __get()
286
+            : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get()
287 287
     }
288 288
         /**
289 289
          * Returns the all registered messag items.
Please login to merge, or discard this patch.
_model/delegate/AdminPageFramework_Model__FormRedirectHandler.php 1 patch
Spacing   +6 added lines, -6 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      3.7.0
@@ -52,17 +52,17 @@  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 60
         $_sPageSlug  = sanitize_text_field( $_GET[ 'page' ] );
61
-        $_sTransient = 'apf_rurl' . md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_sPageSlug}" ) );
61
+        $_sTransient = 'apf_rurl'.md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_sPageSlug}" ) );
62 62
 
63 63
         // Check the settings error transient.
64 64
         $_aError = $this->oFactory->getFieldErrors();
65
-        if ( ! empty( $_aError ) ) {
65
+        if ( !empty( $_aError ) ) {
66 66
             $this->deleteTransient( $_sTransient ); // we don't need it any more.
67 67
             return;
68 68
         }
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
         private function _shouldProceed() {
90 90
 
91 91
             // Check if it's one of the plugin's added page. If not, do nothing.
92
-            if ( ! $this->oFactory->isInThePage() ) {
92
+            if ( !$this->oFactory->isInThePage() ) {
93 93
                 return false;
94 94
             }
95 95
 
96 96
             // If the settings have not updated the options, do nothing.
97
-            if ( ! $this->getElement( $_GET, 'settings-updated', false ) ) {
97
+            if ( !$this->getElement( $_GET, 'settings-updated', false ) ) {
98 98
                 return false;
99 99
             }
100 100
 
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
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
      * @since 3.5.4       Added the `$aHeader` parameter. Deprecated the `$sFileName` parameter as it is included in the $aHeader definition.
100 100
      * @since 2.0.0
101 101
      */
102
-    public function doExport( $vData, $sFormatType=null, array $aHeader=array() ) {
102
+    public function doExport( $vData, $sFormatType = null, array $aHeader = array() ) {
103 103
 
104
-        $sFormatType    = isset( $sFormatType )
104
+        $sFormatType = isset( $sFormatType )
105 105
             ? $sFormatType
106 106
             : $this->sFormatType;
107 107
 
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
          * @param       string $sKey
130 130
          * @return      void
131 131
          */
132
-        private function _outputHTTPHeader( array $aHeader, $sKey='' ) {
132
+        private function _outputHTTPHeader( array $aHeader, $sKey = '' ) {
133 133
 
134
-            foreach( $aHeader as $_sKey => $_asValue ) {
134
+            foreach ( $aHeader as $_sKey => $_asValue ) {
135 135
 
136 136
                 // Nested items. Set the key to overrider array keys.
137 137
                 if ( is_array( $_asValue ) ) {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     return;
174 174
                 case 'json': // for json.
175 175
                     echo json_encode( ( array ) $vData );
176
-                    return ;
176
+                    return;
177 177
                 case 'array': // for serialized PHP array.
178 178
                 default: // for anything else,
179 179
                     echo serialize( ( array ) $vData );
Please login to merge, or discard this patch.