Completed
Branch master (0a34ef)
by
unknown
13:11
created
_view/sectionset/AdminPageFramework_Form_View___CollapsibleSectionTitle.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class AdminPageFramework_Form_View___CollapsibleSectionTitle extends AdminPageFramework_Form_View___SectionTitle {
20 20
             
21
-    public $aArguments      = array(
21
+    public $aArguments = array(
22 22
         'title'             => null,
23 23
         'tag'               => null,
24 24
         'section_index'     => null,
25 25
         'collapsible'       => array(),
26 26
         'container_type'    => 'section', // section or sections
27 27
         
28
-        'sectionset'        => array(),  // 3.7.0+ sectionset definition array
28
+        'sectionset'        => array(), // 3.7.0+ sectionset definition array
29 29
         
30 30
     );
31
-    public $aFieldsets               = array();
31
+    public $aFieldsets = array();
32 32
     public $aSavedData              = array();
33 33
     public $aFieldErrors            = array();
34 34
     public $aFieldTypeDefinitions   = array();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
          * @param       array|boolean   $aCollapsible       The collapsible argument.
63 63
          * @param       string          $sContainer          The position context. Accepts either 'sections' or 'section'. If the set position in the argument array does not match this value, the method will return an empty string.
64 64
          */
65
-        private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) {
65
+        private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer = 'sections', $iSectionIndex = null ) {
66 66
 
67 67
             if ( $sContainer !== $aCollapsible[ 'container' ] ) { 
68 68
                 return ''; 
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
             );
79 79
             
80 80
             $_aSectionset        = $this->aArguments[ 'sectionset' ];
81
-            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ]  ) . '_' . $iSectionIndex;
81
+            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$iSectionIndex;
82 82
             
83 83
             return $this->_getCollapsibleSectionsEnablerScript()
84
-                . "<div " . $this->getAttributes(
84
+                . "<div ".$this->getAttributes(
85 85
                     array(
86 86
                         'id'    => $_sSectionTitleTagID,
87 87
                         'class' => $this->getClassAttribute(
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
                                 'collapsed',
103 103
                                 ''
104 104
                             ),                            
105
-                            'admin-page-framework-collapsible-type-' . $aCollapsible[ 'type' ]
105
+                            'admin-page-framework-collapsible-type-'.$aCollapsible[ 'type' ]
106 106
                         ),
107 107
                     ) 
108 108
                     + $this->getDataAttributeArray( $aCollapsible )
109
-                ) . ">"  
109
+                ).">"  
110 110
                         . $_sSectionTitle
111 111
                     . "</div>";
112 112
             
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
          */
