Completed
Branch dev (43e9e0)
by
unknown
06:03
created
generator/section/AdminPageFramework_Form_View___Generate_Section_Base.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -51,6 +51,7 @@
 block discarded – undo
51 51
     /**
52 52
      * Applies the subject string to the set callback filter function.
53 53
      * @since       3.6.0
54
+     * @param string $sSubject
54 55
      */
55 56
     protected function _getFiltered( $sSubject ) {
56 57
         return is_callable( $this->hfCallback )
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $this->hfCallback,
36 36
         );
37 37
         $this->aArguments = $_aParameters[ 0 ];        
38
-        $this->hfCallback  = $_aParameters[ 1 ];
38
+        $this->hfCallback = $_aParameters[ 1 ];
39 39
 
40 40
     }    
41 41
     
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
         
84 84
         // Extract the first part as it does not have braces
85 85
         $_sName = array_shift( $aParts );
86
-        foreach( $aParts as $_sPart ) {
87
-            $_sName .= '[' . $_sPart . ']';
86
+        foreach ( $aParts as $_sPart ) {
87
+            $_sName .= '['.$_sPart.']';
88 88
         }
89 89
         return $_sName;
90 90
         
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php 4 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
              * @param       array       $_aOutputs      Holds output elements - contents, section tab list, count of subsections
283 283
              * @param       string      $_sSectionsID   The container id of secitons.
284 284
              * @param       array       $_aSection
285
-             * @param       array       $_aFieldsInSections     A fieldsets array already divided by section tab.
285
+             * @param       array       $aFieldsInSections     A fieldsets array already divided by section tab.
286 286
              * @return      array       The updated sections table output array.
287 287
              */
288 288
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
@@ -336,6 +336,7 @@  discard block
 block discarded – undo
336 336
             }
337 337
                 /**
338 338
                  * @since       DEVVER
339
+                 * @param string $_sSectionsID
339 340
                  * @return      array
340 341
                  */
341 342
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
@@ -484,6 +485,7 @@  discard block
 block discarded – undo
484 485
              * @since       3.5.3
485 486
              * @since       3.6.0       Removed the `$sSectionID` parameter. Added the `$aSectionset` parameter.
486 487
              * @since       DEVVER      Moved from `AdminPageFramework_FormPart_Table`.
488
+             * @param string $sSectionsID
487 489
              * @return      string      The formatted sections table HTML output.
488 490
              */
