Test Setup Failed
Branch dev (5f92be)
by Michael
01:08
created
factory/_common/form/field_type/file/AdminPageFramework_FieldType_file.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * Defines the field type slugs used for this field type.
38 38
      */
39
-    public $aFieldTypeSlugs = array( 'file', );
39
+    public $aFieldTypeSlugs = array( 'file',);
40 40
 
41 41
     /**
42 42
      * Defines the default key-values of this field type.
@@ -96,15 +96,15 @@  discard block
 block discarded – undo
96 96
                 array(
97 97
                     'type'  => 'hidden',
98 98
                     'value' => '',
99
-                    'name'  => $aField[ 'attributes' ][ 'name' ] . '[_dummy_value]',
99
+                    'name'  => $aField[ 'attributes' ][ 'name' ].'[_dummy_value]',
100 100
                 )
101 101
             )
102 102
             . $this->getHTMLTag(
103 103
                 'input',
104 104
                 array(
105 105
                     'type'  => 'hidden',
106
-                    'name'  => '__unset_' . $aField[ '_structure_type' ] . '[' . $aField[ '_input_name_flat' ] . '|_dummy_value' . ']',
107
-                    'value' => $aField[ '_input_name_flat' ] . '|_dummy_value',
106
+                    'name'  => '__unset_'.$aField[ '_structure_type' ].'['.$aField[ '_input_name_flat' ].'|_dummy_value'.']',
107
+                    'value' => $aField[ '_input_name_flat' ].'|_dummy_value',
108 108
                     'class' => 'unset-element-names element-address',
109 109
                 )
110 110
             );
Please login to merge, or discard this patch.
_common/form/field_type/textarea/AdminPageFramework_FieldType_textarea.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         return array(
126 126
             array(
127 127
                 'handle_id'         => 'admin-page-framework-field-type-textarea',
128
-                'src'               => dirname( __FILE__ ) . '/js/textarea.bundle.js',
128
+                'src'               => dirname( __FILE__ ).'/js/textarea.bundle.js',
129 129
                 'in_footer'         => true,
130 130
                 'dependencies'      => array( 'jquery', 'admin-page-framework-script-form-main' ),
131 131
                 'translation_var'   => 'AdminPageFrameworkFieldTypeTextArea',
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
     protected function getField( $aField ) {
150 150
 
151 151
         $_aOutput = array();
152
-        foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
153
-            $_aOutput[] = $this->_getFieldOutputByLabel(
152
+        foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
153
+            $_aOutput[ ] = $this->_getFieldOutputByLabel(
154 154
                 $_sKey,
155 155
                 $_sLabel,
156 156
                 $aField
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         }
159 159
 
160 160
         // the repeatable field buttons will be replaced with this element.
161
-        $_aOutput[] = "<div class='repeatable-field-buttons'></div>";
161
+        $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>";
162 162
         return implode( '', $_aOutput );
163 163
 
164 164
     }
@@ -179,27 +179,27 @@  discard block
 block discarded – undo
179 179
             $aField[ 'rich' ]       = $this->getElementByLabel( $aField[ 'rich' ], $sKey, $aField[ 'label' ] );
180 180
             $aField[ 'attributes' ] = $_bIsArray
181 181
                 ? array(
182
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]",
183
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}",
182
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]",
183
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$sKey}",
184 184
                         'value' => $aField[ 'value' ],
185 185
                     )
186 186
                     + $aField[ 'attributes' ]
187 187
                 : $aField[ 'attributes' ];
188
-            $_aOutput           = array(
189
-                $this->getElementByLabel( $aField['before_label'], $sKey, $aField[ 'label' ] ),
188
+            $_aOutput = array(
189
+                $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ),
190 190
                 "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>",
191
-                    "<label for='" . $aField[ 'attributes' ][ 'id' ] . "'>",
192
-                        $this->getElementByLabel( $aField['before_input'], $sKey, $aField[ 'label' ] ),
191
+                    "<label for='".$aField[ 'attributes' ][ 'id' ]."'>",
192
+                        $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $aField[ 'label' ] ),
193 193
                         $_sLabel
194
-                            ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">"
194
+                            ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">"
195 195
                                     . $_sLabel
196 196
                                 . "</span>"
197 197
                             : '',
198 198
                         $this->_getEditor( $aField ),
199
-                        $this->getElementByLabel( $aField['after_input'], $sKey, $aField[ 'label' ] ),
199
+                        $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $aField[ 'label' ] ),
200 200
                     "</label>",
201 201
                 "</div>",
202
-                $this->getElementByLabel( $aField['after_label'], $sKey, $aField[ 'label' ] ),
202
+                $this->getElementByLabel( $aField[ 'after_label' ], $sKey, $aField[ 'label' ] ),
203 203
             );
204 204
             return implode( '', $_aOutput );
205 205
 
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
             unset( $aField[ 'attributes' ][ 'value' ] );
218 218
 
219 219
             // For no TinyMCE
220
-            if ( empty( $aField[ 'rich' ] ) || ! $this->isTinyMCESupported() ) {
221
-                return "<textarea " . $this->getAttributes( $aField[ 'attributes' ] ) . " >" // this method is defined in the base class
220
+            if ( empty( $aField[ 'rich' ] ) || !$this->isTinyMCESupported() ) {
221
+                return "<textarea ".$this->getAttributes( $aField[ 'attributes' ] )." >" // this method is defined in the base class
222 222
                             . esc_textarea( $aField[ 'value' ] )
223 223
                         . "</textarea>";
224 224
             }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             ob_end_clean();
251 251
 
252 252
             return $_sContent
253
-                . "<input type='hidden' class='admin-page-framework-textarea-data-input' data-tinymce-textarea='" . esc_attr( $aField[ 'attributes' ][ 'id' ] ) . "' />"; // needed for JavaScript initialization
253
+                . "<input type='hidden' class='admin-page-framework-textarea-data-input' data-tinymce-textarea='".esc_attr( $aField[ 'attributes' ][ 'id' ] )."' />"; // needed for JavaScript initialization
254 254
 
255 255
         }
256 256
 
Please login to merge, or discard this patch.
_common/form/field_type/color/AdminPageFramework_FieldType_color.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
             // For front-end
86 86
             // @see     http://wordpress.stackexchange.com/a/82722
87
-            if ( ! is_admin() ) {
87
+            if ( !is_admin() ) {
88 88
 
89 89
                 // wp_enqueue_style( 'wp-color-picker' );
90 90
                 wp_enqueue_script(
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         return array(
125 125
             array(
126 126
                 'handle_id'     => 'admin-page-framework-field-type-color',
127
-                'src'           => dirname( __FILE__ ) . '/js/color.bundle.js',
127
+                'src'           => dirname( __FILE__ ).'/js/color.bundle.js',
128 128
                 'in_footer'         => true,
129 129
                 'dependencies'      => array( 'jquery', 'admin-page-framework-script-form-main' ),
130 130
                 'translation_var'   => 'AdminPageFrameworkColorFieldType',
@@ -149,22 +149,22 @@  discard block
 block discarded – undo
149 149
         $aField[ 'attributes' ] = $this->___getInputAttributes( $aField );
150 150
         return $aField[ 'before_label' ]
151 151
             . "<div class='admin-page-framework-input-label-container'>"
152
-                . ( $aField[ 'label' ] && ! $aField[ 'repeatable' ]
153
-                    ? "<label><span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">"
152
+                . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
153
+                    ? "<label><span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">"
154 154
                             . $aField[ 'label' ]
155 155
                         . "</span></label>"
156 156
                     : ""
157 157
                 )
158 158
                 . "<label for='{$aField[ 'input_id' ]}'>"
159 159
                     . $aField[ 'before_input' ]
160
-                    . "<input " . $this->getAttributes( $aField[ 'attributes' ] ) . " />"
160
+                    . "<input ".$this->getAttributes( $aField[ 'attributes' ] )." />"
161 161
                     . $aField[ 'after_input' ]
162 162
                 . "</label>"
163 163
                 // this div element with this class selector becomes a farbtastic color picker. ( below 3.4.x ) // rel='{$aField['input_id']}'
164
-                . "<div class='colorpicker admin-page-framework-field-color-picker' id='color_" . esc_attr( $aField[ 'input_id' ] ) . "' data-input_id='" . esc_attr( $aField[ 'input_id' ] ) . "'></div>"
164
+                . "<div class='colorpicker admin-page-framework-field-color-picker' id='color_".esc_attr( $aField[ 'input_id' ] )."' data-input_id='".esc_attr( $aField[ 'input_id' ] )."'></div>"
165 165
                 . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
166 166
             . "</div>"
167
-            . $aField['after_label'];
167
+            . $aField[ 'after_label' ];
168 168
 
169 169
     }
170 170
         /**
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
         private function ___getInputAttributes( array $aField ) {
176 176
 
177 177
             return array(
178
-                'color'        => $aField['value'],
179
-                'value'        => $aField['value'],
178
+                'color'        => $aField[ 'value' ],
179
+                'value'        => $aField[ 'value' ],
180 180
                 'data-default' => isset( $aField[ 'default' ] )
181 181
                     ? $aField[ 'default' ]
182 182
                     : 'transparent', // used by the repeatable script
183 183
                 'type'         => 'text', // it must be text
184
-                'class'        => trim( 'input_color ' . $aField['attributes']['class'] ),
184
+                'class'        => trim( 'input_color '.$aField[ 'attributes' ][ 'class' ] ),
185 185
             ) + $aField[ 'attributes' ];
186 186
 
187 187
         }
Please login to merge, or discard this patch.
_common/form/field_type/table/AdminPageFramework_FieldType_table.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     /**
209 209
      * Defines the field type slugs used for this field type.
210 210
      */
