Completed
Branch dev (7f54de)
by Michael
05:04
created
form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php 4 patches
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.
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.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -127,16 +127,16 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function get() {
129 129
         
130
-        $_oFormatSectionsetsByTab  = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
130
+        $_oFormatSectionsetsByTab = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
131 131
             $this->aStructure[ 'sectionsets' ],
132 132
             $this->aStructure[ 'fieldsets' ],
133 133
             $this->aArguments[ 'nested_depth' ]
134 134
         );
135 135
 
136
-        $_aOutput     = array();
137
-        foreach( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
136
+        $_aOutput = array();
137
+        foreach ( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
138 138
 
139
-            $_aOutput[] = $this->_getFormOutput(
139
+            $_aOutput[ ] = $this->_getFormOutput(
140 140
                 $_oFormatSectionsetsByTab->getSectionsets( $_sSectionTabSlug ),
141 141
                 $_oFormatSectionsetsByTab->getFieldsets( $_sSectionTabSlug ),
142 142
                 $_sSectionTabSlug,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         // Generate id for this output
152 152
         $_sOutput = implode( PHP_EOL, $_aOutput );
153
-        $_sElementID = "admin-page-framework-sectionsets-" . uniqid();
153
+        $_sElementID = "admin-page-framework-sectionsets-".uniqid();
154 154
         return $this->_getSpinnerOutput( $_sOutput )
155 155
             .   "<div id='{$_sElementID}' class='admin-page-framework-sctionsets admin-page-framework-form-js-on'>"
156 156
                 . $_sOutput
@@ -185,17 +185,17 @@  discard block
 block discarded – undo
185 185
 
186 186
             // A sectionset is a set of sections.
187 187
             $_sSectionSet = $this->_getSectionsetsTables( 
188
-                $aSectionsets,  // section-set definition (already divided by section tab)
189
-                $aFieldsets,    // field-set definitions (already divided by section tab)
188
+                $aSectionsets, // section-set definition (already divided by section tab)
189
+                $aFieldsets, // field-set definitions (already divided by section tab)
190 190
                 $aCallbacks
191 191
             );
192 192
             return $_sSectionSet
193
-                ? "<div " . $this->getAttributes(
193
+                ? "<div ".$this->getAttributes(
194 194
                         array(
195 195
                             'class' => 'admin-page-framework-sectionset',
196
-                            'id'    => "sectionset-{$sSectionTabSlug}_" . md5( serialize( $aSectionsets ) ),
196
+                            'id'    => "sectionset-{$sSectionTabSlug}_".md5( serialize( $aSectionsets ) ),
197 197
                         ) 
198
-                    ) . ">"
198
+                    ).">"
199 199
                         . $_sSectionSet
200 200
                     . "</div>"
201 201
                 : '';
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
              * If there is no field overall to the section and its section tab, return an empty string.
228 228
              * Otherwise, the sectionsets container gets rendered and its CSS rules such as margins give unwanted results.
229 229
              */
230
-            if ( ! count( $aFieldsets ) ) {
230
+            if ( !count( $aFieldsets ) ) {
231 231
                 return ''; 
232 232
             }
233 233
 
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
             );
240 240
             $_sSectionTabSlug   = $_aFirstSectionset[ 'section_tab_slug' ];
241 241
             $_sThisSectionID    = $_aFirstSectionset[ 'section_id' ];
242
-            $_sSectionsID       = 'sections-' . $_sThisSectionID;
242
+            $_sSectionsID       = 'sections-'.$_sThisSectionID;
243 243
             $_aCollapsible      = $this->_getCollapsibleArgumentForSections( 
244 244
                 $_aFirstSectionset 
245 245
             );
246 246
                         
247
-            foreach( $aSectionsets as $_aSectionset ) {
248
-                $_aOutputs          = $this->_getSectionsetTable(
247
+            foreach ( $aSectionsets as $_aSectionset ) {
248
+                $_aOutputs = $this->_getSectionsetTable(
249 249
                     $_aOutputs,
250 250
                     $_sSectionsID,
251 251
                     $_aSectionset,
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
              * Changed the visibility scope to private. Changed the 1st parameter from `$aSection`.
274 274
              * @return      array
275 275
              */
276
-            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {  
276
+            private function _getCollapsibleArgumentForSections( array $aSectionset = array() ) {  
277 277
                 
278 278
                 $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection(
279 279
                     $aSectionset[ 'collapsible' ],
@@ -301,19 +301,19 @@  discard block
 block discarded – undo
301 301
              */
302 302
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
303 303
             
304
-                if ( ! $this->isSectionsetVisible( $_aSection ) ) {
304
+                if ( !$this->isSectionsetVisible( $_aSection ) ) {
305 305
                     return $_aOutputs;
306 306
                 }
307 307
 
308 308
                 // If the 'save' argument is false, insert a flag that disables saving the section inputs.
309
-                $_aOutputs[ 'section_contents' ][] = $this->_getUnsetFlagSectionInputTag( $_aSection );
309
+                $_aOutputs[ 'section_contents' ][ ] = $this->_getUnsetFlagSectionInputTag( $_aSection );
310 310
                 
311 311
                 // For repeatable sections - sub-sections are divided field definition arrays by sub-section index, 
312 312
                 // not section definition arrays.
313
-                $_aSubSections      = $this->getIntegerKeyElements( 
313
+                $_aSubSections = $this->getIntegerKeyElements( 
314 314
                     $this->getElementAsArray(
315 315
                         $aFieldsInSections, // subject array
316
-                        $_aSection[ '_section_path' ],  // dimensional path
316
+                        $_aSection[ '_section_path' ], // dimensional path
317 317
                         array() // default
318 318
                     )
319 319
                 );
@@ -356,28 +356,28 @@  discard block
 block discarded – undo
356 356
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
357 357
 
358 358
                     // Add the repeatable sections enabler script.
359
-                    if ( ! empty( $_aSection[ 'repeatable' ] ) ) {
360
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( 
359
+                    if ( !empty( $_aSection[ 'repeatable' ] ) ) {
360
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( 
361 361
                             $_sSectionsID, 
362 362
                             $_aOutputs[ 'count_subsections' ], 
363 363
                             $_aSection[ 'repeatable' ],
364 364
                             $this->oMsg
365 365
                         );
366
-                        $_aOutputs[ 'section_contents' ][] = $this->_getRepeatableSectionFlagTag( $_aSection );
366
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getRepeatableSectionFlagTag( $_aSection );
367 367
                     }
368 368
                     // Add the sortable sections enabler script. 3.6.0+
369
-                    if ( ! empty( $_aSection[ 'sortable' ] ) ) {
370
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
369
+                    if ( !empty( $_aSection[ 'sortable' ] ) ) {
370
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
371 371
                             $_sSectionsID, 
372 372
                             $_aSection[ 'sortable' ],
373 373
                             $this->oMsg
374 374
                         );
375
-                        $_aOutputs[ 'section_contents' ][] = $this->_getSortableSectionFlagTag( $_aSection );
375
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getSortableSectionFlagTag( $_aSection );
376 376
                     }
377 377
                     
378 378
                     // Get the section tables.
379 379
                     $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well.
380
-                    foreach( $_aSubSections as $_iIndex => $_aFields ) { 
380
+                    foreach ( $_aSubSections as $_iIndex => $_aFields ) { 
381 381
 
382 382
                         $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection(
383 383
                             $_aSection,
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
                         array(
408 408
                             'class'                     => 'element-address',
409 409
                             'type'                      => 'hidden',
410
-                            'name'                      => '__repeatable_elements_' . $aSection[ '_structure_type' ] 
411
-                                . '[' . $aSection[ 'section_id' ] . ']',
410
+                            'name'                      => '__repeatable_elements_'.$aSection[ '_structure_type' ] 
411
+                                . '['.$aSection[ 'section_id' ].']',
412 412
                             // @todo examine whether this value should include a section index.
413 413
                             'value' => $aSection[ 'section_id' ],                            
414 414
                         )
@@ -426,8 +426,8 @@  discard block
 block discarded – undo
426 426
                         array(
427 427
                             'class'                     => 'element-address',
428 428
                             'type'                      => 'hidden',
429
-                            'name'                      => '__sortable_elements_' . $aSection[ '_structure_type' ] 
430
-                                . '[' . $aSection[ 'section_id' ] . ']',
429
+                            'name'                      => '__sortable_elements_'.$aSection[ '_structure_type' ] 
430
+                                . '['.$aSection[ 'section_id' ].']',
431 431
                             // @todo examine whether this value should include a section index.
432 432
                             'value' => $aSection[ 'section_id' ],                            
433 433
                         )
@@ -449,8 +449,8 @@  discard block
 block discarded – undo
449 449
                         'input',
450 450
                         array(
451 451
                             'type'  => 'hidden',
452
-                            'name'  => '__unset_' .  $aSection[ '_structure_type' ] . '[' . $aSection[ 'section_id' ] . ']',
453
-                            'value' => "__dummy_option_key|" . $aSection[ 'section_id' ],
452
+                            'name'  => '__unset_'.$aSection[ '_structure_type' ].'['.$aSection[ 'section_id' ].']',
453
+                            'value' => "__dummy_option_key|".$aSection[ 'section_id' ],
454 454
                             'class' => 'unset-element-names element-address',
455 455
                         )
456 456
                     );            
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                 private function _getSectionTableWithTabList( array $_aOutputs, array $aSectionset, $aFieldsetsPerSection ) {
467 467
                                         
468 468
                     // Tab list
469
-                    $_aOutputs[ 'section_tab_list' ][] = $this->_getTabList( 
469
+                    $_aOutputs[ 'section_tab_list' ][ ] = $this->_getTabList( 
470 470
                         $aSectionset, 
471 471
                         $aFieldsetsPerSection, 
472 472
                         $this->aCallbacks[ 'fieldset_output' ]
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 
475 475
                     // Section container
476 476
                     $_oSectionTable = new AdminPageFramework_Form_View___Section(
477
-                        $this->aArguments,  // for nested sections
477
+                        $this->aArguments, // for nested sections
478 478
                         $aSectionset,
479 479
                         $this->aStructure,
480 480
                         $aFieldsetsPerSection,
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
                         $this->aCallbacks,
485 485
                         $this->oMsg
486 486
                     );
487
-                    $_aOutputs[ 'section_contents' ][] = $_oSectionTable->get();                    
487
+                    $_aOutputs[ 'section_contents' ][ ] = $_oSectionTable->get();                    
488 488
                    
489 489
                     return $_aOutputs;
490 490
                  
@@ -512,9 +512,9 @@  discard block
 block discarded – undo
512 512
                         'section_index'     => null,
513 513
                         'collapsible'       => $aCollapsible,
514 514
                         'container_type'    => 'sections', // section or sections                    
515
-                        'sectionset'        => $aSectionset,    // 3.7.0+ for tooltip
515
+                        'sectionset'        => $aSectionset, // 3.7.0+ for tooltip
516 516
                     ),
517
-                    array(),            // fieldsets
517
+                    array(), // fieldsets
518 518
                     $this->aSavedData,   
519 519
                     $this->aFieldErrors, 
520 520
                     $this->aStructure[ 'field_type_definitions' ], 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                     $aOutputs[ 'count_subsections' ]
532 532
                 );
533 533
                 return $_oCollapsibleSectionTitle->get()
534
-                    . "<div " . $_oSectionsTablesContainerAttributes->get() . ">"
534
+                    . "<div ".$_oSectionsTablesContainerAttributes->get().">"
535 535
                         . $this->_getSectionTabList( $sSectionTabSlug, $aOutputs[ 'section_tab_list' ] )
536 536
                         . implode( PHP_EOL, $aOutputs[ 'section_contents' ] )
537 537
                     . "</div>";
@@ -562,21 +562,21 @@  discard block
 block discarded – undo
562 562
              */
563 563
             private function _getTabList( array $aSection, array $aFields, $hfFieldCallback ) {
564 564
                                 
565
-                if ( ! $aSection[ 'section_tab_slug' ] ) {
565
+                if ( !$aSection[ 'section_tab_slug' ] ) {
566 566
                     return '';
567 567
                 }
568 568
                 
569 569
                 $iSectionIndex      = $aSection[ '_index' ];
570 570
 
571
-                $_sSectionTagID     = 'section-' . $aSection[ 'section_id' ] . '__' . $iSectionIndex;
571
+                $_sSectionTagID     = 'section-'.$aSection[ 'section_id' ].'__'.$iSectionIndex;
572 572
                 $_aTabAttributes    = $aSection[ 'attributes' ][ 'tab' ]
573 573
                     + array(
574 574
                         'class' => 'admin-page-framework-section-tab nav-tab',
575 575
                         'id'    => "section_tab-{$_sSectionTagID}",
576 576
                         'style' => null
577 577
                     );
578
-                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] );  // 3.3.1+
579
-                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null );  // 3.3.1+
578
+                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+
579
+                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+
580 580
                 
581 581
                 $_oSectionTitle = new AdminPageFramework_Form_View___SectionTitle(                    
582 582
                     array(
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
                         'tag'           => 'h4',
585 585
                         'section_index' => $iSectionIndex,
586 586
                         
587
-                        'sectionset'    => $aSection,   // 3.7.0+      for tooltip
587
+                        'sectionset'    => $aSection, // 3.7.0+      for tooltip
588 588
                     ),
589 589
                     $aFields,            
590 590
                     $this->aSavedData,   
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
                     $this->aCallbacks // field output element callables.                    
595 595
                 );                        
596 596
                 
597
-                return "<li " . $this->getAttributes( $_aTabAttributes ) . ">"
597
+                return "<li ".$this->getAttributes( $_aTabAttributes ).">"
598 598
                     . "<a href='#{$_sSectionTagID}'>"
599 599
                         . $_oSectionTitle->get()
600 600
                     ."</a>"
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,6 +165,7 @@  discard block
 block discarded – undo
165 165
     }
166 166
         /**
167 167
          * @since       3.7.0
168
+         * @param string $_sOutput
168 169
          * @return      string
169 170
          */
170 171
         private function _getSpinnerOutput( $_sOutput ) {
@@ -299,7 +300,7 @@  discard block
 block discarded – undo
299 300
              * @param       array       $_aOutputs      Holds output elements - contents, section tab list, count of subsections.
300 301
              * @param       string      $_sSectionsID   The container id of sections.
301 302
              * @param       array       $_aSection
302
-             * @param       array       $_aFieldsInSections     A field-sets array already divided by section tab.
303
+             * @param       array       $aFieldsInSections     A field-sets array already divided by section tab.
303 304
              * @return      array       The updated sections table output array.
304 305
              */
305 306
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
@@ -354,6 +355,7 @@  discard block
 block discarded – undo
354 355
                  * Returns the output of sub-sections for repeatable and sortable sections.
355 356
                  * 
356 357
                  * @since       3.7.0
358
+                 * @param string $_sSectionsID
357 359
                  * @return      array
358 360
                  */
359 361
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
@@ -500,6 +502,7 @@  discard block
 block discarded – undo
500 502
              * @since       3.5.3
501 503
              * @since       3.6.0       Removed the `$sSectionID` parameter. Added the `$aSectionset` parameter.
502 504
              * @since       3.7.0       Moved from `AdminPageFramework_FormPart_Table`.
505
+             * @param string $sSectionsID
503 506
              * @return      string      The formatted sections table HTML output.
504 507
              */
505 508
             private function _getFormattedSectionsTablesOutput( array $aOutputs, $aSectionset, $sSectionsID, array $aCollapsible, $sSectionTabSlug ) {
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___SectionCaption.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          */
80 80
         private function _getCaption( array $aSectionset, $iSectionIndex, $aFieldsets, $aFieldErrors, $aFieldTypeDefinitions, $aCallbacks, $oMsg ) {
81 81
             
82
-            if ( ! $aSectionset[ 'description' ] && ! $aSectionset[ 'title' ] ) {
82
+            if ( !$aSectionset[ 'description' ] && !$aSectionset[ 'title' ] ) {
83 83
                 return "<caption class='admin-page-framework-section-caption' style='display:none;'></caption>";
84 84
             }    
85 85
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     'collapsible'       => $_abCollapsible,
103 103
                     'container_type'    => 'section', // section or sections                    
104 104
                     
105
-                    'sectionset'        => $aSectionset,    // 3.7.0+ for tooltip
105
+                    'sectionset'        => $aSectionset, // 3.7.0+ for tooltip
106 106
                 ),
107 107
                 $aFieldsets,            
108 108
                 $this->aSavedData,   
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
                 $aCallbacks // field output element callables.                
113 113
             );            
114 114
             
115
-            $_bShowTitle    = empty( $_abCollapsible ) && ! $aSectionset[ 'section_tab_slug' ];
115
+            $_bShowTitle = empty( $_abCollapsible ) && !$aSectionset[ 'section_tab_slug' ];
116 116
             return 
117
-                "<caption " . $this->getAttributes( 
117
+                "<caption ".$this->getAttributes( 
118 118
                     array(
119 119
                         'class'             => 'admin-page-framework-section-caption',
120 120
                         // data-section_tab is referred by the repeater script to hide/show the title and the description
121 121
                         'data-section_tab'  => $aSectionset[ 'section_tab_slug' ],
122 122
                     ) 
123
-                ) . ">"
123
+                ).">"
124 124
                     . $_oCollapsibleSectionTitle->get()
125 125
                     . $this->getAOrB(
126 126
                         $_bShowTitle,
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                         'tag'           => 'h3',
175 175
                         'section_index' => $iSectionIndex,
176 176
                         
177
-                        'sectionset'    => $aSectionset,    // 3.7.0+ for tooltip
177
+                        'sectionset'    => $aSectionset, // 3.7.0+ for tooltip
178 178
                     ),
179 179
                     $aFieldsets,            
180 180
                     $this->aSavedData,   
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                     $this->oMsg,
184 184
                     $this->aCallbacks // field output element callables.
185 185
                 );
186
-                return "<div " . $this->getAttributes(
186
+                return "<div ".$this->getAttributes(
187 187
                         array(
188 188
                             'class' => 'admin-page-framework-section-title',
189 189
                             'style' => $this->getAOrB(
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                                 'display: none;'
193 193
                             ),
194 194
                         )
195
-                    ). ">" 
195
+                    ).">" 
196 196
                         . $_oSectionTitle->get()
197 197
                     . "</div>";                
198 198
             }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 if ( $aSectionset[ 'collapsible' ] ) {
209 209
                     return '';
210 210
                 }
211
-                if ( ! is_callable( $hfSectionCallback ) ) {
211
+                if ( !is_callable( $hfSectionCallback ) ) {
212 212
                     return '';
213 213
                 }
214 214
                 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
              */
241 241
             private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) {
242 242
                 
243
-                if ( ! $aSectionset[ 'title' ] ){
243
+                if ( !$aSectionset[ 'title' ] ) {
244 244
                     return false;
245 245
                 }
246 246
                 if ( $aSectionset[ 'collapsible' ] ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
              */
237 237
             private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) {
238 238
                 
239
-                if ( ! $aSectionset[ 'title' ] ){
239
+                if ( ! $aSectionset[ 'title' ] ) {
240 240
                     return false;
241 241
                 }
242 242
                 if ( $aSectionset[ 'collapsible' ] ) {
Please login to merge, or discard this patch.
_common/form/_view/sectionset/AdminPageFramework_Form_View___Section.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
         $_oSectionTableBodyAttributes = new AdminPageFramework_Form_View___Attribute_SectionTableBody( $this->aSectionset );
78 78
         
79 79
         $_aOutput       = array();
80
-        $_aOutput[]     = "<table " . $_oSectionTableAttributes->get() . ">"
80
+        $_aOutput[ ]     = "<table ".$_oSectionTableAttributes->get().">"
81 81
                 . $_oTableCaption->get()
82
-                . "<tbody " . $_oSectionTableBodyAttributes->get() . ">"
82
+                . "<tbody ".$_oSectionTableBodyAttributes->get().">"
83 83
                     . $this->_getSectionContent( $_iSectionIndex )
84 84
                 . "</tbody>"
85 85
             . "</table>";
86 86
 
87
-        $_oSectionTableContainerAttributes  = new AdminPageFramework_Form_View___Attribute_SectionTableContainer( $this->aSectionset );
88
-        return "<div " . $_oSectionTableContainerAttributes->get() . ">"
87
+        $_oSectionTableContainerAttributes = new AdminPageFramework_Form_View___Attribute_SectionTableContainer( $this->aSectionset );
88
+        return "<div ".$_oSectionTableContainerAttributes->get().">"
89 89
                 . implode( PHP_EOL, $_aOutput )
90 90
             . "</div>";    
91 91
         
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 // Retrieve the formatted sectionsets of the content.
136 136
                 $_sSectionPath = $this->aSectionset[ '_section_path' ];
137 137
                 $_aSectionsets = $this->aStructure[ 'sectionsets' ];
138
-                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
138
+                if ( !isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
139 139
                     return '';
140 140
                 }          
141 141
                 
@@ -190,22 +190,22 @@  discard block
 block discarded – undo
190 190
                     $_aNestedSectionPaths = array();
191 191
                     
192 192
                     // List the section paths of the direct children
193
-                    foreach( $aNestedSctionsets as $_aNestedSectionset ) {
193
+                    foreach ( $aNestedSctionsets as $_aNestedSectionset ) {
194 194
                         
195 195
                         // 3.7.6+ There were cases non array gets passed (like the FAQ page in the demo)
196 196
                         // and caused warnings in PHP 7.
197
-                        if ( ! is_array( $_aNestedSectionset ) ) {
197
+                        if ( !is_array( $_aNestedSectionset ) ) {
198 198
                             continue;
199 199
                         }
200 200
                         
201
-                        $_sThisSectionPath = $sSubjectSectionPath . '|' . $_aNestedSectionset[ 'section_id' ];
201
+                        $_sThisSectionPath = $sSubjectSectionPath.'|'.$_aNestedSectionset[ 'section_id' ];
202 202
                         $_aNestedSectionPaths[ $_sThisSectionPath ] = $_sThisSectionPath;
203 203
                         
204 204
                     }                    
205 205
                     
206 206
                     // Now we need children's children.
207 207
                     $_aChildSectionPaths = array();
208
-                    foreach( $_aNestedSectionPaths as $_sNestedSectionPath ) {
208
+                    foreach ( $_aNestedSectionPaths as $_sNestedSectionPath ) {
209 209
                         $_aNestedSectionsets = $this->getElementAsArray( 
210 210
                             $aSectionsets, 
211 211
                             array( $_sNestedSectionPath, 'content' )
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,8 @@
 block discarded – undo
144 144
                 // Retrieve the formatted sectionsets of the content.
145 145
                 $_sSectionPath = $this->aSectionset[ '_section_path' ];
146 146
                 $_aSectionsets = $this->aStructure[ 'sectionsets' ];
147
-                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
147
+                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {
148
+// @todo    not sure what this check is for
148 149
                     return '';
149 150
                 }          
150 151
                 
Please login to merge, or discard this patch.
format/AdminPageFramework_Form_View___Format_SectionsetsByTab.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * 
25 25
      * Only one depth at a time will be parsed.
26 26
      */
27
-    public $iNestedDepth  = 0;
27
+    public $iNestedDepth = 0;
28 28
     
29 29
     /**
30 30
      * Stores the generated section tab slugs.
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
             $_aFieldsBySectionTab   = array();
121 121
             $_iIndex                = 0;
122 122
 
123
-            foreach( $aSectionsets as $_sSectionPath => $_aSectionset ) {
123
+            foreach ( $aSectionsets as $_sSectionPath => $_aSectionset ) {
124 124
 
125 125
                 // If no fields for the section, no need to add the section 
126 126
                 // unless the custom sectionset output is defined.
127
-                if ( ! isset( $aFieldsets[ $_sSectionPath ] ) && ! $this->_isCustomContentSet( $_aSectionset ) ) {
127
+                if ( !isset( $aFieldsets[ $_sSectionPath ] ) && !$this->_isCustomContentSet( $_aSectionset ) ) {
128 128
                     continue;
129 129
                 }
130 130
                        
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 $_sSectionTaqbSlug = $this->getAOrB(
137 137
                     $_aSectionset[ 'section_tab_slug' ],
138 138
                     $_aSectionset[ 'section_tab_slug' ],
139
-                    '_default_' . $this->iNestedDepth . '_' . ( ++$_iIndex )
139
+                    '_default_'.$this->iNestedDepth.'_'.( ++$_iIndex )
140 140
                 );
141 141
                 $_aSectionsBySectionTab[ $_sSectionTaqbSlug ][ $_sSectionPath ] = $_aSectionset;
142 142
                 $_aFieldsBySectionTab[ $_sSectionTaqbSlug ][ $_sSectionPath ]   = $this->getElement(
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
              * @since       DEVVER      Moved from `AdminPageFramework_FormPart_Table`.
158 158
              * @return      boolean     True if a custom content value is set.
159 159
              */
160
-            private function _isCustomContentSet( array $aSectionset, array $aKeys=array( 'content' ) ) {
160
+            private function _isCustomContentSet( array $aSectionset, array $aKeys = array( 'content' ) ) {
161 161
                 return isset( $aSectionset[ 'content' ] );
162 162
                 // @deprecated
163 163
                 // foreach( $aKeys as $_sKey ) {
Please login to merge, or discard this patch.
factory/_common/form/_view/AdminPageFramework_Form_View___DebugInfo.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  * @internal
18 18
  * @extends     AdminPageFramework_FrameworkUtility
19 19
  */
20
-class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility {            
20
+class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility {
21 21
 
22 22
     public $sStructureType   = '';
23 23
     
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility {            
21 21
 
22
-    public $sStructureType   = '';
22
+    public $sStructureType = '';
23 23
     
24 24
     /**
25 25
      * @since       3.8.5
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function get() {
59 59
         
60
-        if ( ! $this->_shouldProceed() ) {
60
+        if ( !$this->_shouldProceed() ) {
61 61
             return '';
62 62
         }
63 63
         
64 64
         return "<div class='admin-page-framework-info'>" 
65
-                . $this->oMsg->get( 'debug_info' ) . ': '
65
+                . $this->oMsg->get( 'debug_info' ).': '
66 66
                     . $this->getFrameworkNameVersion()
67 67
             . "</div>";
68 68
         
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
          */
74 74
         private function _shouldProceed() {
75 75
 
76
-            if ( ! $this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) {
76
+            if ( !$this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) {
77 77
                 return false;
78 78
             }        
79 79
             // For the generic admin pages, do no show debug information for each section.
Please login to merge, or discard this patch.
form/_view/resource/AdminPageFramework_Form_View__Resource__Head.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param       object      $oForm
30 30
      * @param       string      $sHeadActionHook        The action hook triggered inside the `<head>` tag. For front-end forms, use `wp_head`.
31 31
      */
32
-    public function __construct( $oForm, $sHeadActionHook='admin_head' ) {
32
+    public function __construct( $oForm, $sHeadActionHook = 'admin_head' ) {
33 33
     
34 34
         $this->oForm = $oForm;
35 35
     
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
          * as multiple instances of the factory class is loaded among separate pages, 
54 54
          * one gets denied here and if it can load earlier than the one which should insert the below script.
55 55
          */
56
-        if ( ! $this->oForm->isInThePage() ) {
56
+        if ( !$this->oForm->isInThePage() ) {
57 57
             return;
58 58
         }    
59 59
     
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
         private function _getScripts_RequiredInHead() {
77 77
             return 'document.write( "<style class=\'admin-page-framework-js-embedded-inline-style\'>'
78 78
                     . str_replace(
79
-                        '\\n',   // search
80
-                        '',     // replace
79
+                        '\\n', // search
80
+                        '', // replace
81 81
                         esc_js( $this->_getInlineCSS() )    // subject
82 82
                     )
83 83
                 . '</style>" );';            
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     
34 34
         $this->oForm = $oForm;
35 35
     
36
-        if ( in_array( $this->oForm->aArguments[ 'structure_type' ], array( 'widget' ) ) ) {       
36
+        if ( in_array( $this->oForm->aArguments[ 'structure_type' ], array( 'widget' ) ) ) {
37 37
             return;
38 38
         }
39 39
     
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                  * @return      string
98 98
                  * @since       DEVVER
99 99
                  */
100
-                private function _getScriptElementConcealerCSSRules() {                    
100
+                private function _getScriptElementConcealerCSSRules() {
101 101
                     
102 102
                     // Avoid hiding framework forms in widgets. In some cases, the user sets a form in any page,
103 103
                     // which causes a different structure form type including `admin_page` gets loaded even in widgets.php (or any page builder pages dealing with widgets)
Please login to merge, or discard this patch.
_common/form/_view/resource/AdminPageFramework_Form_View__Resource.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         // Widgets can be called multiple times for the number of user-created widget instances for one class instance 
41 41
         // so make sure it is processed only once per page.
42 42
         if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) {
43
-             return;
43
+                return;
44 44
         }
45 45
 
46 46
         $this->_setHooks();
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
         );
231 231
         
232 232
         $_sID = $this->sanitizeSlug( strtolower( $this->oForm->aArguments[ 'caller_id' ] ) );
233
-        if ( $_sCSSRules ) {            
233
+        if ( $_sCSSRules ) {
234 234
             echo "<style type='text/css' id='inline-style-{$_sID}' class='admin-page-framework-form-style'>"
235 235
                     . $_sCSSRules
236 236
                 . "</style>";
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
        
41 41
         // Widgets can be called multiple times for the number of user-created widget instances for one class instance 
42 42
         // so make sure it is processed only once per page.
43
-        if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) {
43
+        if ( $this->hasBeenCalled( 'resource_'.$oForm->aArguments[ 'caller_id' ] ) ) {
44 44
              return;
45 45
         }
46 46
 
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
      * @since       3.7.0
114 114
      */
115 115
     public function _replyToEnqueueScripts() {
116
-        if ( ! $this->oForm->isInThePage() ) {
116
+        if ( !$this->oForm->isInThePage() ) {
117 117
             return;
118 118
         }
119
-        foreach( $this->oForm->getResources( 'src_scripts' ) as $_isIndex => $_asEnqueue ) {
119
+        foreach ( $this->oForm->getResources( 'src_scripts' ) as $_isIndex => $_asEnqueue ) {
120 120
             $this->_enqueueScript( $_asEnqueue );
121
-            $this->oForm->unsetResources( array( 'src_scripts', $_isIndex ) );  // no longer needed
121
+            $this->oForm->unsetResources( array( 'src_scripts', $_isIndex ) ); // no longer needed
122 122
         }       
123 123
     }
124 124
         /**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             private function _getFormattedEnqueueScript( $asEnqueue ) {
166 166
                 static $_iCallCount = 1;
167 167
                 $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array(
168
-                    'handle_id'     => 'script_form_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount,
168
+                    'handle_id'     => 'script_form_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount,
169 169
                     'src'           => null,
170 170
                     'dependencies'  => null,
171 171
                     'version'       => null,
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
      */    
189 189
     public function _replyToEnqueueStyles() {
190 190
 
191
-        if ( ! $this->oForm->isInThePage() ) {
191
+        if ( !$this->oForm->isInThePage() ) {
192 192
             return;
193 193
         }
194
-        foreach( $this->oForm->getResources( 'src_styles' ) as $_isIndex => $_asEnqueueItem ) {
194
+        foreach ( $this->oForm->getResources( 'src_styles' ) as $_isIndex => $_asEnqueueItem ) {
195 195
             $this->_enqueueStyle( $_asEnqueueItem );
196 196
             $this->oForm->unsetResources( array( 'src_styles', $_isIndex ) ); // no longer needed
197 197
         }           
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             private function _getFormattedEnqueueStyle( $asEnqueue ) {
214 214
                 static $_iCallCount = 1;
215 215
                 $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array(
216
-                    'handle_id'     => 'style_form_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount,
216
+                    'handle_id'     => 'style_form_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount,
217 217
                     'src'           => null,
218 218
                     'dependencies'  => null,
219 219
                     'version'       => null,
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */    
238 238
     public function _replyToAddStyle() {
239 239
         
240
-        if ( ! $this->oForm->isInThePage() ) {
240
+        if ( !$this->oForm->isInThePage() ) {
241 241
             return;
242 242
         }   
243 243
         $_sCSSRules = $this->_getFormattedInternalStyles( 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      */    
280 280
     public function _replyToAddScript() {
281 281
         
282
-        if ( ! $this->oForm->isInThePage() ) {
282
+        if ( !$this->oForm->isInThePage() ) {
283 283
             return;
284 284
         }        
285 285
         
Please login to merge, or discard this patch.
_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
                  */
140 140
                 private function _getUnsetFlagFieldInputTag( array $aField ) {
141 141
                     
142
-                    if ( false !== $aField[ 'save' ] ) {                
142
+                    if ( false !== $aField[ 'save' ] ) {
143 143
                         return '';
144 144
                     }
145 145
                     return $this->getHTMLTag( 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -324,6 +324,7 @@  discard block
 block discarded – undo
324 324
                  * Retrieves a field output.
325 325
                  * 
326 326
                  * @since       3.8.0
327
+                 * @param boolean $bIsLastElement
327 328
                  * @return      string
328 329
                  */ 
329 330
                 private function _getFieldOutput( $sContent, array $aField, $bIsLastElement ) {
@@ -402,6 +403,7 @@  discard block
 block discarded – undo
402 403
          * Returns the final fields output.
403 404
          * 
404 405
          * @since       3.1.0
406
+         * @param integer $iFieldsCount
405 407
          * @return      string
406 408
          */
407 409
         private function _getFinalOutput( array $aFieldset, array $aFieldsOutput, $iFieldsCount ) {
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $this->aFieldset[ '_field_path_array' ],
39 39
             $this->aFieldset[ 'error_message' ]
40 40
         );
41
-        $_aOutputs[]     = $_oFieldError->get();
41
+        $_aOutputs[ ] = $_oFieldError->get();
42 42
 
43 43
         // 2. Construct fields array for sub-fields.
44 44
         $_oFieldsFormatter = new AdminPageFramework_Form_Model___Format_Fields(
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $_aFields = $_oFieldsFormatter->get();
49 49
             
50 50
         // 3. Get the field and its sub-fields output.
51
-        $_aOutputs[] = $this->_getFieldsOutput( 
51
+        $_aOutputs[ ] = $this->_getFieldsOutput( 
52 52
             $this->aFieldset,
53 53
             $_aFields, 
54 54
             $this->aCallbacks 
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
          * @since   3.8.0   Added the `$aFieldset` parameter
72 72
          * @return  string
73 73
          */ 
74
-        private function _getFieldsOutput( array $aFieldset, array $aFields, array $aCallbacks=array() ) {
74
+        private function _getFieldsOutput( array $aFieldset, array $aFields, array $aCallbacks = array() ) {
75 75
 
76 76
             $_aOutput = array();
77
-            foreach( $aFields as $_isIndex => $_aField ) {
78
-                $_aOutput[] = $this->_getEachFieldOutput( 
77
+            foreach ( $aFields as $_isIndex => $_aField ) {
78
+                $_aOutput[ ] = $this->_getEachFieldOutput( 
79 79
                     $_aField, 
80 80
                     $_isIndex, 
81 81
                     $aCallbacks,
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
              * @since       3.5.3
95 95
              * @return      string      the HTML output of the given field.
96 96
              */
97
-            private function _getEachFieldOutput( array $aField, $isIndex, array $aCallbacks, $bIsLastElement=false ) {
97
+            private function _getEachFieldOutput( array $aField, $isIndex, array $aCallbacks, $bIsLastElement = false ) {
98 98
                 
99 99
                 // Field type definition - allows mixed field types in sub-fields 
100 100
                 $_aFieldTypeDefinition = $this->_getFieldTypeDefinition( $aField[ 'type' ] );
101
-                if ( ! is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) {
101
+                if ( !is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) {
102 102
                     return '';
103 103
                 }     
104 104
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 private function _getFieldOutput( $sContent, array $aField, $bIsLastElement ) {
133 133
                     $_oFieldAttribute = new AdminPageFramework_Form_View___Attribute_Field( $aField );
134 134
                     return $aField[ 'before_field' ]
135
-                        . "<div " . $_oFieldAttribute->get() . ">"
135
+                        . "<div ".$_oFieldAttribute->get().">"
136 136
                             . $sContent
137 137
                             . $this->_getUnsetFlagFieldInputTag( $aField )
138 138
                             . $this->_getDelimiter( $aField, $bIsLastElement )
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                         'input',
155 155
                         array(
156 156
                             'type'  => 'hidden',
157
-                            'name'  => '__unset_' . $aField[ '_fields_type' ] . '[' . $aField[ '_input_name_flat' ] . ']',
157
+                            'name'  => '__unset_'.$aField[ '_fields_type' ].'['.$aField[ '_input_name_flat' ].']',
158 158
                             'value' => $aField[ '_input_name_flat' ],
159 159
                             'class' => 'unset-element-names element-address',
160 160
                         )
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                  */
186 186
                 private function _getDelimiter( array $aField, $bIsLastElement ) {
187 187
                     return $aField[ 'delimiter' ]
188
-                        ? "<div " . $this->getAttributes( 
188
+                        ? "<div ".$this->getAttributes( 
189 189
                                 array(
190 190
                                     'class' => 'delimiter',
191 191
                                     'id'    => "delimiter-{$aField[ 'input_id' ]}",
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                                         ""
196 196
                                     ),
197 197
                                 ) 
198
-                            ) . ">"
198
+                            ).">"
199 199
                                 . $aField[ 'delimiter' ]
200 200
                             . "</div>"
201 201
                         : '';
@@ -209,9 +209,9 @@  discard block
 block discarded – undo
209 209
          */
210 210
         private function _getFinalOutput( array $aFieldset, array $aFieldsOutput, $iFieldsCount ) {
211 211
                             
212
-            $_oFieldsetAttributes   = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset );
212
+            $_oFieldsetAttributes = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset );
213 213
             return $aFieldset[ 'before_fieldset' ]
214
-                . "<fieldset " . $_oFieldsetAttributes->get() . ">"
214
+                . "<fieldset ".$_oFieldsetAttributes->get().">"
215 215
                     . $this->_getEmbeddedFieldTitle( $aFieldset )
216 216
                     . $this->_getChildFieldTitle( $aFieldset )                
217 217
                     . $this->_getFieldsetContent( $aFieldset, $aFieldsOutput, $iFieldsCount )
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
              */
229 229
             private function _getEmbeddedFieldTitle( array $aFieldset ) {
230 230
                 
231
-                if ( ! $aFieldset[ '_is_title_embedded' ] ) {
231
+                if ( !$aFieldset[ '_is_title_embedded' ] ) {
232 232
                     return '';
233 233
                 }
234 234
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
              */
254 254
             private function _getChildFieldTitle( array $aFieldset ) {
255 255
 
256
-                if ( ! $aFieldset[ '_nested_depth' ] ) {
256
+                if ( !$aFieldset[ '_nested_depth' ] ) {
257 257
                     return '';
258 258
                 }
259 259
                 if ( $aFieldset[ '_is_title_embedded' ] ) {
@@ -282,12 +282,12 @@  discard block
 block discarded – undo
282 282
                     return $aFieldset[ 'content' ];
283 283
                 }
284 284
             
285
-                $_oFieldsAttributes     = new AdminPageFramework_Form_View___Attribute_Fields( 
285
+                $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields( 
286 286
                     $aFieldset, 
287
-                    array(),    // attribute array
287
+                    array(), // attribute array
288 288
                     $iFieldsCount
289 289
                 );
290
-                return "<div " . $_oFieldsAttributes->get() . ">"
290
+                return "<div ".$_oFieldsAttributes->get().">"
291 291
                         . $aFieldset[ 'before_fields' ]
292 292
                             . implode( PHP_EOL, $aFieldsOutput )
293 293
                         . $aFieldset[ 'after_fields' ]
@@ -310,13 +310,13 @@  discard block
 block discarded – undo
310 310
                     $aField[ 'description' ],
311 311
                     'admin-page-framework-fields-description'   // class selector
312 312
                 );
313
-                $_aOutput[] = $_oFieldDescription->get();
313
+                $_aOutput[ ] = $_oFieldDescription->get();
314 314
                     
315 315
                 // Dimensional keys of repeatable and sortable fields
316
-                $_aOutput[] = $this->_getDynamicElementFlagFieldInputTag( $aField );
316
+                $_aOutput[ ] = $this->_getDynamicElementFlagFieldInputTag( $aField );
317 317
                     
318 318
                 // Repeatable and sortable scripts 
319
-                $_aOutput[] = $this->_getFieldScripts( $aField, $iFieldsCount );
319
+                $_aOutput[ ] = $this->_getFieldScripts( $aField, $iFieldsCount );
320 320
                 
321 321
                 return implode( PHP_EOL, array_filter( $_aOutput ) );
322 322
                 
@@ -346,8 +346,8 @@  discard block
 block discarded – undo
346 346
                             'input',
347 347
                             array(
348 348
                                 'type'                      => 'hidden',
349
-                                'name'                      => '__repeatable_elements_' . $aFieldset[ '_structure_type' ] 
350
-                                    . '[' . $aFieldset[ '_field_address' ] . ']',
349
+                                'name'                      => '__repeatable_elements_'.$aFieldset[ '_structure_type' ] 
350
+                                    . '['.$aFieldset[ '_field_address' ].']',
351 351
                                 'class'                     => 'element-address',
352 352
                                 'value'                     => $aFieldset[ '_field_address' ],
353 353
                                 'data-field_address_model'  => $aFieldset[ '_field_address_model' ],
@@ -363,8 +363,8 @@  discard block
 block discarded – undo
363 363
                             'input',
364 364
                             array(
365 365
                                 'type'                      => 'hidden',
366
-                                'name'                      => '__sortable_elements_' . $aFieldset[ '_structure_type' ] 
367
-                                    . '[' . $aFieldset[ '_field_address' ] . ']',
366
+                                'name'                      => '__sortable_elements_'.$aFieldset[ '_structure_type' ] 
367
+                                    . '['.$aFieldset[ '_field_address' ].']',
368 368
                                 'class'                     => 'element-address',
369 369
                                 'value'                     => $aFieldset[ '_field_address' ],
370 370
                                 'data-field_address_model'  => $aFieldset[ '_field_address_model' ],
@@ -383,14 +383,14 @@  discard block
 block discarded – undo
383 383
                     $_aOutput   = array();
384 384
                     
385 385
                     // Add the repeater script 
386
-                    $_aOutput[] = $aField[ 'repeatable' ]
387
-                        ? $this->_getRepeaterFieldEnablerScript( 'fields-' . $aField['tag_id'], $iFieldsCount, $aField['repeatable'] )
386
+                    $_aOutput[ ] = $aField[ 'repeatable' ]
387
+                        ? $this->_getRepeaterFieldEnablerScript( 'fields-'.$aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] )
388 388
                         : '';
389 389
 
390 390
                     // Add the sortable script - if the number of fields is only one, no need to sort the field. 
391 391
                     // Repeatable fields can make the number increase so here it checks the repeatability.
392
-                    $_aOutput[] = $aField['sortable'] && ( $iFieldsCount > 1 || $aField['repeatable'] )
393
-                        ? $this->_getSortableFieldEnablerScript( 'fields-' . $aField['tag_id'] )
392
+                    $_aOutput[ ] = $aField[ 'sortable' ] && ( $iFieldsCount > 1 || $aField[ 'repeatable' ] )
393
+                        ? $this->_getSortableFieldEnablerScript( 'fields-'.$aField[ 'tag_id' ] )
394 394
                         : '';     
395 395
                     
396 396
                     return implode( PHP_EOL, $_aOutput );
Please login to merge, or discard this patch.
AdminPageFramework_Form_View___Attribute_SectionTableContainer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
      */
28 28
     protected function _getAttributes() {
29 29
         
30
-        $_aSectionAttributes    = $this->uniteArrays(
31
-            $this->dropElementsByType( $this->aArguments[ 'attributes' ] ),   // remove elements of an array.
30
+        $_aSectionAttributes = $this->uniteArrays(
31
+            $this->dropElementsByType( $this->aArguments[ 'attributes' ] ), // remove elements of an array.
32 32
             array( 
33 33
                 'id'            => $this->aArguments[ '_tag_id' ], // section-{section id}__{index}
34 34
                 'class'         => $this->getClassAttribute( 
@@ -49,19 +49,19 @@  discard block
 block discarded – undo
49 49
             )     
50 50
         );
51 51
         
52
-        $_aSectionAttributes[ 'class' ]   = $this->getClassAttribute( 
52
+        $_aSectionAttributes[ 'class' ] = $this->getClassAttribute( 
53 53
             $_aSectionAttributes[ 'class' ], 
54 54
             $this->dropElementsByType( $this->aArguments[ 'class' ] )
55
-        );  // 3.3.1+
55
+        ); // 3.3.1+
56 56
         
57
-        $_aSectionAttributes[ 'style' ]   = $this->getStyleAttribute( 
57
+        $_aSectionAttributes[ 'style' ] = $this->getStyleAttribute( 
58 58
             $_aSectionAttributes[ 'style' ], 
59 59
             $this->getAOrB(
60 60
                 $this->aArguments[ 'hidden' ],
61 61
                 'display:none',
62 62
                 null
63 63
             )
64
-        );  // 3.3.1+        
64
+        ); // 3.3.1+        
65 65
 
66 66
         return $_aSectionAttributes;
67 67
         
Please login to merge, or discard this patch.