489 491
             private function _getFormattedSectionsTablesOutput( array $aOutputs, $aSectionset, $sSectionsID, array $aCollapsible, $sSectionTabSlug ) {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@
 block discarded – undo
531 531
                  * @return      string      The generated section tab list as HTML.
532 532
                  */
533 533
                 private function _getSectionTabList( $sSectionTabSlug, array $aSectionTabList ) {
534
-                   return $sSectionTabSlug 
534
+                    return $sSectionTabSlug 
535 535
                         ? "<ul class='admin-page-framework-section-tabs nav-tab-wrapper'>" 
536 536
                             . implode( PHP_EOL, $aSectionTabList ) 
537 537
                             . "</ul>"
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function get() {
128 128
         
129
-        $_oFormatSectionsetsByTab  = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
129
+        $_oFormatSectionsetsByTab = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
130 130
             $this->aStructure[ 'sectionsets' ],
131 131
             $this->aStructure[ 'fieldsets' ],
132 132
             $this->aArguments[ 'nested_depth' ]
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 // if ( $this->aArguments[ 'nested_depth' ] === 2 ) {
137 137
     // AdminPageFramework_Debug::log( $this->aStructure[ 'sectionsets' ] );
138 138
 // }   
139
-        $_aOutput     = array();
140
-        foreach( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
139
+        $_aOutput = array();
140
+        foreach ( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
141 141
 
142 142
 // var_dump( array_keys( $_oFormatSectionsetsByTab->getSectionsets( $_sSectionTabSlug ) ) ) ;
143
-            $_aOutput[] = $this->_getFormOutput(
143
+            $_aOutput[ ] = $this->_getFormOutput(
144 144
                 $_oFormatSectionsetsByTab->getSectionsets( $_sSectionTabSlug ),
145 145
                 $_oFormatSectionsetsByTab->getFieldsets( $_sSectionTabSlug ),
146 146
                 $_sSectionTabSlug,
@@ -169,17 +169,17 @@  discard block
 block discarded – undo
169 169
 
170 170
             // A sectionset is a set of sections.
171 171
             $_sSectionSet = $this->_getSectionsetsTables( 
172
-                $aSectionsets,  // sectionset definition (already devided by section tab)
173
-                $aFieldsets,    // fieldset definitions (already devided by section tab)
172
+                $aSectionsets, // sectionset definition (already devided by section tab)
173
+                $aFieldsets, // fieldset definitions (already devided by section tab)
174 174
                 $aCallbacks
175 175
             );
176 176
             return $_sSectionSet
177
-                ? "<div " . $this->getAttributes(
177
+                ? "<div ".$this->getAttributes(
178 178
                         array(
179 179
                             'class' => 'admin-page-framework-sectionset',
180
-                            'id'    => "sectionset-{$sSectionTabSlug}_" . md5( serialize( $aSectionsets ) ),
180
+                            'id'    => "sectionset-{$sSectionTabSlug}_".md5( serialize( $aSectionsets ) ),
181 181
                         ) 
182
-                    ) . ">"
182
+                    ).">"
183 183
                         . $_sSectionSet
184 184
                     . "</div>"
185 185
                 : '';
@@ -221,12 +221,12 @@  discard block
 block discarded – undo
221 221
                 'count_subsections' => 0,
222 222
             );
223 223
             $_sThisSectionID    = $_aFirstSectionset[ 'section_id' ];
224
-            $_sSectionsID       = 'sections-' . $_sThisSectionID;
224
+            $_sSectionsID       = 'sections-'.$_sThisSectionID;
225 225
             $_aCollapsible      = $this->_getCollapsibleArgumentForSections( 
226 226
                 $_aFirstSectionset 
227 227
             );
228 228
 
229
-            foreach( $aSectionsets as $_aSectionset ) {
229
+            foreach ( $aSectionsets as $_aSectionset ) {
230 230
            
231 231
                 $_sSectionTabSlug   = $_aSectionset[ 'section_tab_slug' ]; // needed outside the loop
232 232
                 $_aOutputs          = $this->_getSectionsetTable(
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
              * Changed the visibility scope to private. Changed the 1st parameter from `$aSection`.
259 259
              * @return      array
260 260
              */
261
-            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {  
261
+            private function _getCollapsibleArgumentForSections( array $aSectionset = array() ) {  
262 262
                 
263 263
                 $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection(
264 264
                     $aSectionset[ 'collapsible' ],
@@ -287,17 +287,17 @@  discard block
 block discarded – undo
287 287
              */
288 288
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
289 289
             
290
-                if ( ! $this->isSectionsetVisible( $_aSection ) ) {
290
+                if ( !$this->isSectionsetVisible( $_aSection ) ) {
291 291
 // var_dump( 'not visible: ' . $_aSection[ '_section_path' ] );
292 292
                     return $_aOutputs;
293 293
                 }
294 294
 
295 295
                 // If the 'save' argument is false, insert a flag that disables saving the section inputs.
296
-                $_aOutputs[ 'section_contents' ][] = $this->_getUnsetFlagSectionInputTag( $_aSection );
296
+                $_aOutputs[ 'section_contents' ][ ] = $this->_getUnsetFlagSectionInputTag( $_aSection );
297 297
                 
298 298
                 // For repeatable sections - sub-sections are divided field definition arrays by sub-section index, 
299 299
                 // not section definition arrays.
300
-                $_aSubSections      = $this->getIntegerKeyElements( 
300
+                $_aSubSections = $this->getIntegerKeyElements( 
301 301
                     $this->getElementAsArray(
302 302
                         $aFieldsInSections, // subject
303 303
                         $_aSection[ '_section_path' ], // $_aSection[ 'section_id' ],   // dimensional key
@@ -341,29 +341,29 @@  discard block
 block discarded – undo
341 341
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
342 342
                     
343 343
                     // Add the repeatable sections enabler script.
344
-                    if ( ! empty( $_aSection[ 'repeatable' ] ) ) {
345
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( 
344
+                    if ( !empty( $_aSection[ 'repeatable' ] ) ) {
345
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( 
346 346
                             $_sSectionsID, 
347 347
                             $_aOutputs[ 'count_subsections' ], 
348 348
                             $_aSection[ 'repeatable' ],
349 349
                             $this->oMsg
350 350
                         );
351
-                        $_aOutputs[ 'section_contents' ][] = $this->_getRepeatableSectionFlagTag( $_aSection );
351
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getRepeatableSectionFlagTag( $_aSection );
352 352
                     }
353 353
                     // Add the sortable sections enabler script. 3.6.0+
354
-                    if ( ! empty( $_aSection[ 'sortable' ] ) ) {
354
+                    if ( !empty( $_aSection[ 'sortable' ] ) ) {
355 355
 // @todo Change the name of the class to AdminPageFramework_Form_Script_...
356
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
356
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
357 357
                             $_sSectionsID, 
358 358
                             $_aSection[ 'sortable' ],
359 359
                             $this->oMsg
360 360
                         );
361
-                        $_aOutputs[ 'section_contents' ][] = $this->_getSortableSectionFlagTag( $_aSection );
361
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getSortableSectionFlagTag( $_aSection );
362 362
                     }
363 363
                     
364 364
                     // Get the section tables.
365 365
                     $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well.
366
-                    foreach( $_aSubSections as $_iIndex => $_aFields ) { 
366
+                    foreach ( $_aSubSections as $_iIndex => $_aFields ) { 
367 367
 
368 368
                         $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection(
369 369
                             $_aSection,
@@ -393,8 +393,8 @@  discard block
 block discarded – undo
393 393
                         array(
394 394
                             'class'                     => 'element-address',
395 395
                             'type'                      => 'hidden',
396
-                            'name'                      => '__repeatable_elements_' . $aSection[ '_structure_type' ] 
397
-                                . '[ ' . $aSection[ 'section_id' ] . ' ]',
396
+                            'name'                      => '__repeatable_elements_'.$aSection[ '_structure_type' ] 
397
+                                . '[ '.$aSection[ 'section_id' ].' ]',
398 398
                             // @todo examine whether this value should include a section index.
399 399
                             'value' => $aSection[ 'section_id' ],                            
400 400
                         )
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
                         array(
413 413
                             'class'                     => 'element-address',
414 414
                             'type'                      => 'hidden',
415
-                            'name'                      => '__sortable_elements_' . $aSection[ '_structure_type' ] 
416
-                                . '[ ' . $aSection[ 'section_id' ] . ' ]',
415
+                            'name'                      => '__sortable_elements_'.$aSection[ '_structure_type' ] 
416
+                                . '[ '.$aSection[ 'section_id' ].' ]',
417 417
                             // @todo examine whether this value should include a section index.
418 418
                             'value' => $aSection[ 'section_id' ],                            
419 419
                         )
@@ -435,8 +435,8 @@  discard block
 block discarded – undo
435 435
                         'input',
436 436
                         array(
437 437
                             'type'  => 'hidden',
438
-                            'name'  => '__unset_' .  $aSection[ '_structure_type' ] . '[ ' . $aSection[ 'section_id' ] . ' ]',
439
-                            'value' => "__dummy_option_key|" . $aSection[ 'section_id' ],
438
+                            'name'  => '__unset_'.$aSection[ '_structure_type' ].'[ '.$aSection[ 'section_id' ].' ]',
439
+                            'value' => "__dummy_option_key|".$aSection[ 'section_id' ],
440 440
                             'class' => 'unset-element-names element-address',
441 441
                         )
442 442
                     );            
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
                 private function _getSectionTableWithTabList( array $_aOutputs, array $aSectionset, $aFieldsetsPerSection ) {
453 453
                                         
454 454
                     // Tab list
455
-                    $_aOutputs[ 'section_tab_list' ][] = $this->_getTabList( 
455
+                    $_aOutputs[ 'section_tab_list' ][ ] = $this->_getTabList( 
456 456
                         $aSectionset, 
457 457
                         $aFieldsetsPerSection, 
458 458
                         $this->aCallbacks[ 'fieldset_output' ]
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 
462 462
                     // Section container
463 463
                     $_oSectionTable = new AdminPageFramework_Form_View___Section(
464
-                        $this->aArguments,  // for nested sections
464
+                        $this->aArguments, // for nested sections
465 465
                         $aSectionset,
466 466
                         $this->aStructure,
467 467
                         $aFieldsetsPerSection,
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                         $this->aCallbacks,
472 472
                         $this->oMsg
473 473
                     );
474
-                    $_aOutputs[ 'section_contents' ][] = $_oSectionTable->get();                    
474
+                    $_aOutputs[ 'section_contents' ][ ] = $_oSectionTable->get();                    
475 475
                    
476 476
                     return $_aOutputs;
477 477
                  
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                         'collapsible'       => $aCollapsible,
501 501
                         'container_type'    => 'sections', // section or sections                    
502 502
                     ),
503
-                    array(),            // fieldsets
503
+                    array(), // fieldsets
504 504
                     $this->aSavedData,   
505 505
                     $this->aFieldErrors, 
506 506
                     $this->aStructure[ 'field_type_definitions' ], 
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                     $aOutputs[ 'count_subsections' ]
518 518
                 );
519 519
                 return $_oCollapsibleSectionTitle->get()
520
-                    . "<div " . $_oSectionsTablesContainerAttributes->get() . ">"
520
+                    . "<div ".$_oSectionsTablesContainerAttributes->get().">"
521 521
                         . $this->_getSectionTabList( $sSectionTabSlug, $aOutputs[ 'section_tab_list' ] )
522 522
                         . implode( PHP_EOL, $aOutputs[ 'section_contents' ] )
523 523
                     . "</div>";
@@ -548,21 +548,21 @@  discard block
 block discarded – undo
548 548
              */
549 549
             private function _getTabList( array $aSection, array $aFields, $hfFieldCallback ) {
550 550
                                 
551
-                if ( ! $aSection[ 'section_tab_slug' ] ) {
551
+                if ( !$aSection[ 'section_tab_slug' ] ) {
552 552
                     return '';
553 553
                 }
554 554
                 
555 555
                 $iSectionIndex      = $aSection[ '_index' ];
556 556
 
557
-                $_sSectionTagID     = 'section-' . $aSection[ 'section_id' ] . '__' . $iSectionIndex;
557
+                $_sSectionTagID     = 'section-'.$aSection[ 'section_id' ].'__'.$iSectionIndex;
558 558
                 $_aTabAttributes    = $aSection[ 'attributes' ][ 'tab' ]
559 559
                     + array(
560 560
                         'class' => 'admin-page-framework-section-tab nav-tab',
561 561
                         'id'    => "section_tab-{$_sSectionTagID}",
562 562
                         'style' => null
563 563
                     );
564
-                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] );  // 3.3.1+
565
-                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null );  // 3.3.1+
564
+                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+
565
+                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+
566 566
                 
567 567
                 $_oSectionTitle = new AdminPageFramework_Form_View___SectionTitle(                    
568 568
                     array(
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                     $this->aCallbacks // field output element callables.                    
579 579
                 );                        
580 580
                 
581
-                return "<li " . $this->getAttributes( $_aTabAttributes ) . ">"
581
+                return "<li ".$this->getAttributes( $_aTabAttributes ).">"
582 582
                     . "<a href='#{$_sSectionTagID}'>"
583 583
                         . $_oSectionTitle->get()
584 584
                     ."</a>"
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         private function _getSectionsetsTables( array $aSectionsets, array $aFieldsets, array $aCallbacks ) {
205 205
 
206 206
 
207
-            if ( empty( $aSectionsets ) ) { 
207
+            if ( empty( $aSectionsets ) ) {
208 208
                 return ''; 
209 209
             } 
210 210
             
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
              * Changed the visibility scope to private. Changed the 1st parameter from `$aSection`.
259 259
              * @return      array
260 260
              */
261
-            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {  
261
+            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {
262 262
                 
263 263
                 $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection(
264 264
                     $aSectionset[ 'collapsible' ],
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                     
364 364
                     // Get the section tables.
365 365
                     $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well.
366
-                    foreach( $_aSubSections as $_iIndex => $_aFields ) { 
366
+                    foreach( $_aSubSections as $_iIndex => $_aFields ) {
367 367
 
368 368
                         $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection(
369 369
                             $_aSection,
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                  */
429 429
                 private function _getUnsetFlagSectionInputTag( array $aSection ) {
430 430
                     
431
-                    if ( false !== $aSection[ 'save' ] ) {                
431
+                    if ( false !== $aSection[ 'save' ] ) {
432 432
                         return '';
433 433
                     }
434 434
                     return $this->getHTMLTag( 
Please login to merge, or discard this patch.
development/factory/_abstract/form/AdminPageFramework_Form_Controller.php 3 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -121,6 +121,8 @@
 block discarded – undo
121 121
     }
122 122
     /**
123 123
      * @since       DEVVER
124
+     * @param string $sKey
125
+     * @param string $sValue
124 126
      * @return      void
125 127
      */
126 128
     public function addResource( $sKey, $sValue ) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param       string      $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type.
27 27
      * @return      boolean     True if a setting notice is set; otherwise, false.
28 28
      */
29
-    public function hasSubmitNotice( $sType='' ) {
29
+    public function hasSubmitNotice( $sType = '' ) {
30 30
         return $this->oSubmitNotice->hasNotice( $sType );
31 31
     }
32 32
     
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @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.
53 53
      * @return       void
54 54
      */
55
-    public function setSubmitNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
55
+    public function setSubmitNotice( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) {
56 56
         $this->oSubmitNotice->set(
57 57
             $sMessage, 
58 58
             $sType, 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         
80 80
         $this->aSectionsets[ $aSectionset[ 'section_id' ] ] = $aSectionset;    
81 81
         $this->aFieldsets[ $aSectionset[ 'section_id' ] ]   = $this->getElement(
82
-            $this->aFieldsets,  // subject array
82
+            $this->aFieldsets, // subject array
83 83
             $aSectionset[ 'section_id' ], // key
84 84
             array()      // default
85 85
         );                                
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function removeSection( $sSectionID ) {
96 96
         
97
-        if ( '_default' === $sSectionID ){ 
97
+        if ( '_default' === $sSectionID ) { 
98 98
             return; 
99 99
         }
100 100
         unset( 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      * @return      void
125 125
      */
126 126
     public function addResource( $sKey, $sValue ) {
127
-        self::$_aResources[ $sKey ][] = $sValue;
127
+        self::$_aResources[ $sKey ][ ] = $sValue;
128 128
     }
129 129
     
130 130
     /**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     public function addField( $asFieldset ) {
148 148
 
149 149
         // If it is a target section, update the property and return.
150
-        if ( ! $this->_isFieldsetDefinition( $asFieldset ) ) {
150
+        if ( !$this->_isFieldsetDefinition( $asFieldset ) ) {
151 151
             $this->_asTargetSectionID = $this->_getTargetSectionID( $asFieldset );
152 152
             return $this->_asTargetSectionID;
153 153
         }
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
         
157 157
         // Set the target section ID
158 158
         $this->_asTargetSectionID = $this->getElement(
159
-            $_aFieldset,  // subject array
159
+            $_aFieldset, // subject array
160 160
             'section_id', // key
161 161
             $this->_asTargetSectionID // default
162 162
         );                               
163 163
 
164 164
         // Required Keys
165
-        if ( ! isset( $_aFieldset[ 'field_id' ], $_aFieldset[ 'type' ] ) ) { 
165
+        if ( !isset( $_aFieldset[ 'field_id' ], $_aFieldset[ 'type' ] ) ) { 
166 166
             return null; 
167 167
         }         
168 168
                 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      */     
266 266
     public function removeField( $sFieldID ) {
267 267
                
268
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
268
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
269 269
 
270 270
             if ( array_key_exists( $sFieldID, $_aSubSectionsOrFields ) ) {
271 271
                 unset( $this->aFieldsets[ $_sSectionID ][ $sFieldID ] );
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function removeSection( $sSectionID ) {
96 96
         
97
-        if ( '_default' === $sSectionID ){ 
97
+        if ( '_default' === $sSectionID ) {
98 98
             return; 
99 99
         }
100 100
         unset( 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         );                               
163 163
 
164 164
         // Required Keys
165
-        if ( ! isset( $_aFieldset[ 'field_id' ], $_aFieldset[ 'type' ] ) ) { 
165
+        if ( ! isset( $_aFieldset[ 'field_id' ], $_aFieldset[ 'type' ] ) ) {
166 166
             return null; 
167 167
         }         
168 168
                 
Please login to merge, or discard this patch.
development/factory/_abstract/form/AdminPageFramework_Form_Model.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -391,7 +391,6 @@
 block discarded – undo
391 391
      * 
392 392
      * @since       DEVVER
393 393
      * @param       array       $aSavedData
394
-     * @param       boolean     $bOnlyFieldsets     Whether to format only the fieldsets. The taxonomy field factory uses this parameter.
395 394
      */
396 395
     protected function _formatElementDefinitions( array $aSavedData ) {
397 396
                 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
      * @since       DEVVER
37 37
      * @return      array
38 38
      */
39
-    public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure=true, $bStripSlashes=true ) {
39
+    public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure = true, $bStripSlashes = true ) {
40 40
                 
41 41
         // Extracts the form data from the subject data for parsing
42
-        $_aSubmittedFormData    = $bExtractFromFieldStructure
42
+        $_aSubmittedFormData = $bExtractFromFieldStructure
43 43
             ? $this->castArrayContents( 
44 44
                 $this->getDataStructureFromAddedFieldsets(), // form data (options) structure
45 45
                 $aDataToParse   // the subject data array, usually $_POST.
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             : $aDataToParse;
48 48
 
49 49
         // 3.6.0 - sorts dynamic eleemnts.        
50
-        $_aSubmittedFormData    = $this->getSortedInputs( $_aSubmittedFormData ); 
50
+        $_aSubmittedFormData = $this->getSortedInputs( $_aSubmittedFormData ); 
51 51
         
52 52
         return $bStripSlashes
53 53
             ? stripslashes_deep( $_aSubmittedFormData ) // fixes magic quotes
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
             array_merge(
73 73
                 $this->getElementAsArray( 
74 74
                     $_POST,
75
-                    '__repeatable_elements_' . $this->aArguments[ 'structure_type' ],
75
+                    '__repeatable_elements_'.$this->aArguments[ 'structure_type' ],
76 76
                     array()
77 77
                 ),
78 78
                 $this->getElementAsArray( 
79 79
                     $_POST,
80
-                    '__sortable_elements_' . $this->aArguments[ 'structure_type' ],
80
+                    '__sortable_elements_'.$this->aArguments[ 'structure_type' ],
81 81
                     array()
82 82
                 )
83 83
             )
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
      * Changed the name from `getFieldsModel()`.
141 141
      * @return      array
142 142
      */
143
-    public function getDataStructureFromAddedFieldsets()  {
143
+    public function getDataStructureFromAddedFieldsets() {
144 144
                     
145
-        $_aFormDataStructure  = array();
145
+        $_aFormDataStructure = array();
146 146
         foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) {
147 147
 
148 148
             if ( $_sSectionID != '_default' ) {                
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             }
152 152
             
153 153
             // For default field items.
154
-            foreach( $_aFieldsets as $_sFieldID => $_aFieldset ) {
154
+            foreach ( $_aFieldsets as $_sFieldID => $_aFieldset ) {
155 155
                 $_aFormDataStructure[ $_aFieldset[ 'field_id' ] ] = $_aFieldset;
156 156
             }
157 157
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             $aSubject,
184 184
             $this->getElementAsArray(
185 185
                 $_POST,
186
-                '__repeatable_elements_' . $this->aArguments[ 'structure_type' ]
186
+                '__repeatable_elements_'.$this->aArguments[ 'structure_type' ]
187 187
             )
188 188
         );
189 189
         return $_oFilterRepeatableElements->get();
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function _replyToRegisterFormItems( /* $oScreen */ ) {
197 197
 
198 198
         // Check if the form should be created or not.
199
-        if ( ! $this->isInThePage() ) {
199
+        if ( !$this->isInThePage() ) {
200 200
             return;
201 201
         }
202 202
                 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             $this->aArguments,
230 230
             $this->aFieldsets,
231 231
             self::$_aResources,
232
-            $this->aFieldTypeDefinitions,   // must be called after performing `_setFieldTypeDefinitions()`.
232
+            $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`.
233 233
             $this->aCallbacks
234 234
         );
235 235
         self::$_aResources = $_oFieldResources->get(); // updates the property
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
         $this->callBack(
247 247
             $this->aCallbacks[ 'handle_form_data' ],
248 248
             array(
249
-                $this->aSavedData,      // 1st parameter
250
-                $this->aArguments,      // 2nd parameter
251
-                $this->aSectionsets,    // 3rd parameter
252
-                $this->aFieldsets,      // 4th parameter
249
+                $this->aSavedData, // 1st parameter
250
+                $this->aArguments, // 2nd parameter
251
+                $this->aSectionsets, // 3rd parameter
252
+                $this->aFieldsets, // 4th parameter
253 253
             )
254 254
         );        
255 255
         
@@ -263,15 +263,15 @@  discard block
 block discarded – undo
263 263
             $this->aSectionsets = $this->callBack(
264 264
                 $this->aCallbacks[ 'secitonsets_before_registration' ],
265 265
                 array(
266
-                    $this->aSectionsets,    // 1st parameter
266
+                    $this->aSectionsets, // 1st parameter
267 267
                 )
268 268
             );
269 269
             // Let the main routine modify the fieldsets definition array.
270 270
             $this->aFieldsets = $this->callBack(
271 271
                 $this->aCallbacks[ 'fieldsets_before_registration' ],
272 272
                 array(
273
-                    $this->aFieldsets,    // 1st parameter
274
-                    $this->aSectionsets,  // 2nd parameter
273
+                    $this->aFieldsets, // 1st parameter
274
+                    $this->aSectionsets, // 2nd parameter
275 275
                 )
276 276
             );
277 277
 
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
              */
358 358
             private function _getLastInputs() {
359 359
                 
360
-                $_sKey      = 'apf_tfd' . md5( 'temporary_form_data_' . $this->aArguments[ 'caller_id' ] . get_current_user_id() );
360
+                $_sKey      = 'apf_tfd'.md5( 'temporary_form_data_'.$this->aArguments[ 'caller_id' ].get_current_user_id() );
361 361
                 $_vValue    = $this->getTransient( $_sKey );
362 362
                 $this->deleteTransient( $_sKey );
363 363
                 if ( is_array( $_vValue ) ) {
@@ -430,12 +430,12 @@  discard block
 block discarded – undo
430 430
      * @param       boolean     $bDelete    whether or not the transient should be deleted after retrieving it. 
431 431
      * @return      array
432 432
      */
433
-    public function getFieldErrors( $bDelete=true ) {
433
+    public function getFieldErrors( $bDelete = true ) {
434 434
         
435 435
         static $_aFieldErrors;
436 436
         
437 437
         // Find the transient.
438
-        $_sTransientKey = "apf_field_erros_" . get_current_user_id();
438
+        $_sTransientKey = "apf_field_erros_".get_current_user_id();
439 439
         $_sID           = md5( $this->aArguments[ 'caller_id' ] );
440 440
         
441 441
         $_aFieldErrors  = isset( $_aFieldErrors ) 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
          * @internal
463 463
          */
464 464
         public function _replyToDeleteFieldErrors() {
465
-            $this->deleteTransient( "apf_field_erros_" . get_current_user_id() );
465
+            $this->deleteTransient( "apf_field_erros_".get_current_user_id() );
466 466
         }        
467 467
   
468 468
 }
469 469
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
      * Changed the name from `getFieldsModel()`.
141 141
      * @return      array
142 142
      */
143
-    public function getDataStructureFromAddedFieldsets()  {
143
+    public function getDataStructureFromAddedFieldsets() {
144 144
                     
145 145
         $_aFormDataStructure  = array();
146 146
         foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) {
147 147
 
148
-            if ( $_sSectionID != '_default' ) {                
148
+            if ( $_sSectionID != '_default' ) {
149 149
                 $_aFormDataStructure[ $_sSectionID ] = $_aFieldsets;
150 150
                 continue;
151 151
             }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      * @param       array       $aSubject       The subject array to modify. Usually the saved option data.
179 179
      * @return      array       The modified options array.
180 180
      */
181
-    public function dropRepeatableElements( array $aSubject ) {        
181
+    public function dropRepeatableElements( array $aSubject ) {
182 182
         $_oFilterRepeatableElements = new AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements( 
183 183
             $aSubject,
184 184
             $this->getElementAsArray(
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_size.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -165,6 +165,7 @@  discard block
 block discarded – undo
165 165
              * Returns the HTML output of the number input part.
166 166
              * 
167 167
              * @since       3.5.3
168
+             * @param boolean $bMultiLabels
168 169
              * @return      string      The number input output.
169 170
              */
170 171
             private function _getNumberInputPart( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) {
@@ -217,6 +218,7 @@  discard block
 block discarded – undo
217 218
              * Returns the HTML output of the unit select input part.
218 219
              * 
219 220
              * @since       3.5.3
221
+             * @param boolean $bMultiLabels
220 222
              * @return      string      The unit select input output.
221 223
              */
222 224
             private function _getUnitSelectInput( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) {
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Defines the field type slugs used for this field type.
23 23
      */
24
-    public $aFieldTypeSlugs = array( 'size', );
24
+    public $aFieldTypeSlugs = array( 'size',);
25 25
     
26 26
     /**
27 27
      * Defines the default key-values of this field type. 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected $aDefaultKeys = array(
32 32
         'is_multiple'           => false, // indicates whether the select tag alloes multiple selections.
33
-        'units'                 => null,  // do not define units here since this will be merged with the user defined field array.
33
+        'units'                 => null, // do not define units here since this will be merged with the user defined field array.
34 34
         'attributes'            => array(
35 35
             'size'      => array(
36 36
                 'size'          => 10,
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     protected $aDefaultUnits = array(
61 61
         'px'    => 'px', // pixel
62
-        '%'     => '%',  // percentage
62
+        '%'     => '%', // percentage
63 63
         'em'    => 'em', // font size
64 64
         'ex'    => 'ex', // font height
65 65
         'in'    => 'in', // inch
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
         );
117 117
         
118 118
         $_aOutput = array();
119
-        foreach( ( array ) $aField[ 'label' ] as $_isKey => $_sLabel ) {
120
-            $_aOutput[] = $this->_getFieldOutputByLabel( 
119
+        foreach ( ( array ) $aField[ 'label' ] as $_isKey => $_sLabel ) {
120
+            $_aOutput[ ] = $this->_getFieldOutputByLabel( 
121 121
                 $_isKey, 
122 122
                 $_sLabel,
123 123
                 $aField
@@ -139,24 +139,24 @@  discard block
 block discarded – undo
139 139
            
140 140
             $_aBaseAttributes   = $_bMultiLabels
141 141
                 ? array(
142
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$isKey}]",
143
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$isKey}",
142
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$isKey}]",
143
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$isKey}",
144 144
                         'value' => $aField[ 'value' ],
145 145
                     ) 
146 146
                     + $aField[ 'attributes' ]
147 147
                 : $aField[ 'attributes' ];
148 148
             unset( 
149
-                $_aBaseAttributes['unit'], 
150
-                $_aBaseAttributes['size'] 
149
+                $_aBaseAttributes[ 'unit' ], 
150
+                $_aBaseAttributes[ 'size' ] 
151 151
             );            
152 152
             
153 153
             $_aOutput = array(
154
-                $this->getElementByLabel( $aField['before_label'], $isKey, $_bMultiLabels ),
155
-                    "<div class='admin-page-framework-input-label-container admin-page-framework-select-label' style='min-width: " . $this->sanitizeLength( $aField[ 'label_min_width' ] ) . ";'>",
156
-                        $this->_getNumberInputPart( $aField, $_aBaseAttributes, $isKey, $_bMultiLabels ),  // The size (number) part
157
-                        $this->_getUnitSelectInput( $aField, $_aBaseAttributes, $isKey, $_bMultiLabels ),  // The unit (select) part
154
+                $this->getElementByLabel( $aField[ 'before_label' ], $isKey, $_bMultiLabels ),
155
+                    "<div class='admin-page-framework-input-label-container admin-page-framework-select-label' style='min-width: ".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>",
156
+                        $this->_getNumberInputPart( $aField, $_aBaseAttributes, $isKey, $_bMultiLabels ), // The size (number) part
157
+                        $this->_getUnitSelectInput( $aField, $_aBaseAttributes, $isKey, $_bMultiLabels ), // The unit (select) part
158 158
                     "</div>",
159
-                $this->getElementByLabel( $aField['after_label'], $isKey, $_bMultiLabels )
159
+                $this->getElementByLabel( $aField[ 'after_label' ], $isKey, $_bMultiLabels )
160 160
             );
161 161
             return implode( '', $_aOutput );                
162 162
                 
@@ -170,39 +170,39 @@  discard block
 block discarded – undo
170 170
             private function _getNumberInputPart( array $aField, array $aBaseAttributes, $isKey, $bMultiLabels ) {
171 171
                 
172 172
                 // Size and Size Label
173
-                $_aSizeAttributes       = $this->_getSizeAttributes( 
173
+                $_aSizeAttributes = $this->_getSizeAttributes( 
174 174
                     $aField, 
175 175
                     $aBaseAttributes,
176 176
                     $bMultiLabels
177 177
                         ? $isKey
178 178
                         : ''
179 179
                 );
180
-                $_aSizeLabelAttributes  = array(
180
+                $_aSizeLabelAttributes = array(
181 181
                     'for'   => $_aSizeAttributes[ 'id' ],
182 182
                     'class' => $_aSizeAttributes[ 'disabled' ] 
183 183
                         ? 'disabled' 
184 184
                         : null,
185 185
                 );                  
186 186
                 
187
-                $_sLabel                = $this->getElementByLabel( 
187
+                $_sLabel = $this->getElementByLabel( 
188 188
                     $aField[ 'label' ], 
189 189
                     $isKey, 
190 190
                     $bMultiLabels 
191 191
                 );
192
-                return "<label " . $this->getAttributes( $_aSizeLabelAttributes ) . ">"
192
+                return "<label ".$this->getAttributes( $_aSizeLabelAttributes ).">"
193 193
                     . $this->getElement( 
194 194
                         $aField, 
195 195
                         $bMultiLabels
196 196
                             ? array( 'before_label', $isKey, 'size' ) 
197 197
                             : array( 'before_label', 'size' ) 
198 198
                     )
199
-                    . ( $aField['label'] && ! $aField[ 'repeatable' ]
200
-                        ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField[ 'label_min_width' ] ) . ";'>" 
199
+                    . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
200
+                        ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>" 
201 201
                                 . $_sLabel 
202 202
                             . "</span>"
203 203
                         : "" 
204 204
                     )
205
-                    . "<input " . $this->getAttributes( $_aSizeAttributes ) . " />" 
205
+                    . "<input ".$this->getAttributes( $_aSizeAttributes )." />" 
206 206
                     . $this->getElement( 
207 207
                         $aField, 
208 208
                         $bMultiLabels
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                     )
245 245
                     : $aField[ 'units' ];
246 246
                 
247
-                return "<label " . $this->getAttributes( 
247
+                return "<label ".$this->getAttributes( 
248 248
                         array(
249 249
                             'for'       => $_aUnitAttributes[ 'id' ],
250 250
                             'class'     => $_aUnitAttributes[ 'disabled' ] 
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
                  * @since       3.5.3    
276 276
                  * @return      array       an unit attribute array
277 277
                  */
278
-                private function _getUnitAttributes( array $aField, array $aBaseAttributes, $isLabelKey='' ) {
278
+                private function _getUnitAttributes( array $aField, array $aBaseAttributes, $isLabelKey = '' ) {
279 279
                     
280
-                    $_bIsMultiple    = $aField[ 'is_multiple' ] 
280
+                    $_bIsMultiple = $aField[ 'is_multiple' ] 
281 281
                         ? true 
282 282
                         : $this->getElement( 
283 283
                             $aField,
@@ -289,13 +289,13 @@  discard block
 block discarded – undo
289 289
               
290 290
                     $_aSelectAttributes = array(
291 291
                         'type'      => 'select',
292
-                        'id'        => $aField[ 'input_id' ] . ( '' === $isLabelKey ? '' : '_' . $isLabelKey ) . '_' . 'unit',
292
+                        'id'        => $aField[ 'input_id' ].( '' === $isLabelKey ? '' : '_'.$isLabelKey ).'_'.'unit',
293 293
                         'multiple'  => $_bIsMultiple 
294 294
                             ? 'multiple' 
295 295
                             : null,
296 296
                         'name'      => $_bIsMultiple 
297
-                            ? "{$aField['_input_name']}" . ( '' === $isLabelKey ? '' : '[' . $isLabelKey . ']' ) . "[unit][]" 
298
-                            : "{$aField['_input_name']}" . ( '' === $isLabelKey ? '' : '[' . $isLabelKey . ']' ) . "[unit]",
297
+                            ? "{$aField[ '_input_name' ]}".( '' === $isLabelKey ? '' : '['.$isLabelKey.']' )."[unit][]" 
298
+                            : "{$aField[ '_input_name' ]}".( '' === $isLabelKey ? '' : '['.$isLabelKey.']' )."[unit]",
299 299
                         'value'     => $this->getElement( 
300 300
                             $aField, 
301 301
                             array( 'value', 'unit' ),
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
                         '' === $isLabelKey
308 308
                             ? array( 'attributes', 'unit' )
309 309
                             : array( 'attributes', $isLabelKey, 'unit' ),
310
-                        $this->aDefaultKeys['attributes']['unit'] 
310
+                        $this->aDefaultKeys[ 'attributes' ][ 'unit' ] 
311 311
                     )
312 312
                     + $aBaseAttributes;       
313 313
                     return $_aSelectAttributes;
@@ -320,15 +320,15 @@  discard block
 block discarded – undo
320 320
              * @since       3.5.3    
321 321
              * @return      array       an size attribute array
322 322
              */
323
-            private function _getSizeAttributes( array $aField, array $aBaseAttributes, $sLabelKey='' ) {
323
+            private function _getSizeAttributes( array $aField, array $aBaseAttributes, $sLabelKey = '' ) {
324 324
 
325 325
                 return array(
326 326
                         'type'  => 'number',
327
-                        'id'    => $aField['input_id'] . '_' . ( '' !== $sLabelKey ? $sLabelKey . '_' : '' ) . 'size',
328
-                        'name'  => $aField[ '_input_name' ] . ( '' !== $sLabelKey ? "[{$sLabelKey}]" : '' ) . '[size]',
327
+                        'id'    => $aField[ 'input_id' ].'_'.( '' !== $sLabelKey ? $sLabelKey.'_' : '' ).'size',
328
+                        'name'  => $aField[ '_input_name' ].( '' !== $sLabelKey ? "[{$sLabelKey}]" : '' ).'[size]',
329 329
                         'value' => $this->getElement(
330
-                            $aField,        // subject
331
-                            array( 'value', 'size' ),   // dimensional keys
330
+                            $aField, // subject
331
+                            array( 'value', 'size' ), // dimensional keys
332 332
                             ''  // default
333 333
                         ),
334 334
                     ) 
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_system.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -231,6 +231,7 @@  discard block
 block discarded – undo
231 231
             /**
232 232
              * Returns the system information by section.
233 233
              * @since       3.5.3
234
+             * @param integer $iPrintType
234 235
              * @return      string      The system information by section.
235 236
              */
236 237
             private function _getSystemInfoBySection( $sSectionName, $aData, $iPrintType ) {
@@ -350,6 +351,8 @@  discard block
 block discarded – undo
350 351
                     /**
351 352
                      * 
352 353
                      * @since       3.5.12
354
+                     * @param string $asCategories
355
+                     * @param string $asRemovingCategories
353 356
                      * @return      stirng|array
354 357
                      */
355 358
                     private function _getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
Please login to merge, or discard this patch.
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *      )
31 31
      *  );
32 32
      */
33
-    public $aFieldTypeSlugs = array( 'system', );
33
+    public $aFieldTypeSlugs = array( 'system',);
34 34
     
35 35
     /**
36 36
      * Defines the default key-values of this field type. 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
      * @remark            $_aDefaultKeys holds shared default key-values defined in the base class.
48 48
      */
49 49
     protected $aDefaultKeys = array(
50
-        'data'          =>  array(),        // [3.2.0+] Stores the data to be displayed
51
-        'print_type'    =>  1,              // [3.4.6+] 1: readable representation of array. 2: print_r()
50
+        'data'          =>  array(), // [3.2.0+] Stores the data to be displayed
51
+        'print_type'    =>  1, // [3.4.6+] 1: readable representation of array. 2: print_r()
52 52
         'attributes'    =>    array(
53 53
             'rows'          => 60,
54 54
             'autofocus'     => null,
@@ -161,25 +161,25 @@  discard block
 block discarded – undo
161 161
      */
162 162
     protected function getField( $aField ) { 
163 163
 
164
-        $_aInputAttributes           = $aField['attributes'];
165
-        $_aInputAttributes['class'] .= ' system';
166
-        unset( $_aInputAttributes['value'] );
164
+        $_aInputAttributes           = $aField[ 'attributes' ];
165
+        $_aInputAttributes[ 'class' ] .= ' system';
166
+        unset( $_aInputAttributes[ 'value' ] );
167 167
         return 
168
-            $aField['before_label']
168
+            $aField[ 'before_label' ]
169 169
             . "<div class='admin-page-framework-input-label-container'>"
170
-                . "<label for='{$aField['input_id']}'>"
171
-                    . $aField['before_input']
172
-                    . ( $aField['label'] && ! $aField['repeatable']
173
-                        ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" . $aField['label'] . "</span>"
170
+                . "<label for='{$aField[ 'input_id' ]}'>"
171
+                    . $aField[ 'before_input' ]
172
+                    . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
173
+                        ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>".$aField[ 'label' ]."</span>"
174 174
                         : "" 
175 175
                     )
176
-                    . "<textarea " . $this->getAttributes( $_aInputAttributes ) . " >"    
177
-                        . esc_textarea( $this->_getSystemInfomation( $aField['value'], $aField['data'], $aField['print_type'] ) )
176
+                    . "<textarea ".$this->getAttributes( $_aInputAttributes )." >"    
177
+                        . esc_textarea( $this->_getSystemInfomation( $aField[ 'value' ], $aField[ 'data' ], $aField[ 'print_type' ] ) )
178 178
                     . "</textarea>"
179
-                    . $aField['after_input']
179
+                    . $aField[ 'after_input' ]
180 180
                 . "</label>"
181 181
             . "</div>"
182
-            . $aField['after_label'];
182
+            . $aField[ 'after_label' ];
183 183
         
184 184
     }    
185 185
         /**
@@ -187,15 +187,15 @@  discard block
 block discarded – undo
187 187
          * 
188 188
          * @return      string      The human readable system information.
189 189
          */
190
-        private function _getSystemInfomation( $asValue=null, $asCustomData=null, $iPrintType=1 ) {
190
+        private function _getSystemInfomation( $asValue = null, $asCustomData = null, $iPrintType = 1 ) {
191 191
 
192 192
             if ( isset( $asValue ) ) {
193 193
                 return $asValue;
194 194
             }
195 195
 
196
-            $_aOutput   = array();
197
-            foreach( $this->_getFormattedSystemInformation( $asCustomData ) as $_sSection => $_aInfo ) {
198
-                $_aOutput[] = $this->_getSystemInfoBySection( $_sSection, $_aInfo, $iPrintType );
196
+            $_aOutput = array();
197
+            foreach ( $this->_getFormattedSystemInformation( $asCustomData ) as $_sSection => $_aInfo ) {
198
+                $_aOutput[ ] = $this->_getSystemInfoBySection( $_sSection, $_aInfo, $iPrintType );
199 199
             }
200 200
             return implode( PHP_EOL, $_aOutput );
201 201
             
@@ -210,18 +210,18 @@  discard block
 block discarded – undo
210 210
                 
211 211
                 $_aData = $this->getAsArray( $asCustomData );
212 212
                 $_aData = $_aData + array(
213
-                    'Admin Page Framework'  => isset( $_aData['Admin Page Framework'] )
213
+                    'Admin Page Framework'  => isset( $_aData[ 'Admin Page Framework' ] )
214 214
                         ? null
215 215
                         : AdminPageFramework_Registry::getInfo(),
216
-                    'WordPress'             => $this->_getSiteInfoWithCache( ! isset( $_aData['WordPress'] ) ),
217
-                    'PHP'                   => $this->_getPHPInfo( ! isset( $_aData['PHP'] ) ),
218
-                    'PHP Error Log'         => $this->_getErrorLogByType( 'php', ! isset( $_aData['PHP Error Log'] ) ),
219
-                    'MySQL'                 => isset( $_aData['MySQL'] )
216
+                    'WordPress'             => $this->_getSiteInfoWithCache( !isset( $_aData[ 'WordPress' ] ) ),
217
+                    'PHP'                   => $this->_getPHPInfo( !isset( $_aData[ 'PHP' ] ) ),
218
+                    'PHP Error Log'         => $this->_getErrorLogByType( 'php', !isset( $_aData[ 'PHP Error Log' ] ) ),
219
+                    'MySQL'                 => isset( $_aData[ 'MySQL' ] )
220 220
                         ? null
221
-                        : $this->getMySQLInfo(),    // defined in the utility class.
222
-                    'MySQL Error Log'       => $this->_getErrorLogByType( 'mysql', ! isset( $_aData['MySQL Error Log'] ) ),
223
-                    'Server'                => $this->_getWebServerInfo( ! isset( $_aData['Server'] ) ),
224
-                    'Browser'               => $this->_getClientInfo( ! isset( $_aData['Browser'] ) ),
221
+                        : $this->getMySQLInfo(), // defined in the utility class.
222
+                    'MySQL Error Log'       => $this->_getErrorLogByType( 'mysql', !isset( $_aData[ 'MySQL Error Log' ] ) ),
223
+                    'Server'                => $this->_getWebServerInfo( !isset( $_aData[ 'Server' ] ) ),
224
+                    'Browser'               => $this->_getClientInfo( !isset( $_aData[ 'Browser' ] ) ),
225 225
                 );
226 226
                 
227 227
                 // Dropping empty elements allows the user to remove a section by setting an empty section.
@@ -237,10 +237,10 @@  discard block
 block discarded – undo
237 237
                 switch ( $iPrintType ) {
238 238
                     default:
239 239
                     case 1: // use the framework readable representation of arrays.
240
-                        return $this->getReadableArrayContents( $sSectionName, $aData, 32 ) . PHP_EOL;
240
+                        return $this->getReadableArrayContents( $sSectionName, $aData, 32 ).PHP_EOL;
241 241
                     case 2: // use print_r()
242
-                        return "[{$sSectionName}]" . PHP_EOL
243
-                            . print_r( $aData, true ) . PHP_EOL;
242
+                        return "[{$sSectionName}]".PHP_EOL
243
+                            . print_r( $aData, true ).PHP_EOL;
244 244
                 }                      
245 245
             }
246 246
             /**
@@ -249,17 +249,17 @@  discard block
 block discarded – undo
249 249
              * @since       3.4.6
250 250
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
251 251
              */
252
-            private function _getClientInfo( $bGenerateInfo=true ) {
252
+            private function _getClientInfo( $bGenerateInfo = true ) {
253 253
                  
254
-                if ( ! $bGenerateInfo ) {
254
+                if ( !$bGenerateInfo ) {
255 255
                     return '';
256 256
                 }
257 257
                  
258 258
                 // Check the browscap value in the ini file first to prevent warnings from being populated
259 259
                 $_aBrowser = @ini_get( 'browscap' ) 
260
-                    ? get_browser( $_SERVER['HTTP_USER_AGENT'], true )
260
+                    ? get_browser( $_SERVER[ 'HTTP_USER_AGENT' ], true )
261 261
                     : array();
262
-                unset( $_aBrowser['browser_name_regex'] );  // this element causes output to be blank
262
+                unset( $_aBrowser[ 'browser_name_regex' ] ); // this element causes output to be blank
263 263
                 return empty( $_aBrowser ) 
264 264
                     ? __( 'No browser information found.', 'admin-page-framework' )
265 265
                     : $_aBrowser;
@@ -274,9 +274,9 @@  discard block
 block discarded – undo
274 274
              * @param       string      $sType          The error log type. Either 'php' or 'mysql' is accepted.
275 275
              * @param       boolean     $bGenerateInfo  Whether to generate a log. This is for the caller method to reduce a conditinal statement.
276 276
              */
277
-            private function _getErrorLogByType( $sType, $bGenerateInfo=true ) {
277
+            private function _getErrorLogByType( $sType, $bGenerateInfo = true ) {
278 278
 
279
-                if ( ! $bGenerateInfo ) {
279
+                if ( !$bGenerateInfo ) {
280 280
                     return '';
281 281
                 }
282 282
                 switch ( $sType ) {
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
308 308
              * @return      array      The generated site information array.
309 309
              */
310
-            private function _getSiteInfoWithCache( $bGenerateInfo=true ) {
310
+            private function _getSiteInfoWithCache( $bGenerateInfo = true ) {
311 311
                 
312
-                if ( ! $bGenerateInfo || isset( self::$_aSiteInfo ) ) {
312
+                if ( !$bGenerateInfo || isset( self::$_aSiteInfo ) ) {
313 313
                     return self::$_aSiteInfo;
314 314
                 }
315 315
                 self::$_aSiteInfo = self::_getSiteInfo();
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
                         'wp_remote_get()'                                           => $this->_getWPRemoteGetStatus(),
343 343
                         __( 'Multibite String Extension', 'admin-page-framework' )  => $this->getAOrB( function_exists( 'mb_detect_encoding' ), $this->oMsg->get( 'enabled' ), $this->oMsg->get( 'disabled' ) ),
344 344
                         __( 'WP_CONTENT_DIR Writeable', 'admin-page-framework' )    => $this->getAOrB( is_writable( WP_CONTENT_DIR ), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ), 
345
-                        __( 'Active Plugins', 'admin-page-framework' )              => PHP_EOL . $this->_getActivePlugins(),
346
-                        __( 'Network Active Plugins', 'admin-page-framework' )      => PHP_EOL . $this->_getNetworkActivePlugins(),
345
+                        __( 'Active Plugins', 'admin-page-framework' )              => PHP_EOL.$this->_getActivePlugins(),
346
+                        __( 'Network Active Plugins', 'admin-page-framework' )      => PHP_EOL.$this->_getNetworkActivePlugins(),
347 347
                         __( 'Constants', 'admin-page-framework' )                   => $this->_getDefinedConstants( 'user' ),
348 348
                     );                        
349 349
                 }
@@ -352,9 +352,9 @@  discard block
 block discarded – undo
352 352
                      * @since       3.5.12
353 353
                      * @return      stirng|array
354 354
                      */
355
-                    private function _getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
355
+                    private function _getDefinedConstants( $asCategories = null, $asRemovingCategories = null ) {
356 356
                         $_asConstants = $this->getDefinedConstants( $asCategories, $asRemovingCategories );
357
-                        if ( ! is_array( $_asConstants ) ) {
357
+                        if ( !is_array( $_asConstants ) ) {
358 358
                             return $_asConstants;
359 359
                         }
360 360
                         if ( isset( $_asConstants[ 'user' ] ) ) {
@@ -388,13 +388,13 @@  discard block
 block discarded – undo
388 388
                 private function _getActiveThemeName() {
389 389
                     
390 390
                     // If the WordPress version is less than 3.4,
391
-                    if ( version_compare( $GLOBALS['wp_version'], '3.4', '<' ) ) {
392
-                        $_aThemeData = get_theme_data( get_stylesheet_directory() . '/style.css' );
393
-                        return $_aThemeData['Name'] . ' ' . $_aThemeData['Version'];
391
+                    if ( version_compare( $GLOBALS[ 'wp_version' ], '3.4', '<' ) ) {
392
+                        $_aThemeData = get_theme_data( get_stylesheet_directory().'/style.css' );
393
+                        return $_aThemeData[ 'Name' ].' '.$_aThemeData[ 'Version' ];
394 394
                     } 
395 395
                     
396 396
                     $_oThemeData = wp_get_theme();
397
-                    return $_oThemeData->Name . ' ' . $_oThemeData->Version;
397
+                    return $_oThemeData->Name.' '.$_oThemeData->Version;
398 398
                     
399 399
                 }   
400 400
                 /**
@@ -407,10 +407,10 @@  discard block
 block discarded – undo
407 407
                     $_aPluginList       = array();
408 408
                     $_aActivePlugins    = get_option( 'active_plugins', array() );
409 409
                     foreach ( get_plugins() as $_sPluginPath => $_aPlugin ) {
410
-                        if ( ! in_array( $_sPluginPath, $_aActivePlugins ) ) {
410
+                        if ( !in_array( $_sPluginPath, $_aActivePlugins ) ) {
411 411
                             continue;
412 412
                         }
413
-                        $_aPluginList[] = '    ' . $_aPlugin['Name'] . ': ' . $_aPlugin['Version'];
413
+                        $_aPluginList[ ] = '    '.$_aPlugin[ 'Name' ].': '.$_aPlugin[ 'Version' ];
414 414
                     }
415 415
                     return implode( PHP_EOL, $_aPluginList );
416 416
                     
@@ -421,17 +421,17 @@  discard block
 block discarded – undo
421 421
                  */
422 422
                 private function _getNetworkActivePlugins() {
423 423
                     
424
-                    if ( ! is_multisite() ) {
424
+                    if ( !is_multisite() ) {
425 425
                         return '';
426 426
                     }
427 427
                     $_aPluginList       = array();
428 428
                     $_aActivePlugins    = get_site_option( 'active_sitewide_plugins', array() );
429 429
                     foreach ( wp_get_active_network_plugins() as $_sPluginPath ) {
430
-                        if ( ! array_key_exists( plugin_basename( $_sPluginPath ), $_aActivePlugins ) ) {
430
+                        if ( !array_key_exists( plugin_basename( $_sPluginPath ), $_aActivePlugins ) ) {
431 431
                             continue;
432 432
                         }
433 433
                         $_aPlugin       = get_plugin_data( $_sPluginPath );
434
-                        $_aPluginList[] = '    ' . $_aPlugin['Name'] . ' :' . $_aPlugin['Version'];
434
+                        $_aPluginList[ ] = '    '.$_aPlugin[ 'Name' ].' :'.$_aPlugin[ 'Version' ];
435 435
                     }
436 436
                     return implode( PHP_EOL, $_aPluginList );
437 437
                     
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
                     $_vResponse = false === $_vResponse
449 449
                         ? wp_remote_post( 
450 450
                             // 'https://www.paypal.com/cgi-bin/webscr', 
451
-                            add_query_arg( $_GET, admin_url( $GLOBALS['pagenow'] ) ),
451
+                            add_query_arg( $_GET, admin_url( $GLOBALS[ 'pagenow' ] ) ),
452 452
                             array(
453 453
                                 'sslverify'     => false,
454 454
                                 'timeout'       => 60,
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
                     $_vResponse = $this->getTransient( 'apf_rg_check' );
471 471
                     $_vResponse = false === $_vResponse
472 472
                         ? wp_remote_get( 
473
-                            add_query_arg( $_GET + array( 'apf_remote_request_test' => '_testing' ), admin_url( $GLOBALS['pagenow'] ) ),
473
+                            add_query_arg( $_GET + array( 'apf_remote_request_test' => '_testing' ), admin_url( $GLOBALS[ 'pagenow' ] ) ),
474 474
                             array(
475 475
                                 'sslverify'     => false,
476 476
                                 'timeout'       => 60,
@@ -494,10 +494,10 @@  discard block
 block discarded – undo
494 494
                         if ( is_wp_error( $mResponse ) ) {
495 495
                             return true;
496 496
                         }
497
-                        if ( $mResponse['response']['code'] < 200 ) {
497
+                        if ( $mResponse[ 'response' ][ 'code' ] < 200 ) {
498 498
                             return true;
499 499
                         }
500
-                        if ( $mResponse['response']['code'] >= 300 ) {
500
+                        if ( $mResponse[ 'response' ][ 'code' ] >= 300 ) {
501 501
                             return true;
502 502
                         }
503 503
                         return false;
@@ -514,13 +514,13 @@  discard block
 block discarded – undo
514 514
              * @since       3.4.6
515 515
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
516 516
              */
517
-            private function _getPHPInfo( $bGenerateInfo=true ) {
517
+            private function _getPHPInfo( $bGenerateInfo = true ) {
518 518
                 
519
-                if ( ! $bGenerateInfo || isset( self::$_aPHPInfo ) ) {
519
+                if ( !$bGenerateInfo || isset( self::$_aPHPInfo ) ) {
520 520
                     return self::$_aPHPInfo;
521 521
                 }
522 522
                 
523
-                $_oErrorReporting   = new AdminPageFramework_ErrorReporting;
523
+                $_oErrorReporting = new AdminPageFramework_ErrorReporting;
524 524
                 self::$_aPHPInfo = array(
525 525
                     __( 'Version', 'admin-page-framework' )                 => phpversion(),
526 526
                     __( 'Safe Mode', 'admin-page-framework' )               => $this->getAOrB( @ini_get( 'safe_mode' ), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ), 
@@ -531,16 +531,16 @@  discard block
 block discarded – undo
531 531
                     __( 'Max Execution Time', 'admin-page-framework' )      => @ini_get( 'max_execution_time' ),
532 532
                     __( 'Max Input Vars', 'admin-page-framework' )          => @ini_get( 'max_input_vars' ),
533 533
                     __( 'Argument Separator', 'admin-page-framework' )      => @ini_get( 'arg_separator.output' ),
534
-                    __( 'Allow URL File Open', 'admin-page-framework' )     => $this->getAOrB( @ini_get( 'allow_url_fopen' ),    $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
535
-                    __( 'Display Errors', 'admin-page-framework' )          => $this->getAOrB( @ini_get( 'display_errors' ),     $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
536
-                    __( 'Log Errors', 'admin-page-framework' )              => $this->getAOrB( @ini_get( 'log_errors' ),         $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
534
+                    __( 'Allow URL File Open', 'admin-page-framework' )     => $this->getAOrB( @ini_get( 'allow_url_fopen' ), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
535
+                    __( 'Display Errors', 'admin-page-framework' )          => $this->getAOrB( @ini_get( 'display_errors' ), $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
536
+                    __( 'Log Errors', 'admin-page-framework' )              => $this->getAOrB( @ini_get( 'log_errors' ), $this->oMsg->get( 'on' ), $this->oMsg->get( 'off' ) ),
537 537
                     __( 'Error log location', 'admin-page-framework' )      => @ini_get( 'error_log' ),
538 538
                     __( 'Error Reporting Level', 'admin-page-framework' )   => $_oErrorReporting->getErrorLevel(),
539
-                    __( 'FSOCKOPEN', 'admin-page-framework' )               => $this->getAOrB( function_exists( 'fsockopen' ),   $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
540
-                    __( 'cURL', 'admin-page-framework' )                    => $this->getAOrB( function_exists( 'curl_init' ),   $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
541
-                    __( 'SOAP', 'admin-page-framework' )                    => $this->getAOrB( class_exists( 'SoapClient' ),     $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
542
-                    __( 'SUHOSIN', 'admin-page-framework' )                 => $this->getAOrB( extension_loaded( 'suhosin' ),    $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
543
-                    'ini_set()'                                             => $this->getAOrB( function_exists( 'ini_set' ),     $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
539
+                    __( 'FSOCKOPEN', 'admin-page-framework' )               => $this->getAOrB( function_exists( 'fsockopen' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
540
+                    __( 'cURL', 'admin-page-framework' )                    => $this->getAOrB( function_exists( 'curl_init' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
541
+                    __( 'SOAP', 'admin-page-framework' )                    => $this->getAOrB( class_exists( 'SoapClient' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
542
+                    __( 'SUHOSIN', 'admin-page-framework' )                 => $this->getAOrB( extension_loaded( 'suhosin' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
543
+                    'ini_set()'                                             => $this->getAOrB( function_exists( 'ini_set' ), $this->oMsg->get( 'supported' ), $this->oMsg->get( 'not_supported' ) ),
544 544
                 ) 
545 545
                 + $this->getPHPInfo()
546 546
                 + array( 
@@ -557,11 +557,11 @@  discard block
 block discarded – undo
557 557
              * @since       3.4.6
558 558
              * @since       3.5.3       Added the $bGenerateInfo paramter. This is to reduce conditional statment in the caller method.
559 559
              */                      
560
-            private function _getWebServerInfo( $bGenerateInfo=true ) {
560
+            private function _getWebServerInfo( $bGenerateInfo = true ) {
561 561
                         
562 562
                 return $bGenerateInfo 
563 563
                     ? array(
564
-                        __( 'Web Server', 'admin-page-framework' )                  => $_SERVER['SERVER_SOFTWARE'],
564
+                        __( 'Web Server', 'admin-page-framework' )                  => $_SERVER[ 'SERVER_SOFTWARE' ],
565 565
                         'SSL'                                                       => $this->getAOrB( is_ssl(), $this->oMsg->get( 'yes' ), $this->oMsg->get( 'no' ) ),
566 566
                         __( 'Session', 'admin-page-framework' )                     => $this->getAOrB( isset( $_SESSION ), $this->oMsg->get( 'enabled' ), $this->oMsg->get( 'disabled' ) ),
567 567
                         __( 'Session Name', 'admin-page-framework' )                => esc_html( @ini_get( 'session.name' ) ),
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      *     <li>**attributes** - (optional, array) [3.3.0+] attribute argument array. `array( 'async' => '', 'data-id' => '...' )`</li>
95 95
      * </ul>     
96 96
      */
97
-    protected function getEnqueuingScripts() { 
97
+    protected function getEnqueuingScripts() {
98 98
         return array();
99 99
     }
100 100
     
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      *     <li><strong>media</strong> - ( optional, string ) the description of the field which is inserted into the after the input field tag.</li>
111 111
      * </ul>
112 112
      */
113
-    protected function getEnqueuingStyles() { 
113
+    protected function getEnqueuingStyles() {
114 114
         return array();
115 115
     }            
116 116
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     /**
119 119
      * Returns the field type specific JavaScript script.
120 120
      */ 
121
-    protected function getScripts() { 
121
+    protected function getScripts() {
122 122
         return '';
123 123
     }
124 124
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     /**
160 160
      * Returns the output of the field type.
161 161
      */
162
-    protected function getField( $aField ) { 
162
+    protected function getField( $aField ) {
163 163
 
164 164
         $_aInputAttributes           = $aField['attributes'];
165 165
         $_aInputAttributes['class'] .= ' system';
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_taxonomy.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -426,7 +426,7 @@
 block discarded – undo
426 426
              * 
427 427
              * @since   2.0.0
428 428
              * @param   array   $vValue This can be either an one-dimensional array ( for single field ) or a two-dimensional array ( for multiple fields ).
429
-             * @param   string  $sKey     
429
+             * @param string $sTaxonomySlug
430 430
              * @return  array   Returns an numerically indexed array holding the keys that yield true as the value.
431 431
              */ 
432 432
             private function _getSelectedKeyArray( $vValue, $sTaxonomySlug ) {
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Defines the field type slugs used for this field type.
23 23
      */
24
-    public $aFieldTypeSlugs = array( 'taxonomy', );
24
+    public $aFieldTypeSlugs = array( 'taxonomy',);
25 25
     
26 26
     /**
27 27
      * Defines the default key-values of this field type. 
@@ -29,40 +29,40 @@  discard block
 block discarded – undo
29 29
      * @remark  $_aDefaultKeys holds shared default key-values defined in the base class.
30 30
      */
31 31
     protected $aDefaultKeys = array(
32
-        'taxonomy_slugs'        => 'category',      // (array|string) This is for the taxonomy field type.
33
-        'height'                => '250px',         // the tab box height
34
-        'width'                 => null,            // 3.5.7.2+ the tab box width
35
-        'max_width'             => '100%',          // for the taxonomy checklist field type, since 2.1.1.     
36
-        'show_post_count'       => true,            // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not.
32
+        'taxonomy_slugs'        => 'category', // (array|string) This is for the taxonomy field type.
33
+        'height'                => '250px', // the tab box height
34
+        'width'                 => null, // 3.5.7.2+ the tab box width
35
+        'max_width'             => '100%', // for the taxonomy checklist field type, since 2.1.1.     
36
+        'show_post_count'       => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not.
37 37
         'attributes'            => array(),    
38
-        'select_all_button'     => true,            // (boolean|string) 3.3.0+ to change the label, set the label here
39
-        'select_none_button'    => true,            // (boolean|string) 3.3.0+ to change the label, set the label here                
40
-        'label_no_term_found'   => null,            // (string) 3.3.2+  The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method.
41
-        'label_list_title'      => '',              // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts.
38
+        'select_all_button'     => true, // (boolean|string) 3.3.0+ to change the label, set the label here
39
+        'select_none_button'    => true, // (boolean|string) 3.3.0+ to change the label, set the label here                
40
+        'label_no_term_found'   => null, // (string) 3.3.2+  The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method.
41
+        'label_list_title'      => '', // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts.
42 42
         'query'                 => array(       // (array)  3.3.2+ Defines the default query argument.
43 43
             // see the arguments of the get_category() function: http://codex.wordpress.org/Function_Reference/get_categories
44 44
             // see the argument of the get_terms() function: http://codex.wordpress.org/Function_Reference/get_terms        
45 45
             'child_of'          => 0,
46 46
             'parent'            => '',
47
-            'orderby'           => 'name',      // (string) 'ID' or 'term_id' or 'name'
48
-            'order'             => 'ASC',       // (string) 'ASC' or 'DESC'
49
-            'hide_empty'        => false,       // (boolean) whether to show the terms with no post associated. Default: false
50
-            'hierarchical'      => true,        // (boolean) whether to show the terms as a hierarchical tree.
51
-            'number'            => '',          // (integer) The maximum number of the terms to show.
52
-            'pad_counts'        => false,       // (boolean) whether to sum up the post counts with the child post counts.
53
-            'exclude'           => array(),     // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list.
47
+            'orderby'           => 'name', // (string) 'ID' or 'term_id' or 'name'
48
+            'order'             => 'ASC', // (string) 'ASC' or 'DESC'
49
+            'hide_empty'        => false, // (boolean) whether to show the terms with no post associated. Default: false
50
+            'hierarchical'      => true, // (boolean) whether to show the terms as a hierarchical tree.
51
+            'number'            => '', // (integer) The maximum number of the terms to show.
52
+            'pad_counts'        => false, // (boolean) whether to sum up the post counts with the child post counts.
53
+            'exclude'           => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list.
54 54
             'exclude_tree'      => array(), 
55
-            'include'           => array(),     // (string) Comma separated term IDs to include in the list.
55
+            'include'           => array(), // (string) Comma separated term IDs to include in the list.
56 56
             'fields'            => 'all', 
57 57
             'slug'              => '', 
58 58
             'get'               => '', 
59 59
             'name__like'        => '',
60 60
             'description__like' => '',
61 61
             'offset'            => '', 
62
-            'search'            => '',          // (string) The search keyword to get the term with.
62
+            'search'            => '', // (string) The search keyword to get the term with.
63 63
             'cache_domain'      => 'core',
64 64
         ),
65
-        'queries'   => array(),         // (optional, array) 3.3.2+  Allows to set a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array.
65
+        'queries'   => array(), // (optional, array) 3.3.2+  Allows to set a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array.
66 66
     );
67 67
     
68 68
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         $_aJSArray = json_encode( $this->aFieldTypeSlugs );
90 90
         
91
-        return parent::getScripts() . 
91
+        return parent::getScripts(). 
92 92
         // return 
93 93
 <<<JAVASCRIPTS
94 94
 /* For tabs */
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     protected function getField( $aField ) {
322 322
         
323 323
         // Format
324
-        $aField['label_no_term_found'] = $this->getElement( 
324
+        $aField[ 'label_no_term_found' ] = $this->getElement( 
325 325
             $aField, 
326 326
             'label_no_term_found', 
327 327
             $this->oMsg->get( 'no_term_found' ) 
@@ -330,18 +330,18 @@  discard block
 block discarded – undo
330 330
         // Parse
331 331
         $_aTabs         = array();
332 332
         $_aCheckboxes   = array();      
333
-        foreach( $this->getAsArray( $aField['taxonomy_slugs'] ) as $sKey => $sTaxonomySlug ) {
334
-            $_aTabs[]        = $this->_getTaxonomyTab( $aField, $sKey, $sTaxonomySlug );    
335
-            $_aCheckboxes[]  = $this->_getTaxonomyCheckboxes( $aField, $sKey, $sTaxonomySlug );
333
+        foreach ( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $sKey => $sTaxonomySlug ) {
334
+            $_aTabs[ ]        = $this->_getTaxonomyTab( $aField, $sKey, $sTaxonomySlug );    
335
+            $_aCheckboxes[ ]  = $this->_getTaxonomyCheckboxes( $aField, $sKey, $sTaxonomySlug );
336 336
         }
337 337
 
338 338
         // Output
339
-        return "<div id='tabbox-{$aField['field_id']}' class='tab-box-container categorydiv' style='max-width:{$aField['max_width']};'>"
339
+        return "<div id='tabbox-{$aField[ 'field_id' ]}' class='tab-box-container categorydiv' style='max-width:{$aField[ 'max_width' ]};'>"
340 340
                 . "<ul class='tab-box-tabs category-tabs'>" 
341 341
                     . implode( PHP_EOL, $_aTabs ) 
342 342
                 . "</ul>" 
343 343
                 . "<div class='tab-box-contents-container'>"
344
-                    . "<div class='tab-box-contents' style='height: {$aField['height']};'>"
344
+                    . "<div class='tab-box-contents' style='height: {$aField[ 'height' ]};'>"
345 345
                         . implode( PHP_EOL, $_aCheckboxes )
346 346
                     . "</div>"
347 347
                 . "</div>" 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         private function _getTaxonomyCheckboxes( array $aField, $sKey, $sTaxonomySlug ) {
359 359
             
360 360
             $_aTabBoxContainerArguments = array(
361
-                'id'    => "tab_{$aField['input_id']}_{$sKey}",
361
+                'id'    => "tab_{$aField[ 'input_id' ]}_{$sKey}",
362 362
                 'class' => 'tab-box-content',
363 363
                 'style' => $this->generateInlineCSS(
364 364
                     array(
@@ -367,9 +367,9 @@  discard block
 block discarded – undo
367 367
                     )
368 368
                 ),
369 369
             );
370
-            return "<div " . $this->getAttributes( $_aTabBoxContainerArguments ) . ">"
370
+            return "<div ".$this->getAttributes( $_aTabBoxContainerArguments ).">"
371 371
                     . $this->getElement( $aField, array( 'before_label', $sKey ) )
372
-                    . "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . "></div>"
372
+                    . "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) )."></div>"
373 373
                     . "<ul class='list:category taxonomychecklist form-no-clear'>"
374 374
                         . $this->_getTaxonomyChecklist( $aField, $sKey, $sTaxonomySlug )
375 375
                     . "</ul>"     
@@ -389,23 +389,23 @@  discard block
 block discarded – undo
389 389
                     array(
390 390
                         'walker'                => new AdminPageFramework_WalkerTaxonomyChecklist, // the walker class instance
391 391
                         'taxonomy'              => $sTaxonomySlug, 
392
-                        '_name_prefix'          => is_array( $aField['taxonomy_slugs'] ) 
393
-                            ? "{$aField['_input_name']}[{$sTaxonomySlug}]" 
394
-                            : $aField['_input_name'],   // name prefix of the input
395
-                        '_input_id_prefix'      => $aField['input_id'],
392
+                        '_name_prefix'          => is_array( $aField[ 'taxonomy_slugs' ] ) 
393
+                            ? "{$aField[ '_input_name' ]}[{$sTaxonomySlug}]" 
394
+                            : $aField[ '_input_name' ], // name prefix of the input
395
+                        '_input_id_prefix'      => $aField[ 'input_id' ],
396 396
                         '_attributes'           => $this->getElement( 
397 397
                             $aField, 
398 398
                             array( 'attributes', $sKey ), 
399 399
                             array() 
400
-                        ) + $aField['attributes'],                 
400
+                        ) + $aField[ 'attributes' ],                 
401 401
                         
402 402
                         // checked items ( term IDs ) e.g.  array( 6, 10, 7, 15 ), 
403
-                        '_selected_items'       => $this->_getSelectedKeyArray( $aField['value'], $sTaxonomySlug ),
403
+                        '_selected_items'       => $this->_getSelectedKeyArray( $aField[ 'value' ], $sTaxonomySlug ),
404 404
                         
405
-                        'echo'                  => false,  // returns the output
406
-                        'show_post_count'       => $aField['show_post_count'],      // 3.2.0+
407
-                        'show_option_none'      => $aField['label_no_term_found'],  // 3.3.2+ 
408
-                        'title_li'              => $aField['label_list_title'],     // 3.3.2+
405
+                        'echo'                  => false, // returns the output
406
+                        'show_post_count'       => $aField[ 'show_post_count' ], // 3.2.0+
407
+                        'show_option_none'      => $aField[ 'label_no_term_found' ], // 3.3.2+ 
408
+                        'title_li'              => $aField[ 'label_list_title' ], // 3.3.2+
409 409
                     ) 
410 410
                     + $this->getAsArray( 
411 411
                         $this->getElement( 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
                         ), 
416 416
                         true 
417 417
                     )
418
-                    + $aField['query']                             
418
+                    + $aField[ 'query' ]                             
419 419
                 );
420 420
             }
421 421
      
@@ -433,10 +433,10 @@  discard block
 block discarded – undo
433 433
 
434 434
                 $vValue = ( array ) $vValue; // cast array because the initial value (null) may not be an array.
435 435
                 
436
-                if ( ! isset( $vValue[ $sTaxonomySlug ] ) ) { 
436
+                if ( !isset( $vValue[ $sTaxonomySlug ] ) ) { 
437 437
                     return array(); 
438 438
                 }
439
-                if ( ! is_array( $vValue[ $sTaxonomySlug ] ) ) { 
439
+                if ( !is_array( $vValue[ $sTaxonomySlug ] ) ) { 
440 440
                     return array(); 
441 441
                 }
442 442
                 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
          */
453 453
         private function _getTaxonomyTab( array $aField, $sKey, $sTaxonomySlug ) {
454 454
             return "<li class='tab-box-tab'>"
455
-                    . "<a href='#tab_{$aField['input_id']}_{$sKey}'>"
455
+                    . "<a href='#tab_{$aField[ 'input_id' ]}_{$sKey}'>"
456 456
                         . "<span class='tab-box-tab-text'>" 
457 457
                             . $this->_getLabelFromTaxonomySlug( $sTaxonomySlug )
458 458
                         . "</span>"
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -433,10 +433,10 @@
 block discarded – undo
433 433
 
434 434
                 $vValue = ( array ) $vValue; // cast array because the initial value (null) may not be an array.
435 435
                 
436
-                if ( ! isset( $vValue[ $sTaxonomySlug ] ) ) { 
436
+                if ( ! isset( $vValue[ $sTaxonomySlug ] ) ) {
437 437
                     return array(); 
438 438
                 }
439
-                if ( ! is_array( $vValue[ $sTaxonomySlug ] ) ) { 
439
+                if ( ! is_array( $vValue[ $sTaxonomySlug ] ) ) {
440 440
                     return array(); 
441 441
                 }
442 442
                 
Please login to merge, or discard this patch.
development/factory/_abstract/form/input/AdminPageFramework_Input_Base.php 4 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,10 +105,8 @@
 block discarded – undo
105 105
      * If a parameter is not passed, it returns the entire attribute array.
106 106
      * 
107 107
      * @since       3.5.3
108
-     * @return      string|array|null        The specified attribute value or the entire attribute array if not specified. 
108
+     * @return      string        The specified attribute value or the entire attribute array if not specified. 
109 109
      * If not set, null will be returned as the `getAttributes()` method will not list an attribute with the null value.
110
-     * @param       string      $sName      The attribute name.
111
-     * @param       string      $sDefault   The defaqult value if the value is not set.
112 110
      */
113 111
     public function getAttribute( /* $sName=null, $sDefault=null */ ) {
114 112
         $_aParams = func_get_args() + array(
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+     * Admin Page Framework
4
+     * 
5
+     * http://en.michaeluno.jp/admin-page-framework/
6
+     * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+     * 
8
+     */
9 9
 
10 10
 /**
11 11
  * The base class of form input classes that return outputs of input form elements.
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
      * @param       array       $aAttributes    The attribute array. A field definition array is deprecated.
64 64
      * @param       array       $aOptions       options that allows to set custom container tags and class selctors.
65 65
      */
66
-    public function __construct( array $aAttributes, array $aOptions=array() ) {
66
+    public function __construct( array $aAttributes, array $aOptions = array() ) {
67 67
 
68
-        $this->aAttributes  = $this->getElementAsArray( 
68
+        $this->aAttributes = $this->getElementAsArray( 
69 69
             $aAttributes, 
70 70
             'attributes', 
71 71
             $aAttributes    // if the above key is not set, this will be set
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
      * @return      string      The set class selector(s).
128 128
      */
129 129
     public function addClass( /* $asSelectors1, $asSelectors2 */ ) {
130
-        foreach( func_get_args() as $_asSelectors ) {            
131
-            $this->aAttributes['class'] = $this->getClassAttribute( 
132
-                $this->aAttributes['class'],
130
+        foreach ( func_get_args() as $_asSelectors ) {            
131
+            $this->aAttributes[ 'class' ] = $this->getClassAttribute( 
132
+                $this->aAttributes[ 'class' ],
133 133
                 $_asSelectors
134 134
             );
135 135
         }
136
-        return $this->aAttributes['class'];
136
+        return $this->aAttributes[ 'class' ];
137 137
     }
138 138
     
139 139
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         // $this->aAttributes[ $_aParams[ 0 ] ] = $_aParams[ 1 ];
159 159
         $this->setMultiDimensionalArray(
160 160
             $this->aAttributes, 
161
-            $this->getElementAsArray( $_aParams, 0 ),   // $asAttributeName
161
+            $this->getElementAsArray( $_aParams, 0 ), // $asAttributeName
162 162
             $_aParams[ 1 ]  // $mValue
163 163
         );
164 164
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
      * @return      string      The set class selector(s).
128 128
      */
129 129
     public function addClass( /* $asSelectors1, $asSelectors2 */ ) {
130
-        foreach( func_get_args() as $_asSelectors ) {            
130
+        foreach( func_get_args() as $_asSelectors ) {
131 131
             $this->aAttributes['class'] = $this->getClassAttribute( 
132 132
                 $this->aAttributes['class'],
133 133
                 $_asSelectors
Please login to merge, or discard this patch.
factory/_abstract/form/input/AdminPageFramework_Input_checkbox.php 3 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,6 @@
 block discarded – undo
21 21
      * Returns the output of the input element.
22 22
      * 
23 23
      * @since       3.4.0    
24
-     * @param       string      $sLabel         The label text.
25
-     * @param       array       $aAttributes    (optional) The attribute array. If set, it will be merged with the attribute set in the constructor.
26 24
      */    
27 25
     public function get( /* $sLabel, $aAttributes=array() */ ) {
28 26
         
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
         // Output
48 48
         return 
49
-           "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
49
+            "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
50 50
                 // the unchecked value must be set prior to the checkbox input field.
51 51
                 . "<input " . $this->getAttributes( 
52 52
                     array(
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
     public function get( /* $sLabel, $aAttributes=array() */ ) {
28 28
         
29 29
         // Parameters
30
-        $_aParams       = func_get_args() + array( 
31
-            0 => '',            // 1st parameter
30
+        $_aParams = func_get_args() + array( 
31
+            0 => '', // 1st parameter
32 32
             1 => array()        // 2nd parameter
33 33
         );
34
-        $_sLabel        = $_aParams[ 0 ];       // first parameter
34
+        $_sLabel        = $_aParams[ 0 ]; // first parameter
35 35
 
36 36
         // Attributes
37 37
         $_aAttributes   = $this->uniteArrays(   // second parameter
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 
47 47
         // Output
48 48
         return 
49
-           "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
49
+           "<{$this->aOptions[ 'input_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ).">"
50 50
                 // the unchecked value must be set prior to the checkbox input field.
51
-                . "<input " . $this->getAttributes( 
51
+                . "<input ".$this->getAttributes( 
52 52
                     array(
53 53
                         'type'      => 'hidden',
54 54
                         'class'     => $_aAttributes[ 'class' ],
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
                     ) 
58 58
                 ) 
59 59
                 . " />"
60
-                . "<input " . $this->getAttributes( $_aAttributes ) . " />" 
60
+                . "<input ".$this->getAttributes( $_aAttributes )." />" 
61 61
             . "</{$this->aOptions[ 'input_container_tag' ]}>"
62
-            . "<{$this->aOptions[ 'label_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ) . ">"
62
+            . "<{$this->aOptions[ 'label_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ).">"
63 63
                 . $_sLabel
64 64
             . "</{$this->aOptions[ 'label_container_tag' ]}>"
65 65
         ;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function getAttributesByKey( /* $sKey */ ) {
76 76
         
77 77
         // Parameters
78
-        $_aParams       = func_get_args() + array( 0 => '', );
78
+        $_aParams       = func_get_args() + array( 0 => '',);
79 79
         $_sKey          = $_aParams[ 0 ];        
80 80
         $_bIsMultiple   = '' !== $_sKey;
81 81
         
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
             // 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.
88 88
             + array(
89 89
                 'type'      => 'checkbox', 
90
-                'id'        => $this->aAttributes[ 'id' ] . '_' . $_sKey,
90
+                'id'        => $this->aAttributes[ 'id' ].'_'.$_sKey,
91 91
                 'checked'   => $this->_getCheckedAttributeValue( $_sKey ),
92
-                '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.
92
+                '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.
93 93
                 'name'      => $_bIsMultiple 
94 94
                     ? "{$this->aAttributes[ 'name' ]}[{$_sKey}]" 
95 95
                     : $this->aAttributes[ 'name' ],
96
-                'data-id'   => $this->aAttributes[ 'id' ],       // referenced by the JavaScript scripts such as the revealer script.
96
+                'data-id'   => $this->aAttributes[ 'id' ], // referenced by the JavaScript scripts such as the revealer script.
97 97
             )
98 98
             + $this->aAttributes
99 99
             ;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 : array( 'value', $_sKey );
111 111
             return $this->getElement( $this->aAttributes, $_aValueDimension )
112 112
                 ? 'checked' 
113
-                : null;    // to not to set, pass null. An empty value '' will still set the attribute.            
113
+                : null; // to not to set, pass null. An empty value '' will still set the attribute.            
114 114
         
115 115
         }
116 116
         
Please login to merge, or discard this patch.