211
-    public $aFieldTypeSlugs = array( 'table', );
211
+    public $aFieldTypeSlugs = array( 'table',);
212 212
 
213 213
     /**
214 214
      * Defines the default key-values of this field type.
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
         'collapsible'     => false,
221 221
         'escape'          => false,
222 222
         'caption'         => '',
223
-        'header'          => array(),  // (array) key-value pairs of the table header
224
-        'footer'          => array(),  // (array|string) key-value pairs of the table footer. When `USE_HEADER` is passed, the value set to the `header` argument will be applied.
223
+        'header'          => array(), // (array) key-value pairs of the table header
224
+        'footer'          => array(), // (array|string) key-value pairs of the table footer. When `USE_HEADER` is passed, the value set to the `header` argument will be applied.
225 225
 
226 226
         // [Not fully implemented] To fully support most use cases, a library like the tablesorter jQuery plugin is big in size. And it is more suitable for a custom field type.
227 227
         // this argument just adds `sortable-column` class selector to specified column index but does nothing yet.
228
-        'sortable_column' => array(),  // (array) linear array consisting of boolean values indicating which columns should be sortable by matching the array index with the header argument array index.
228
+        'sortable_column' => array(), // (array) linear array consisting of boolean values indicating which columns should be sortable by matching the array index with the header argument array index.
229 229
     );
230 230
 
231 231
     /**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         return array(
237 237
             array(
238 238
                 'handle_id'         => 'admin-page-framework-field-type-table',
239
-                'src'               => dirname( __FILE__ ) . '/js/table.bundle.js',
239
+                'src'               => dirname( __FILE__ ).'/js/table.bundle.js',
240 240
                 'in_footer'         => true,
241 241
                 'dependencies'      => array( 'jquery', 'jquery-ui-accordion', 'admin-page-framework-script-form-main' ),
242 242
                 'translation_var'   => 'AdminPageFrameworkFieldTypeTable',
@@ -269,12 +269,12 @@  discard block
 block discarded – undo
269 269
          * @return string
270 270
          */