62 62
         private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) {
63 63
 
64
-            if ( $sContainer !== $aCollapsible[ 'container' ] ) { 
64
+            if ( $sContainer !== $aCollapsible[ 'container' ] ) {
65 65
                 return ''; 
66 66
             }
67 67
               
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.
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $_aParameters = func_get_args() + array( 
34 34
             $this->aFieldset, 
35
-            $this->aSavedData,    // passed by reference. @todo: examine why it needs to be passed by reference.
35
+            $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference.
36 36
             $this->aFieldErrors, 
37 37
             $this->aFieldTypeDefinitions, 
38 38
             $this->aCallbacks, // field output element callables.        
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         return $this->_getFieldByContainer( 
72 72
             $aFieldset, 
73 73
             array(
74
-                'open_main'     => "<div " . $_oFieldrowAttribute->get() . ">",
74
+                'open_main'     => "<div ".$_oFieldrowAttribute->get().">",
75 75
                 'close_main'    => "</div>",
76 76
             )
77 77
         ); 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         
62 62
         $aFieldset = $this->aFieldset;
63 63
 
64
-        if ( 'section_title' === $aFieldset[ 'type' ] ) { 
64
+        if ( 'section_title' === $aFieldset[ 'type' ] ) {
65 65
             return ''; 
66 66
         }
67 67
         
Please login to merge, or discard this patch.
factory/_common/form/_view/AdminPageFramework_Form_View___DebugInfo.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_WPUtility {            
20 20
 
21
-    public $sStructureType   = '';
21
+    public $sStructureType = '';
22 22
     
23 23
     /**
24 24
      * Stores the message object.
@@ -49,18 +49,18 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function get() {
51 51
         
52
-        if ( ! $this->isDebugModeEnabled() ) {
52
+        if ( !$this->isDebugModeEnabled() ) {
53 53
             return '';
54 54
         }
55 55
         
56 56
         // For the generic admin pages, do no show debug information for each section.
57
-        if ( ! in_array( $this->sStructureType, array( 'widget', 'post_meta_box', 'page_meta_box', 'user_meta' ) ) ) {
57
+        if ( !in_array( $this->sStructureType, array( 'widget', 'post_meta_box', 'page_meta_box', 'user_meta' ) ) ) {
58 58
             return '';
59 59
         }
60 60
         
61 61
         return "<div class='admin-page-framework-info'>" 
62
-                . $this->oMsg->get( 'debug_info' ) . ': '
63
-                    . AdminPageFramework_Registry::NAME . ' ' . AdminPageFramework_Registry::getVersion()
62
+                . $this->oMsg->get( 'debug_info' ).': '
63
+                    . AdminPageFramework_Registry::NAME.' '.AdminPageFramework_Registry::getVersion()
64 64
             . "</div>";
65 65
         
66 66
     }
Please login to merge, or discard this patch.
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.
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.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
        
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
-        if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) {
42
+        if ( $this->hasBeenCalled( 'resource_'.$oForm->aArguments[ 'caller_id' ] ) ) {
43 43
              return;
44 44
         }
45 45
 
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
      * @since       3.7.0
113 113
      */
114 114
     public function _replyToEnqueueScripts() {
115
-        if ( ! $this->oForm->isInThePage() ) {
115
+        if ( !$this->oForm->isInThePage() ) {
116 116
             return;
117 117
         }
118
-        foreach( $this->oForm->getResources( 'src_scripts' ) as $_asEnqueue ) {
118
+        foreach ( $this->oForm->getResources( 'src_scripts' ) as $_asEnqueue ) {
119 119
             $this->_enqueueScript( $_asEnqueue );
120 120
         }       
121 121
     }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             private function _getFormattedEnqueueScript( $asEnqueue ) {
164 164
                 static $_iCallCount = 1;
165 165
                 $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array(
166
-                    'handle_id'     => 'script_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount,
166
+                    'handle_id'     => 'script_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount,
167 167
                     'src'           => null,
168 168
                     'dependencies'  => null,
169 169
                     'version'       => null,
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
      */    
187 187
     public function _replyToEnqueueStyles() {
188 188
 
189
-        if ( ! $this->oForm->isInThePage() ) {
189
+        if ( !$this->oForm->isInThePage() ) {
190 190
             return;
191 191
         }
192
-        foreach( $this->oForm->getResources( 'src_styles' ) as $_asEnqueueItem ) {
192
+        foreach ( $this->oForm->getResources( 'src_styles' ) as $_asEnqueueItem ) {
193 193
             $this->_enqueueStyle( $_asEnqueueItem );
194 194
         }           
195 195
     
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             private function _getFormattedEnqueueStyle( $asEnqueue ) {
211 211
                 static $_iCallCount = 1;
212 212
                 $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array(
213
-                    'handle_id'     => 'style_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount,
213
+                    'handle_id'     => 'style_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount,
214 214
                     'src'           => null,
215 215
                     'dependencies'  => null,
216 216
                     'version'       => null,
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */    
235 235
     public function _replyToAddStyle() {
236 236
         
237
-        if ( ! $this->oForm->isInThePage() ) {
237
+        if ( !$this->oForm->isInThePage() ) {
238 238
             return;
239 239
         }   
240 240
         $_sCSSRules = $this->_getFormattedInlineStyles( 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      */    
282 282
     public function _replyToAddScript() {
283 283
         
284
-        if ( ! $this->oForm->isInThePage() ) {
284
+        if ( !$this->oForm->isInThePage() ) {
285 285
             return;
286 286
         }        
287 287
         
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.
_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php 2 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $this->aField[ '_field_path_array' ],
39 39
             $this->aField[ '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
             $_aFields, 
53 53
             $this->aCallbacks 
54 54
         );
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
          * @since   3.1.0
80 80
          * @since   3.2.0   Added the $aCallbacks parameter.
81 81
          */ 
82
-        private function _getFieldsOutput( array $aFields, array $aCallbacks=array() ) {
82
+        private function _getFieldsOutput( array $aFields, array $aCallbacks = array() ) {
83 83
 
84 84
             $_aOutput = array();
85
-            foreach( $aFields as $_isIndex => $_aField ) {
86
-                $_aOutput[] = $this->_getEachFieldOutput( 
85
+            foreach ( $aFields as $_isIndex => $_aField ) {
86
+                $_aOutput[ ] = $this->_getEachFieldOutput( 
87 87
                     $_aField, 
88 88
                     $_isIndex, 
89 89
                     $aCallbacks,
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
              * @since       3.5.3
101 101
              * @return      string      the HTML output of the given field.
102 102
              */
103
-            private function _getEachFieldOutput( array $aField, $isIndex, array $aCallbacks, $bIsLastElement=false ) {
103
+            private function _getEachFieldOutput( array $aField, $isIndex, array $aCallbacks, $bIsLastElement = false ) {
104 104
                 
105 105
                 // Field type definition - allows mixed field types in sub-fields 
106
-                $_aFieldTypeDefinition = $this->_getFieldTypeDefinition( $aField['type'] );
107
-                if ( ! is_callable( $_aFieldTypeDefinition['hfRenderField'] ) ) {
106
+                $_aFieldTypeDefinition = $this->_getFieldTypeDefinition( $aField[ 'type' ] );
107
+                if ( !is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) {
108 108
                     return '';
109 109
                 }     
110 110
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 // Callback the registered function to output the field 
121 121
                 $_oFieldAttribute = new AdminPageFramework_Form_View___Attribute_Field( $aField );
122 122
                 return $aField[ 'before_field' ]
123
-                    . "<div " . $_oFieldAttribute->get() . ">"
123
+                    . "<div ".$_oFieldAttribute->get().">"
124 124
                         . call_user_func_array(
125 125
                             $_aFieldTypeDefinition[ 'hfRenderField' ],
126 126
                             array( $aField )
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                         'input',
147 147
                         array(
148 148
                             'type'  => 'hidden',
149
-                            'name'  => '__unset_' . $aField[ '_fields_type' ] . '[' . $aField[ '_input_name_flat' ] . ']',
149
+                            'name'  => '__unset_'.$aField[ '_fields_type' ].'['.$aField[ '_input_name_flat' ].']',
150 150
                             'value' => $aField[ '_input_name_flat' ],
151 151
                             'class' => 'unset-element-names element-address',
152 152
                         )
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                     return $this->getElement(
166 166
                         $this->aFieldTypeDefinitions,
167 167
                         $sFieldTypeSlug,
168
-                        $this->aFieldTypeDefinitions['default']
168
+                        $this->aFieldTypeDefinitions[ 'default' ]
169 169
                     );
170 170
                 }  
171 171
 
@@ -176,19 +176,19 @@  discard block
 block discarded – undo
176 176
                  * @return      string      the HTML output of delimiter
177 177
                  */
178 178
                 private function _getDelimiter( array $aField, $bIsLastElement ) {
179
-                    return $aField['delimiter']
180
-                        ? "<div " . $this->getAttributes( 
179
+                    return $aField[ 'delimiter' ]
180
+                        ? "<div ".$this->getAttributes( 
181 181
                                 array(
182 182
                                     'class' => 'delimiter',
183
-                                    'id'    => "delimiter-{$aField['input_id']}",
183
+                                    'id'    => "delimiter-{$aField[ 'input_id' ]}",
184 184
                                     'style' => $this->getAOrB(
185 185
                                         $bIsLastElement,
186 186
                                         "display:none;",
187 187
                                         ""
188 188
                                     ),
189 189
                                 ) 
190
-                            ) . ">"
191
-                                . $aField['delimiter']
190
+                            ).">"
191
+                                . $aField[ 'delimiter' ]
192 192
                             . "</div>"
193 193
                         : '';
194 194
                 }                
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
          */
202 202
         private function _getFinalOutput( array $aFieldset, array $aFieldsOutput, $iFieldsCount ) {
203 203
                             
204
-            $_oFieldsetAttributes   = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset );
204
+            $_oFieldsetAttributes = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset );
205 205
             return $aFieldset[ 'before_fieldset' ]
206
-                . "<fieldset " . $_oFieldsetAttributes->get() . ">"
206
+                . "<fieldset ".$_oFieldsetAttributes->get().">"
207 207
                     . $this->_getFieldsetContent( $aFieldset, $aFieldsOutput, $iFieldsCount )
208 208
                     . $this->_getExtras( $aFieldset, $iFieldsCount )
209 209
                 . "</fieldset>"
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
                     return $aFieldset[ 'content' ];
221 221
                 }
222 222
             
223
-                $_oFieldsAttributes     = new AdminPageFramework_Form_View___Attribute_Fields( 
223
+                $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields( 
224 224
                     $aFieldset, 
225
-                    array(),    // attribute array
225
+                    array(), // attribute array
226 226
                     $iFieldsCount
227 227
                 );
228
-                return "<div " . $_oFieldsAttributes->get() . ">"
228
+                return "<div ".$_oFieldsAttributes->get().">"
229 229
                         . $aFieldset[ 'before_fields' ]
230 230
                             . implode( PHP_EOL, $aFieldsOutput )
231 231
                         . $aFieldset[ 'after_fields' ]
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
                     $aField[ 'description' ],
248 248
                     'admin-page-framework-fields-description'   // class selector
249 249
                 );
250
-                $_aOutput[] = $_oFieldDescription->get();
250
+                $_aOutput[ ] = $_oFieldDescription->get();
251 251
                     
252 252
                 // Dimensional keys of repeatable and sortable fields
253
-                $_aOutput[] = $this->_getDynamicElementFlagFieldInputTag( $aField );
253
+                $_aOutput[ ] = $this->_getDynamicElementFlagFieldInputTag( $aField );
254 254
                     
255 255
                 // Repeatable and sortable scripts 
256
-                $_aOutput[] = $this->_getFieldScripts( $aField, $iFieldsCount );
256
+                $_aOutput[ ] = $this->_getFieldScripts( $aField, $iFieldsCount );
257 257
                 
258 258
                 return implode( PHP_EOL, array_filter( $_aOutput ) );
259 259
                 
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
                             'input',
284 284
                             array(
285 285
                                 'type'                      => 'hidden',
286
-                                'name'                      => '__repeatable_elements_' . $aFieldset[ '_structure_type' ] 
287
-                                    . '[' . $aFieldset[ '_field_address' ] . ']',
286
+                                'name'                      => '__repeatable_elements_'.$aFieldset[ '_structure_type' ] 
287
+                                    . '['.$aFieldset[ '_field_address' ].']',
288 288
                                 'class'                     => 'element-address',
289 289
                                 'value'                     => $aFieldset[ '_field_address' ],
290 290
                                 'data-field_address_model'  => $aFieldset[ '_field_address_model' ],
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
                             'input',
301 301
                             array(
302 302
                                 'type'                      => 'hidden',
303
-                                'name'                      => '__sortable_elements_' . $aFieldset[ '_structure_type' ] 
304
-                                    . '[' . $aFieldset[ '_field_address' ] . ']',
303
+                                'name'                      => '__sortable_elements_'.$aFieldset[ '_structure_type' ] 
304
+                                    . '['.$aFieldset[ '_field_address' ].']',
305 305
                                 'class'                     => 'element-address',
306 306
                                 'value'                     => $aFieldset[ '_field_address' ],
307 307
                                 'data-field_address_model'  => $aFieldset[ '_field_address_model' ],
@@ -320,14 +320,14 @@  discard block
 block discarded – undo
320 320
                     $_aOutput   = array();
321 321
                     
322 322
                     // Add the repeater script 
323
-                    $_aOutput[] = $aField['repeatable']
324
-                        ? $this->_getRepeaterFieldEnablerScript( 'fields-' . $aField['tag_id'], $iFieldsCount, $aField['repeatable'] )
323
+                    $_aOutput[ ] = $aField[ 'repeatable' ]
324
+                        ? $this->_getRepeaterFieldEnablerScript( 'fields-'.$aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] )
325 325
                         : '';
326 326
 
327 327
                     // Add the sortable script - if the number of fields is only one, no need to sort the field. 
328 328
                     // Repeatable fields can make the number increase so here it checkes the repeatability.
329
-                    $_aOutput[] = $aField['sortable'] && ( $iFieldsCount > 1 || $aField['repeatable'] )
330
-                        ? $this->_getSortableFieldEnablerScript( 'fields-' . $aField['tag_id'] )
329
+                    $_aOutput[ ] = $aField[ 'sortable' ] && ( $iFieldsCount > 1 || $aField[ 'repeatable' ] )
330
+                        ? $this->_getSortableFieldEnablerScript( 'fields-'.$aField[ 'tag_id' ] )
331 331
                         : '';     
332 332
                     
333 333
                     return implode( PHP_EOL, $_aOutput );
Please login to merge, or discard this patch.
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.