271 271
         private function ___getLabel( $aField ) {
272
-            if ( ! strlen( $aField[ 'label' ] ) ) {
272
+            if ( !strlen( $aField[ 'label' ] ) ) {
273 273
                 return '';
274 274
             }
275 275
             return "<div class='admin-page-framework-input-label-container'>"
276
-                    . "<label for='" . esc_attr( $aField[ 'input_id' ] ) . "'>"
277
-                    . "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">"
276
+                    . "<label for='".esc_attr( $aField[ 'input_id' ] )."'>"
277
+                    . "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">"
278 278
                         . $aField[ 'label' ]
279 279
                     . "</span>"
280 280
                     . "</label>"
@@ -299,9 +299,9 @@  discard block
 block discarded – undo
299 299
             if ( empty( $_aCollapsible ) ) {
300 300
                 return $this->getTableOfArray(
301 301
                     $this->getAsArray( $aField[ 'data' ] ),
302
-                    $_aAttributes,          // attributes
303
-                    $aField[ 'header' ],    // header
304
-                    $_aFooter,    // footer,
302
+                    $_aAttributes, // attributes
303
+                    $aField[ 'header' ], // header
304
+                    $_aFooter, // footer,
305 305
                     $aField[ 'escape' ],
306 306
                     $aField[ 'caption' ]
307 307
                 );
@@ -315,16 +315,16 @@  discard block
 block discarded – undo
315 315
                 ? "<div class='text-content'>{$aField[ 'data' ]}</div>" // this allows to create simple FAQ
316 316
                 : $this->getTableOfArray(
317 317
                     $this->getAsArray( $aField[ 'data' ] ),
318
-                    $_aAttributes,          // attributes,
319
-                    $aField[ 'header' ],    // header
320
-                    $_aFooter,    // footer,
318
+                    $_aAttributes, // attributes,
319
+                    $aField[ 'header' ], // header
320
+                    $_aFooter, // footer,
321 321
                     $aField[ 'escape' ]
322
-                );  // omit caption
322
+                ); // omit caption
323 323
             $_aCollapsible = $this->getAsArray( $_aCollapsible ) + array( 'active' => null );
324 324
             $_aCollapsible[ 'active' ] = is_numeric( $_aCollapsible[ 'active' ] )
325 325
                 ? ( integer ) $_aCollapsible[ 'active' ]                // accepts numeric index values
326
-                : ( $_aCollapsible[ 'active' ] ? 'true' : 'false' );    // passing a value as string to be parsed properly on the JS side
327
-            return "<div class='accordion-container' " . $this->getDataAttributes( $_aCollapsible ) . ">"
326
+                : ( $_aCollapsible[ 'active' ] ? 'true' : 'false' ); // passing a value as string to be parsed properly on the JS side
327
+            return "<div class='accordion-container' ".$this->getDataAttributes( $_aCollapsible ).">"
328 328
                     . "<div class='accordion-title'><h4><span>{$_sCaption}</span></h4></div>"
329 329
                     . "<div class='accordion-content'>{$_sContent}</div>"
330 330
                 . "</div>";
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                 );
343 343
 
344 344
                 // Add sortable header and footer classes
345
-                foreach( $this->getAsArray( $aField[ 'sortable_column' ] ) as $_iColumnIndex => $_bSortable ) {
345
+                foreach ( $this->getAsArray( $aField[ 'sortable_column' ] ) as $_iColumnIndex => $_bSortable ) {
346 346
                     if ( empty( $_bSortable ) ) {
347 347
                         continue;
348 348
                     }
Please login to merge, or discard this patch.
_common/form/field_type/select/AdminPageFramework_FieldType_select.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * Defines the field type slugs used for this field type.
104 104
      */
105
-    public $aFieldTypeSlugs = array( 'select', );
105
+    public $aFieldTypeSlugs = array( 'select',);
106 106
 
107 107
     /**
108 108
      * Defines the default key-values of this field type.
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             'select'    => array(
115 115
                 'size'          => 1,
116 116
                 'autofocusNew'  => null,
117
-                'multiple'      => null,    // set 'multiple' for multiple selections. If 'is_multiple' is set, it takes the precedence.
117
+                'multiple'      => null, // set 'multiple' for multiple selections. If 'is_multiple' is set, it takes the precedence.
118 118
                 'required'      => null,
119 119
             ),
120 120
             'optgroup'  => array(),
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
     protected function getField( $aField ) {
155 155
 
156 156
         $_oSelectInput = new AdminPageFramework_Input_select( $aField[ 'attributes' ] );
157
-        if ( $aField[ 'is_multiple' ]  ) {
157
+        if ( $aField[ 'is_multiple' ] ) {
158 158
             $_oSelectInput->setAttribute( array( 'select', 'multiple' ), 'multiple' );
159 159
         }
160 160
         return
161 161
             $aField[ 'before_label' ]
162
-            . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ) . ">"
162
+            . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ).">"
163 163
                 . "<label for='{$aField[ 'input_id' ]}'>"
164 164
                     . $aField[ 'before_input' ]
165 165
                     . $_oSelectInput->get( $aField[ 'label' ] )
Please login to merge, or discard this patch.
_common/form/field_type/_nested/AdminPageFramework_FieldType__nested.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function getField( $aField ) {
68 68
 
69
-        $_oCallerForm   = $aField[ '_caller_object' ];
69
+        $_oCallerForm = $aField[ '_caller_object' ];
70 70
 
71 71
         $_aInlineMixedOutput = array();
72
-        foreach( $this->getAsArray( $aField[ 'content' ] ) as $_aChildFieldset ) {
72
+        foreach ( $this->getAsArray( $aField[ 'content' ] ) as $_aChildFieldset ) {
73 73
 
74 74
             if ( is_scalar( $_aChildFieldset ) ) {
75 75
                 continue;
76 76
             }
77 77
 
78
-            if ( ! $this->isNormalPlacement( $_aChildFieldset ) ) {
78
+            if ( !$this->isNormalPlacement( $_aChildFieldset ) ) {
79 79
                 continue;
80 80
             }
81 81
 
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
             $_oFieldset = new AdminPageFramework_Form_View___Fieldset(
92 92
                 $_aChildFieldset,
93 93
                 $_oCallerForm->aSavedData,
94
-                $_oCallerForm->getFieldErrors(),    // @todo Generate field errors. $this->aErrors,
94
+                $_oCallerForm->getFieldErrors(), // @todo Generate field errors. $this->aErrors,
95 95
                 $_oCallerForm->aFieldTypeDefinitions,
96 96
                 $_oCallerForm->oMsg,
97 97
                 $_oCallerForm->aCallbacks // field output element callables.
98 98
             );
99
-            $_aInlineMixedOutput[] = $_oFieldset->get(); // field output
99
+            $_aInlineMixedOutput[ ] = $_oFieldset->get(); // field output
100 100
 
101 101
 
102 102
         }
Please login to merge, or discard this patch.
_common/form/field_type/radio/AdminPageFramework_FieldType_radio.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         return array(
65 65
             array(
66 66
                 'handle_id'         => 'admin-page-framework-field-type-radio',
67
-                'src'               => dirname( __FILE__ ) . '/js/radio.bundle.js',
67
+                'src'               => dirname( __FILE__ ).'/js/radio.bundle.js',
68 68
                 'in_footer'         => true,
69 69
                 'dependencies'      => array( 'jquery', 'admin-page-framework-script-form-main' ),
70 70
                 'translation_var'   => 'AdminPageFrameworkFieldTypeRadio',
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      * @return      string
87 87
      */
88 88
     protected function getField( $aField ) {
89
-        $_aOutput   = array();
90
-        foreach( $this->getAsArray( $aField[ 'label' ] ) as $_sKey => $_sLabel ) {
91
-            $_aOutput[] = $this->___getEachRadioButtonOutput( $aField, $_sKey, $_sLabel );
89
+        $_aOutput = array();
90
+        foreach ( $this->getAsArray( $aField[ 'label' ] ) as $_sKey => $_sLabel ) {
91
+            $_aOutput[ ] = $this->___getEachRadioButtonOutput( $aField, $_sKey, $_sLabel );
92 92
         }
93 93
         return implode( PHP_EOL, $_aOutput );
94 94
     }
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 
109 109
             // Output
110 110
             return $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] )
111
-                . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-radio-label' ) . ">"
112
-                    . "<label " . $this->getAttributes(
111
+                . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-radio-label' ).">"
112
+                    . "<label ".$this->getAttributes(
113 113
                             array(
114 114
                                 'for'   => $_oRadio->getAttribute( 'id' ),
115 115
                                 'class' => $_oRadio->getAttribute( 'disabled' )
Please login to merge, or discard this patch.
form/field_type/inline_mixed/AdminPageFramework_FieldType_inline_mixed.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -217,8 +217,8 @@
 block discarded – undo
217 217
      * @remark $_aDefaultKeys holds shared default key-values defined in the base class.
218 218
      */
219 219
     protected $aDefaultKeys = array(
220
-        'label_min_width'  => '',       // disabled as the embedded elements are all inline.
221
-        'show_debug_info'  => false,    // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it.
220
+        'label_min_width'  => '', // disabled as the embedded elements are all inline.
221
+        'show_debug_info'  => false, // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it.
222 222
     );
223 223
 
224 224
 }
225 225
\ No newline at end of file
Please login to merge, or discard this patch.
_common/form/field_type/checkbox/AdminPageFramework_FieldType_checkbox.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
      * Defines the default key-values of this field type.
77 77
      */
78 78
     protected $aDefaultKeys = array(
79
-        'select_all_button'     => false,        // 3.3.0+   to change the label, set the label here
80
-        'select_none_button'    => false,        // 3.3.0+   to change the label, set the label here
81
-        'save_unchecked'        => true,        // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
79
+        'select_all_button'     => false, // 3.3.0+   to change the label, set the label here
80
+        'select_none_button'    => false, // 3.3.0+   to change the label, set the label here
81
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
82 82
     );
83 83
 
84 84
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         return array(
90 90
             array(
91 91
                 'handle_id'         => 'admin-page-framework-field-type-checkbox',
92
-                'src'               => dirname( __FILE__ ) . '/js/checkbox.bundle.js',
92
+                'src'               => dirname( __FILE__ ).'/js/checkbox.bundle.js',
93 93
                 'in_footer'         => true,
94 94
                 'dependencies'      => array( 'jquery', 'admin-page-framework-script-form-main' ),
95 95
                 'translation_var'   => 'AdminPageFrameworkFieldTypeCheckbox',
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
          * @return   string
110 110
          * @internal
111 111
          */
112
-        private function ___getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute='select_all_button' ) {
112
+        private function ___getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute = 'select_all_button' ) {
113 113
             $_aClassSelectors = array();
114 114
             foreach ( $aFieldTypeSlugs as $_sSlug ) {
115
-                if ( ! is_scalar( $_sSlug ) ) {
115
+                if ( !is_scalar( $_sSlug ) ) {
116 116
                     continue;
117 117
                 }
118
-                $_aClassSelectors[] = '.admin-page-framework-checkbox-container-' . $_sSlug . "[data-{$sDataAttribute}]";
118
+                $_aClassSelectors[ ] = '.admin-page-framework-checkbox-container-'.$_sSlug."[data-{$sDataAttribute}]";
119 119
             }
120 120
             return implode( ',', $_aClassSelectors );
121 121
         }
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 
143 143
         $_aOutput       = array();
144 144
         $_bIsMultiple   = is_array( $aField[ 'label' ] );
145
-        foreach( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
146
-            $_aOutput[] = $this->_getEachCheckboxOutput(
145
+        foreach ( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
146
+            $_aOutput[ ] = $this->_getEachCheckboxOutput(
147 147
                 $aField,
148 148
                 $_bIsMultiple
149 149
                     ? $_sKey
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 $_sLabel
152 152
             );
153 153
         }
154
-        return "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">"
154
+        return "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">"
155 155
                 . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
156 156
                 . implode( PHP_EOL, $_aOutput )
157 157
             . "</div>";
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
          */
167 167
         protected function _getCheckboxContainerAttributes( array $aField ) {
168 168
             return array(
169
-                'class'                     => 'admin-page-framework-checkbox-container-' . $aField[ 'type' ],
169
+                'class'                     => 'admin-page-framework-checkbox-container-'.$aField[ 'type' ],
170 170
                 'data-select_all_button'    => $aField[ 'select_all_button' ]
171
-                    ? ( ! is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
171
+                    ? ( !is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
172 172
                     : null,
173 173
                 'data-select_none_button'   => $aField[ 'select_none_button' ]
174
-                    ? ( ! is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
174
+                    ? ( !is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
175 175
                     : null,
176 176
             );
177 177
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         private function _getEachCheckboxOutput( array $aField, $sKey, $sLabel ) {
187 187
 
188 188
             $_aInputAttributes = array(
189
-                'data-key'  => $sKey,   // 3.8.8+ For the `post_type_taxonomy` field type.
189
+                'data-key'  => $sKey, // 3.8.8+ For the `post_type_taxonomy` field type.
190 190
             ) + $aField[ 'attributes' ];
191 191
             $_oCheckbox = new AdminPageFramework_Input_checkbox(
192 192
                 $_aInputAttributes,
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
             $_oCheckbox->setAttributesByKey( $sKey );
198 198
             $_oCheckbox->addClass( $this->_sCheckboxClassSelector );
199 199
             return $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] )
200
-                . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ) . ">"
201
-                    . "<label " . $this->getAttributes(
200
+                . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ).">"
201
+                    . "<label ".$this->getAttributes(
202 202
                         array(
203 203
                             'for'   => $_oCheckbox->getAttribute( 'id' ),
204 204
                             'class' => $_oCheckbox->getAttribute( 'disabled' )
Please login to merge, or discard this patch.