Test Failed
Branch dev (2230d2)
by Michael
38:39
created
development/cli/AdminPageFramework_ClassMapHeader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * If accessed from a console, include the registry class to load 'AdminPageFramework_Registry_Base'.
12 12
  */
13 13
 if ( php_sapi_name() === 'cli' ) {
14
-    $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php';
14
+    $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php';
15 15
     if ( file_exists( $_sFrameworkFilePath ) ) {
16 16
         include_once( $_sFrameworkFilePath );
17 17
     }
Please login to merge, or discard this patch.
generator/AdminPageFrameworkLoader_AdminPage_Tool_Compiler_Compiler.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this->oFactory = $oFactory;
32 32
 
33 33
         add_action(
34
-            'export_name_' . $this->sPageSlug . '_' . $this->sTabSlug,
34
+            'export_name_'.$this->sPageSlug.'_'.$this->sTabSlug,
35 35
             array( $this, 'replyToFilterFileName' ),
36 36
             10,
37 37
             5
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
                 'label_min_width'   => 0,
128 128
                 'order'             => 100,
129 129
                 'value'             => __( 'Download', 'admin-page-framework-demo' ),
130
-                'file_name'         => 'admin-page-framework.zip',  // the default file name. This will be modified by the filter.
131
-                'format'            => 'text',  // 'json', 'text', 'array'
130
+                'file_name'         => 'admin-page-framework.zip', // the default file name. This will be modified by the filter.
131
+                'format'            => 'text', // 'json', 'text', 'array'
132 132
                 'description'       => $oFactory->oUtil->getAOrB(
133 133
                     class_exists( 'ZipArchive' ),
134 134
                     __( 'Download the compiled framework files as a zip file.', 'admin-page-framework-loader' ),
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
 
186 186
         // the class prefix must not contain white spaces and some other characters not supported in PHP class names.
187 187
         preg_match(
188
-            '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/',     // pattern - allowed characters for variables in PHP.
189
-            $aInputs[ 'class_prefix' ],     // subject
188
+            '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', // pattern - allowed characters for variables in PHP.
189
+            $aInputs[ 'class_prefix' ], // subject
190 190
             $_aMatches
191 191
         );
192 192
         if ( $aInputs[ 'class_prefix' ] && empty( $_aMatches ) ) {
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
             $_bVerified = false;
195 195
         }
196 196
 
197
-        if ( ! $aInputs[ 'text_domain' ] ) {
197
+        if ( !$aInputs[ 'text_domain' ] ) {
198 198
             $_aErrors[ $this->sSectionID ][ 'text_domain' ] = __( 'The text domain cannot be empty.', 'admin-page-framework-loader' );
199 199
             $_bVerified = false;
200 200
         }
201 201
 
202 202
         // An invalid value is found. Set a field error array and an admin notice and return the old values.
203
-        if ( ! $_bVerified ) {
203
+        if ( !$_bVerified ) {
204 204
             $oAdminPage->setFieldErrors( $_aErrors );
205 205
             $oAdminPage->setSettingNotice( __( 'There was something wrong with your input.', 'admin-page-framework-loader' ) );
206 206
             return $aOldInputs;
@@ -246,8 +246,8 @@  discard block
 block discarded – undo
246 246
      */
247 247
     public function replyToDownloadFramework( $aSavedData, $sSubmittedFieldID, $sSubmittedInputID, $oAdminPage ) {
248 248
 
249
-        $_sFrameworkDirPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf';
250
-        if ( ! file_exists( $_sFrameworkDirPath ) ) {
249
+        $_sFrameworkDirPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf';
250
+        if ( !file_exists( $_sFrameworkDirPath ) ) {
251 251
             return $aSavedData;
252 252
         }
253 253
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             $_sFrameworkDirPath,
257 257
             $_sTempFile
258 258
         );
259
-        header( "Content-Length: " . strlen( $_sData ) );
259
+        header( "Content-Length: ".strlen( $_sData ) );
260 260
         unlink( $_sTempFile );
261 261
         return $_sData;
262 262
 
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
                 $sFrameworkDirPath,
274 274
                 $sDestinationPath,
275 275
                 array(
276
-                    'include_directory'             => false,   // wrap contents in a sub-directory
276
+                    'include_directory'             => false, // wrap contents in a sub-directory
277 277
                     'additional_source_directories' => apply_filters(
278
-                        AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_additional_source_directories',
278
+                        AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_additional_source_directories',
279 279
                         array() // directory paths
280 280
                     ),
281 281
                 ),
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                 )
287 287
             );
288 288
             $_bSucceed = $_oZip->compress();
289
-            if ( ! $_bSucceed ) {
289
+            if ( !$_bSucceed ) {
290 290
                 return '';
291 291
             }
292 292
             return file_get_contents( $sDestinationPath );
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
             public function replyToGetPathInArchiveModified( $sPathInArchive ) {
306 306
                 // Check if it belongs to selected components.
307 307
                 if ( false === $this->___isAllowedArchivePath( $sPathInArchive ) ) {
308
-                    return '';  // empty value will drop the entry
308
+                    return ''; // empty value will drop the entry
309 309
                 }
310 310
                 return $sPathInArchive;
311 311
             }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                  * @return boolean
318 318
                  */
319 319
                 private function ___isAllowedArchivePath( $sPath ) {
320
-                    foreach( $this->___getDisallowedArchiveDirectoryPaths() as $_sDisallowedPath ) {
320
+                    foreach ( $this->___getDisallowedArchiveDirectoryPaths() as $_sDisallowedPath ) {
321 321
                         $_bHasPrefix = $this->oFactory->oUtil->hasPrefix(
322 322
                             ltrim( $_sDisallowedPath, '/' ), // needle
323 323
                             ltrim( $sPath, '/' ) // haystack
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
                     // List paths.
390 390
                     $_aAllComponentsPaths       = array();
391 391
                     $_aSelectedComponentsPaths  = array();
392
-                    foreach( $this->_aComponentPaths as $_sKey => $_aPaths ) {
392
+                    foreach ( $this->_aComponentPaths as $_sKey => $_aPaths ) {
393 393
 
394 394
                         // Extract all component paths.
395 395
                         $_aAllComponentsPaths = array_merge(
@@ -440,13 +440,13 @@  discard block
 block discarded – undo
440 440
              */
441 441
             public function replyToGetFileContentModified( $sFileContent, $sPathInArchive, $sSourceItemPath ) {
442 442
 
443
-                if ( ! $this->___isAllowedToModifyContent( $sPathInArchive, $sSourceItemPath ) ) {
443
+                if ( !$this->___isAllowedToModifyContent( $sPathInArchive, $sSourceItemPath ) ) {
444 444
                     return $sFileContent;
445 445
                 }
446 446
 
447 447
                 // Modify the file contents.
448 448
                 $sFileContent = apply_filters(
449
-                    AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_file_contents',
449
+                    AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_file_contents',
450 450
                     $sFileContent,
451 451
                     $sPathInArchive,
452 452
                     $this->oFactory->oUtil->getElement(
@@ -473,20 +473,20 @@  discard block
 block discarded – undo
473 473
                     static $_aIgnoreDirPaths = array();
474 474
                     $_sSourceItemDirPath = dirname( $sSourceItemPath );
475 475
                     if ( basename( $sSourceItemPath ) === 'ignore-apf-build.txt' ) {
476
-                        $_aIgnoreDirPaths[] = $_sSourceItemDirPath;
476
+                        $_aIgnoreDirPaths[ ] = $_sSourceItemDirPath;
477 477
                     }
478 478
 
479 479
                     // Check the file extension.
480 480
                     $_aAllowedExtensions = apply_filters(
481
-                        AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions',
481
+                        AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_allowed_file_extensions',
482 482
                         array( 'php', 'css', 'js' )
483 483
                     );
484
-                    if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions, true ) ) {
484
+                    if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions, true ) ) {
485 485
                         return false;
486 486
                     }
487 487
 
488 488
                     // Check if it is inside an ignored directory.
489
-                    foreach( $_aIgnoreDirPaths as $_sIgnoreDirPath ) {
489
+                    foreach ( $_aIgnoreDirPaths as $_sIgnoreDirPath ) {
490 490
                         if ( false !== strpos( $sSourceItemPath, $_sIgnoreDirPath ) ) {
491 491
                             return false;
492 492
                         }
@@ -534,14 +534,14 @@  discard block
 block discarded – undo
534 534
                             $this->___getComponentLabels(),
535 535
                             $this->___getCheckedComponents()
536 536
                         );
537
-                        $_aInsert            = array(
538
-                            'Compiled on ' . date( 'Y-m-d' ),  // today's date
539
-                            'Included Components: ' . implode( ', ', $_aCheckedComponents ),
537
+                        $_aInsert = array(
538
+                            'Compiled on '.date( 'Y-m-d' ), // today's date
539
+                            'Included Components: '.implode( ', ', $_aCheckedComponents ),
540 540
                         );
541
-                        $_sInsertComment     = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_header_comment', implode( PHP_EOL . ' * ', $_aInsert ) );
541
+                        $_sInsertComment = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_header_comment', implode( PHP_EOL.' * ', $_aInsert ) );
542 542
                         return preg_replace(
543 543
                             '#[^\S\r\n]+?\*/#', // needle - matches '*/' or ' */'
544
-                            ' * ' . trim( $_sInsertComment ) . PHP_EOL . '\0', // replacement \0 is a back-reference to '*/'
544
+                            ' * '.trim( $_sInsertComment ).PHP_EOL.'\0', // replacement \0 is a back-reference to '*/'
545 545
                             $sFileContent, // subject
546 546
                             1 // replace only the first occurrence
547 547
                         );
@@ -555,14 +555,14 @@  discard block
 block discarded – undo
555 555
                     private function ___getClassNameOfIncludeListModified( $sFileContents ) {
556 556
                         // Replace the array key names.
557 557
                         $sFileContents = preg_replace_callback(
558
-                            '/(["\'])(.+)\1(?=\s?+=>)/',  // pattern '
559
-                            array( $this, '_replyToModifyPathName' ),   // callable
558
+                            '/(["\'])(.+)\1(?=\s?+=>)/', // pattern '
559
+                            array( $this, '_replyToModifyPathName' ), // callable
560 560
                             $sFileContents // subject
561 561
                         );
562 562
                         // Replace the registry class names.
563 563
                         return preg_replace_callback(
564
-                            '/(=>\s?+)(.+)(?=::)/',  // pattern '
565
-                            array( $this, '_replyToModifyPathName' ),   // callable
564
+                            '/(=>\s?+)(.+)(?=::)/', // pattern '
565
+                            array( $this, '_replyToModifyPathName' ), // callable
566 566
                             $sFileContents // subject
567 567
                         );
568 568
                     }
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
                     return strlen( $_sPrefix )
587 587
                         ? str_replace(
588 588
                             'AdminPageFramework', // search
589
-                            $_sPrefix . 'AdminPageFramework', // replace
589
+                            $_sPrefix.'AdminPageFramework', // replace
590 590
                             $sSubject // subject
591 591
                         )
592 592
                         : $sSubject;
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
                      * @return string
616 616
                      */
617 617
                     private function ___getFormSubmitValueByFieldIDAsString( $sFieldID ) {
618
-                        static $_aCaches=array();
618
+                        static $_aCaches = array();
619 619
                         $_aCaches[ $sFieldID ] = isset( $_aCaches[ $sFieldID ] )
620 620
                             ? $_aCaches[ $sFieldID ]
621 621
                             : $this->oFactory->oUtil->getElement(
@@ -648,9 +648,9 @@  discard block
 block discarded – undo
648 648
                 'public',
649 649
             ),
650 650
             'Content-Description'       => 'File Transfer',
651
-            'Content-type'              => 'application/octet-stream',   // 'application/zip' may work as well
651
+            'Content-type'              => 'application/octet-stream', // 'application/zip' may work as well
652 652
             'Content-Transfer-Encoding' => 'binary',
653
-            'Content-Disposition'       => 'attachment; filename="' . $sFileName .'";',
653
+            'Content-Disposition'       => 'attachment; filename="'.$sFileName.'";',
654 654
             // 'Content-Length'            => strlen( $mData ),
655 655
         ) + $aHeader;
656 656
 
@@ -686,10 +686,10 @@  discard block
 block discarded – undo
686 686
         $_sFileNameWOExtension = trim( sanitize_text_field( $_sFileNameWOExtension ) );
687 687
         return $this->oFactory->oUtil->getAOrB(
688 688
                 $_sFileNameWOExtension,
689
-                $_sFileNameWOExtension . '-admin-page-framework',
689
+                $_sFileNameWOExtension.'-admin-page-framework',
690 690
                 'admin-page-framework'
691 691
             )
692
-            . '.' . AdminPageFramework_Registry::VERSION
692
+            . '.'.AdminPageFramework_Registry::VERSION
693 693
             . '.zip';
694 694
     }
695 695
 
Please login to merge, or discard this patch.
_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $this->aFieldset[ '_field_path_array' ],
37 37
             $this->aFieldset[ 'error_message' ]
38 38
         );
39
-        $_aOutputs[]     = $_oFieldError->get();
39
+        $_aOutputs[ ] = $_oFieldError->get();
40 40
 
41 41
         // Construct fields array for sub-fields.
42 42
         $_oFieldsFormatter = new AdminPageFramework_Form_Model___Format_Fields(
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $_aFields = $_oFieldsFormatter->get();
47 47
 
48 48
         /// Get the field and its sub-fields output.
49
-        $_aOutputs[] = $this->___getFieldsOutput(
49
+        $_aOutputs[ ] = $this->___getFieldsOutput(
50 50
             $this->aFieldset,
51 51
             $_aFields,
52 52
             $this->aCallbacks
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
          * @since   3.8.0  Added the `$aFieldset` parameter
65 65
          * @return  string
66 66
          */
67
-        private function ___getFieldsOutput( $aFieldset, array $aFields, array $aCallbacks=array() ) {
67
+        private function ___getFieldsOutput( $aFieldset, array $aFields, array $aCallbacks = array() ) {
68 68
             $_aOutput = array();
69
-            foreach( $aFields as $_isIndex => $_aField ) {
70
-                $_aOutput[] = $this->___getEachFieldOutput(
69
+            foreach ( $aFields as $_isIndex => $_aField ) {
70
+                $_aOutput[ ] = $this->___getEachFieldOutput(
71 71
                     $_aField,
72 72
                     $_isIndex,
73 73
                     $aCallbacks,
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
              * @since  3.5.3
83 83
              * @return string The HTML output of the given field.
84 84
              */
85
-            private function ___getEachFieldOutput( $aField, $isIndex, array $aCallbacks, $bIsLastElement=false ) {
85
+            private function ___getEachFieldOutput( $aField, $isIndex, array $aCallbacks, $bIsLastElement = false ) {
86 86
 
87 87
                 // Field type definition - allows mixed field types in sub-fields
88 88
                 $_aFieldTypeDefinition = $this->___getFieldTypeDefinition( $aField[ 'type' ] );
89
-                if ( ! is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) {
89
+                if ( !is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) {
90 90
                     return '';
91 91
                 }
92 92
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             'input',
125 125
             array(
126 126
                 'type'  => 'hidden',
127
-                'name'  => '__unset_' . $aField[ '_fields_type' ] . '[' . $aField[ '_input_name_flat' ] . ']',
127
+                'name'  => '__unset_'.$aField[ '_fields_type' ].'['.$aField[ '_input_name_flat' ].']',
128 128
                 'value' => $aField[ '_input_name_flat' ],
129 129
                 'class' => 'unset-element-names element-address',
130 130
             )
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 private function ___getFieldOutput( $sContent, $aField, $bIsLastElement ) {
140 140
                     $_oFieldAttribute = new AdminPageFramework_Form_View___Attribute_Field( $aField );
141 141
                     return $aField[ 'before_field' ]
142
-                        . "<div " . $_oFieldAttribute->get() . ">"
142
+                        . "<div ".$_oFieldAttribute->get().">"
143 143
                             . $sContent
144 144
                             . $this->___getUnsetFlagFieldInputTag( $aField )
145 145
                             . $this->___getDelimiter( $aField, $bIsLastElement )
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                  */
169 169
                 private function ___getDelimiter( $aField, $bIsLastElement ) {
170 170
                     return $aField[ 'delimiter' ]
171
-                        ? "<div " . $this->getAttributes(
171
+                        ? "<div ".$this->getAttributes(
172 172
                                 array(
173 173
                                     'class' => 'delimiter',
174 174
                                     'id'    => "delimiter-{$aField[ 'input_id' ]}",
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                                         ""
179 179
                                     ),
180 180
                                 )
181
-                            ) . ">"
181
+                            ).">"
182 182
                                 . $aField[ 'delimiter' ]
183 183
                             . "</div>"
184 184
                         : '';
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         private function ___getFinalOutput( $aFieldset, array $aFieldsOutput, $iFieldsCount ) {
194 194
             $_oFieldsetAttributes = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset );
195 195
             return $aFieldset[ 'before_fieldset' ]
196
-                . "<fieldset " . $_oFieldsetAttributes->get() . ">"
196
+                . "<fieldset ".$_oFieldsetAttributes->get().">"
197 197
                     . $this->___getEmbeddedFieldTitle( $aFieldset )
198 198
                     . $this->___getChildFieldTitle( $aFieldset )
199 199
                     . $this->___getFieldsetContent( $aFieldset, $aFieldsOutput, $iFieldsCount )
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
              * @since  3.8.0
208 208
              */
209 209
             private function ___getEmbeddedFieldTitle( $aFieldset ) {
210
-                if ( ! $aFieldset[ '_is_title_embedded' ] ) {
210
+                if ( !$aFieldset[ '_is_title_embedded' ] ) {
211 211
                     return '';
212 212
                 }
213 213
                 $_oFieldTitle = new AdminPageFramework_Form_View___FieldTitle(
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
              * @since  3.8.0
229 229
              */
230 230
             private function ___getChildFieldTitle( $aFieldset ) {
231
-                if ( ! $aFieldset[ '_nested_depth' ] ) {
231
+                if ( !$aFieldset[ '_nested_depth' ] ) {
232 232
                     return '';
233 233
                 }
234 234
                 if ( $aFieldset[ '_is_title_embedded' ] ) {
@@ -254,12 +254,12 @@  discard block
 block discarded – undo
254 254
                 if ( is_scalar( $aFieldset[ 'content' ] ) ) {
255 255
                     return $aFieldset[ 'content' ];
256 256
                 }
257
-                $_oFieldsAttributes     = new AdminPageFramework_Form_View___Attribute_Fields(
257
+                $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields(
258 258
                     $aFieldset,
259
-                    array(),    // attribute array
259
+                    array(), // attribute array
260 260
                     $iFieldsCount
261 261
                 );
262
-                return "<div " . $_oFieldsAttributes->get() . ">"
262
+                return "<div ".$_oFieldsAttributes->get().">"
263 263
                         . $aFieldset[ 'before_fields' ]
264 264
                             . implode( PHP_EOL, $aFieldsOutput )
265 265
                         . $aFieldset[ 'after_fields' ]
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
                     $aField[ 'description' ],
282 282
                     'admin-page-framework-fields-description'   // class selector
283 283
                 );
284
-                $_aOutput[] = $_oFieldDescription->get();
284
+                $_aOutput[ ] = $_oFieldDescription->get();
285 285
 
286 286
                 // Dimensional keys of repeatable and sortable fields
287
-                $_aOutput[] = $this->___getDynamicElementFlagFieldInputTag( $aField );
287
+                $_aOutput[ ] = $this->___getDynamicElementFlagFieldInputTag( $aField );
288 288
 
289
-                $_aOutput[] = $this->_getRepeatableFieldButtons( 'fields-' . $aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] );
289
+                $_aOutput[ ] = $this->_getRepeatableFieldButtons( 'fields-'.$aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] );
290 290
 
291 291
                 return implode( PHP_EOL, array_filter( $_aOutput ) );
292 292
 
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
                  * @return string
298 298
                  */
299 299
                 private function ___getDynamicElementFlagFieldInputTag( $aFieldset ) {
300
-                    if ( ! empty( $aFieldset[ 'repeatable' ] ) ) {
300
+                    if ( !empty( $aFieldset[ 'repeatable' ] ) ) {
301 301
                         return $this->___getRepeatableFieldFlagTag( $aFieldset );
302 302
                     }
303
-                    if ( ! empty( $aFieldset[ 'sortable' ] ) ) {
303
+                    if ( !empty( $aFieldset[ 'sortable' ] ) ) {
304 304
                         return $this->___getSortableFieldFlagTag( $aFieldset );
305 305
                     }
306 306
                     return '';
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
                             'input',
315 315
                             array(
316 316
                                 'type'                      => 'hidden',
317
-                                'name'                      => '__repeatable_elements_' . $aFieldset[ '_structure_type' ]
318
-                                    . '[' . $aFieldset[ '_field_address' ] . ']',
317
+                                'name'                      => '__repeatable_elements_'.$aFieldset[ '_structure_type' ]
318
+                                    . '['.$aFieldset[ '_field_address' ].']',
319 319
                                 'class'                     => 'element-address',
320 320
                                 'value'                     => $aFieldset[ '_field_address' ],
321 321
                                 'data-field_address_model'  => $aFieldset[ '_field_address_model' ],
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
                             'input',
332 332
                             array(
333 333
                                 'type'                      => 'hidden',
334
-                                'name'                      => '__sortable_elements_' . $aFieldset[ '_structure_type' ]
335
-                                    . '[' . $aFieldset[ '_field_address' ] . ']',
334
+                                'name'                      => '__sortable_elements_'.$aFieldset[ '_structure_type' ]
335
+                                    . '['.$aFieldset[ '_field_address' ].']',
336 336
                                 'class'                     => 'element-address',
337 337
                                 'value'                     => $aFieldset[ '_field_address' ],
338 338
                                 'data-field_address_model'  => $aFieldset[ '_field_address_model' ],
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___Format_Fields.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function get() {
51 51
 
52 52
         // Get the set value(s)
53
-        $_mSavedValue    = $this->___getStoredInputFieldValue( $this->aField, $this->aOptions );
53
+        $_mSavedValue = $this->___getStoredInputFieldValue( $this->aField, $this->aOptions );
54 54
 
55 55
         // Construct fields array.
56 56
         $_aFields = $this->___getFieldsWithSubs( $this->aField, $_mSavedValue );
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
              * @since  3.6.0 Moved from `AdminPageFramework_FieldDefinition`.
99 99
              */
100 100
             private function ___divideMainAndSubFields( $aField, array &$aFirstField, array &$aSubFields ) {
101
-                foreach( $aField as $_nsIndex => $_mFieldElement ) {
101
+                foreach ( $aField as $_nsIndex => $_mFieldElement ) {
102 102
                     if ( is_numeric( $_nsIndex ) ) {
103
-                        $aSubFields[] = $_mFieldElement;
103
+                        $aSubFields[ ] = $_mFieldElement;
104 104
                     } else {
105 105
                         $aFirstField[ $_nsIndex ] = $_mFieldElement;
106 106
                     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 // We are collecting elements from the second sub-field.
126 126
                 unset( $_aSavedValues[ 0 ] ); 
127 127
                    
128
-                foreach( $_aSavedValues as $_iIndex => $vValue ) {
128
+                foreach ( $_aSavedValues as $_iIndex => $vValue ) {
129 129
                     $aSubFields[ $_iIndex - 1 ] = isset( $aSubFields[ $_iIndex - 1 ] ) && is_array( $aSubFields[ $_iIndex - 1 ] )
130 130
                         ? $aSubFields[ $_iIndex - 1 ] 
131 131
                         : array();     
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
              */
140 140
             private function ___fillSubFields( array &$aSubFields, array $aFirstField ) {
141 141
                         
142
-                foreach( $aSubFields as &$_aSubField ) {
142
+                foreach ( $aSubFields as &$_aSubField ) {
143 143
                     
144 144
                     // Evacuate the label element which should not be merged.
145 145
                     $_aLabel = $this->getElement( 
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
          
170 170
             // Determine whether the elements are saved in an array.
171 171
             // $_bHasSubFields = count( $aFields ) > 1 || $aField[ 'repeatable' ] || $aField[ 'sortable' ];
172
-            if ( ! $this->hasSubFields( $aFields, $aField ) ) {
172
+            if ( !$this->hasSubFields( $aFields, $aField ) ) {
173 173
                 $aFields[ 0 ][ '_saved_value' ] = $mSavedValue;
174 174
                 $aFields[ 0 ][ '_is_multiple_fields' ] = false;
175 175
                 return;                    
176 176
             }
177 177
      
178
-            foreach( $aFields as $_iIndex => &$_aThisField ) {
178
+            foreach ( $aFields as $_iIndex => &$_aThisField ) {
179 179
                 $_aThisField[ '_saved_value' ]        = $this->getElement( $mSavedValue, $_iIndex, null );
180
-                $_aThisField[ '_subfield_index' ]     = $_iIndex;   // 3.8.0+
180
+                $_aThisField[ '_subfield_index' ]     = $_iIndex; // 3.8.0+
181 181
                 $_aThisField[ '_is_multiple_fields' ] = true;
182 182
             }
183 183
     
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
          * @since 3.6.0 Moved from `AdminPageFramework_FieldDefinition`.
191 191
          */
192 192
         private function ___setFieldsValue( &$aFields ) {
193
-            foreach( $aFields as &$_aField ) {
193
+            foreach ( $aFields as &$_aField ) {
194 194
                 $_aField[ '_is_value_set_by_user' ] = isset( $_aField[ 'value' ] );
195 195
                 $_aField[ 'value' ]                 = $this->___getSetFieldValue( $_aField );
196 196
             }
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
          */
233 233
         private function ___getStoredInputFieldValue( $aField, $aOptions ) {    
234 234
 
235
-            $_aFieldPath   = $aField[ '_field_path_array' ];
235
+            $_aFieldPath = $aField[ '_field_path_array' ];
236 236
         
237 237
             // If a section is not set, check the first dimension element.
238
-            if ( ! isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) {
238
+            if ( !isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) {
239 239
                 return $this->getElement( 
240 240
                     $aOptions, 
241 241
                     $_aFieldPath, // $aField[ 'field_id' ],  // @todo this may have to be a field path instead of field id.
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
          * @since    3.7.0       Changed the `_field_type` element to `_structure_type`.
231 231
          * @return   null|string|array
232 232
          */
233
-        private function ___getStoredInputFieldValue( $aField, $aOptions ) {    
233
+        private function ___getStoredInputFieldValue( $aField, $aOptions ) {
234 234
 
235 235
             $_aFieldPath   = $aField[ '_field_path_array' ];
236 236
         
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Base.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
      * @return string
37 37
      * @since  3.8.9
38 38
      */
39
-    static protected function _getLegibleDetails( $mValue, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
39
+    static protected function _getLegibleDetails( $mValue, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
40 40
         if ( is_array( $mValue ) ) {
41
-            return '(array, length: ' . count( $mValue ).') '
42
-                . self::getAsString( print_r( self::___getLegibleDetailedArray( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) , true ) );
41
+            return '(array, length: '.count( $mValue ).') '
42
+                . self::getAsString( print_r( self::___getLegibleDetailedArray( $mValue, $iStringLengthLimit, $iArrayDepthLimit ), true ) );
43 43
         }
44 44
         return self::getAsString( print_r( self::getLegibleDetailedValue( $mValue, $iStringLengthLimit ), true ) );
45 45
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @since  3.8.9
55 55
      * @since  3.8.22  Added the `$sStringLengthLimit` and `$iArrayDepthLimit` parameters.
56 56
      */
57
-    static protected function _getLegible( $mValue, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
57
+    static protected function _getLegible( $mValue, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
58 58
 
59 59
         $iArrayDepthLimit = $iArrayDepthLimit ? $iArrayDepthLimit : self::$iLegibleArrayDepthLimit;
60 60
         $mValue           = is_object( $mValue )
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             )
72 72
             : $mValue;
73 73
         $mValue = is_string( $mValue )
74
-            ? self::___getLegibleString( $mValue,  $iStringLengthLimit, false )
74
+            ? self::___getLegibleString( $mValue, $iStringLengthLimit, false )
75 75
             : $mValue;
76 76
         return self::getArrayRepresentationSanitized( self::getAsString( print_r( $mValue, true ) ) );
77 77
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
          * @return string
84 84
          */
85 85
         static private function ___getLegibleDetailedCallable( $asoCallable ) {
86
-            return '(callable) ' . self::___getCallableName( $asoCallable );
86
+            return '(callable) '.self::___getCallableName( $asoCallable );
87 87
         }
88 88
             /**
89 89
              * @since  3.8.9
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 $_sSubject = is_object( $asoCallable[ 0 ] )
101 101
                     ? get_class( $asoCallable[ 0 ] )
102 102
                     : ( string ) $asoCallable[ 0 ];
103
-                return $_sSubject . '::' . ( string ) $asoCallable[ 1 ];
103
+                return $_sSubject.'::'.( string ) $asoCallable[ 1 ];
104 104
             }
105 105
 
106 106
         /**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             if ( method_exists( $oObject, '__toString' ) ) {
113 113
                 return ( string ) $oObject;
114 114
             }
115
-            return '(object) ' . get_class( $oObject ) . ' ' . count( get_object_vars( $oObject ) ) . ' properties.';
115
+            return '(object) '.get_class( $oObject ).' '.count( get_object_vars( $oObject ) ).' properties.';
116 116
         }
117 117
 
118 118
         /**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
          * @param  integer $iDepthLimit
128 128
          * @return array
129 129
          */
130
-        static private function ___getLegibleDetailedArray( array $aArray, $iStringLengthLimit=0, $iDepthLimit=0 ) {
130
+        static private function ___getLegibleDetailedArray( array $aArray, $iStringLengthLimit = 0, $iDepthLimit = 0 ) {
131 131
             $_iDepthLimit = $iDepthLimit ? $iDepthLimit : self::$iLegibleArrayDepthLimit;
132 132
             return self::getArrayMappedRecursive(
133 133
                 array( __CLASS__, 'getLegibleDetailedValue' ),
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
                 return self::___getLegibleDetailedObject( $mNonScalar );
170 170
             }
171 171
             if ( is_array( $mNonScalar ) ) {
172
-                return '(' . $_sType . ') ' . count( $mNonScalar ) . ' elements';
172
+                return '('.$_sType.') '.count( $mNonScalar ).' elements';
173 173
             }
174
-            return '(' . $_sType . ') ' . ( string ) $mNonScalar;
174
+            return '('.$_sType.') '.( string ) $mNonScalar;
175 175
 
176 176
         }
177 177
         /**
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
          */
184 184
         static private function ___getLegibleDetailedScalar( $sScalar, $iStringLengthLimit ) {
185 185
             if ( is_bool( $sScalar ) ) {
186
-                return '(boolean) ' . ( $sScalar ? 'true' : 'false' );
186
+                return '(boolean) '.( $sScalar ? 'true' : 'false' );
187 187
             }
188 188
             return is_string( $sScalar )
189 189
                 ? self::___getLegibleString( $sScalar, $iStringLengthLimit, true )
190
-                : '(' . gettype( $sScalar ) . ', length: ' . self::___getValueLength( $sScalar ) .  ') ' . $sScalar;
190
+                : '('.gettype( $sScalar ).', length: '.self::___getValueLength( $sScalar ).') '.$sScalar;
191 191
         }
192 192
             /**
193 193
              * Returns a length of a value.l
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
              * @param  boolean $bShowDetails
212 212
              * @return string
213 213
              */
214
-            static private function ___getLegibleString( $sString, $iLengthLimit, $bShowDetails=true ) {
214
+            static private function ___getLegibleString( $sString, $iLengthLimit, $bShowDetails = true ) {
215 215
 
216 216
                 static $_iMBSupport;
217 217
                 $_iMBSupport    = isset( $_iMBSupport ) ? $_iMBSupport : ( integer ) function_exists( 'mb_strlen' );
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 
223 223
                 if ( $bShowDetails ) {
224 224
                     return $_iCharLength <= $iCharLimit
225
-                        ? '(string, length: ' . $_iCharLength . ') ' . $sString
226
-                        : '(string, length: ' . $_iCharLength . ') ' . call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) )
225
+                        ? '(string, length: '.$_iCharLength.') '.$sString
226
+                        : '(string, length: '.$_iCharLength.') '.call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) )
227 227
                             . '...';
228 228
                 }
229 229
                 return $_iCharLength <= $iCharLimit
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
      * @since  3.8.22
240 240
      * @since  3.8.23 Deprecated the `$oException` parameter.
241 241
      */
242
-    static public function getStackTrace( $iSkip=0, $_deprecated=null ) {
242
+    static public function getStackTrace( $iSkip = 0, $_deprecated = null ) {
243 243
 
244
-        $_iSkip      = 1;   // need to skip this method trace itself
244
+        $_iSkip      = 1; // need to skip this method trace itself
245 245
         $_oException = new Exception();
246 246
 
247 247
         // Backward compatibility.
@@ -256,22 +256,22 @@  discard block
 block discarded – undo
256 256
         $_aFrames    = array_slice( $_aFrames, $_iSkip );
257 257
         foreach ( array_reverse( $_aFrames ) as $_iIndex => $_aFrame ) {
258 258
 
259
-            $_aFrame     = $_aFrame + array(
259
+            $_aFrame = $_aFrame + array(
260 260
                 'file'  => null, 'line' => null, 'function' => null,
261 261
                 'class' => null, 'args' => array(),
262 262
             );
263 263
             $_sArguments = self::___getArgumentsOfEachStackTrace( $_aFrame[ 'args' ] );
264
-            $_aTraces[]  = sprintf(
264
+            $_aTraces[ ]  = sprintf(
265 265
                 "#%s %s(%s): %s(%s)",
266 266
                 $_iIndex + 1,
267 267
                 $_aFrame[ 'file' ],
268 268
                 $_aFrame[ 'line' ],
269
-                isset( $_aFrame[ 'class' ] ) ? $_aFrame[ 'class' ] . '->' . $_aFrame[ 'function' ] : $_aFrame[ 'function' ],
269
+                isset( $_aFrame[ 'class' ] ) ? $_aFrame[ 'class' ].'->'.$_aFrame[ 'function' ] : $_aFrame[ 'function' ],
270 270
                 $_sArguments
271 271
             );
272 272
 
273 273
         }
274
-        return implode( PHP_EOL, $_aTraces ) . PHP_EOL;
274
+        return implode( PHP_EOL, $_aTraces ).PHP_EOL;
275 275
 
276 276
     }
277 277
         /**
@@ -284,16 +284,16 @@  discard block
 block discarded – undo
284 284
             foreach ( $aTraceArguments as $_mArgument ) {
285 285
                 $_sType        = gettype( $_mArgument );
286 286
                 $_sType        = str_replace(
287
-                    array( 'resource (closed)', 'unknown type', 'integer', 'double', ),
288
-                    array( 'resource', 'unknown', 'scalar', 'scalar', ),
287
+                    array( 'resource (closed)', 'unknown type', 'integer', 'double',),
288
+                    array( 'resource', 'unknown', 'scalar', 'scalar',),
289 289
                     $_sType
290 290
                 );
291 291
                 $_sMethodName  = "___getStackTraceArgument_{$_sType}";
292
-                $_aArguments[] = method_exists( __CLASS__, $_sMethodName )
292
+                $_aArguments[ ] = method_exists( __CLASS__, $_sMethodName )
293 293
                     ? self::{$_sMethodName}( $_mArgument )
294 294
                     : $_sType;
295 295
             }
296
-            return join(", ",  $_aArguments );
296
+            return join( ", ", $_aArguments );
297 297
         }
298 298
             /**
299 299
              * @since  3.8.22
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
              */
303 303
             static private function ___getStackTraceArgument_string( $mArgument ) {
304 304
                 $_sString = self::___getLegibleString( $mArgument, 200, true );
305
-                return "'" . $_sString . "'";
305
+                return "'".$_sString."'";
306 306
             }
307 307
             static private function ___getStackTraceArgument_scalar( $mArgument ) {
308 308
                 return $mArgument;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                 return 'NULL';
315 315
             }
316 316
             static private function ___getStackTraceArgument_object( $mArgument ) {
317
-                return 'Object(' . get_class( $mArgument ) . ')';
317
+                return 'Object('.get_class( $mArgument ).')';
318 318
             }
319 319
             static private function ___getStackTraceArgument_resource( $mArgument ) {
320 320
                 return get_resource_type( $mArgument );
@@ -327,18 +327,18 @@  discard block
 block discarded – undo
327 327
                 $_iMax    = 10;
328 328
                 $_iTotal  = count( $mArgument );
329 329
                 $_iIndex  = 0;
330
-                foreach( $mArgument as $_sKey => $_mValue ) {
330
+                foreach ( $mArgument as $_sKey => $_mValue ) {
331 331
                     $_iIndex++;
332
-                    $_mValue   = is_scalar( $_mValue )
332
+                    $_mValue = is_scalar( $_mValue )
333 333
                         ? self::___getLegibleDetailedScalar( $_mValue, 100 )
334
-                        : ucfirst( gettype( $_mValue ) ) . (
334
+                        : ucfirst( gettype( $_mValue ) ).(
335 335
                             is_object( $_mValue )
336
-                                ? ' (' . get_class( $_mValue ) . ')'
336
+                                ? ' ('.get_class( $_mValue ).')'
337 337
                                 : ''
338 338
                         );
339
-                    $_sOutput .= $_sKey . ': ' . $_mValue . ', ';
339
+                    $_sOutput .= $_sKey.': '.$_mValue.', ';
340 340
                     if ( $_iIndex > $_iMax && $_iTotal > $_iMax ) {
341
-                        $_sOutput  = rtrim( $_sOutput, ','  ) . '...';
341
+                        $_sOutput = rtrim( $_sOutput, ',' ).'...';
342 342
                         break;
343 343
                     }
344 344
                 }
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param       integer         $iArrayDepthLimit
36 36
      * @return      void
37 37
      */
38
-    static public function dump( $asArray, $sFilePath=null, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
38
+    static public function dump( $asArray, $sFilePath = null, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
39 39
         echo self::get( $asArray, $sFilePath, true, $bStackTrace, $iStringLengthLimit, $iArrayDepthLimit );
40 40
     }
41 41
 
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
      * @since       3.8.9
45 45
      * @return      string
46 46
      */
47
-    static public function getDetails( $mValue, $bEscape=true, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
47
+    static public function getDetails( $mValue, $bEscape = true, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
48 48
         $_sValueWithDetails = self::getArrayRepresentationSanitized(
49 49
             self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit )
50 50
         );
51 51
         $_sValueWithDetails = $bStackTrace
52
-            ? $_sValueWithDetails . PHP_EOL . self::getStackTrace()
52
+            ? $_sValueWithDetails.PHP_EOL.self::getStackTrace()
53 53
             : $_sValueWithDetails;
54 54
         return $bEscape
55 55
             ? "<pre class='dump-array'>"
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param       integer         $iArrayDepthLimit
76 76
      * @return      string
77 77
      */
78
-    static public function get( $asArray, $sFilePath=null, $bEscape=true, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
78
+    static public function get( $asArray, $sFilePath = null, $bEscape = true, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
79 79
 
80 80
         if ( $sFilePath ) {
81 81
             self::log( $asArray, $sFilePath );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @param       integer     $iArrayDepthLimit   The depth limit for arrays.*
118 118
      * @return      void
119 119
      **/
120
-    static public function log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) {
120
+    static public function log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) {
121 121
         self::_log( $mValue, $sFilePath, $bStackTrace, $iTrace, $iStringLengthLimit, $iArrayDepthLimit );
122 122
     }
123 123
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
      * @since unknown
132 132
      * @deprecated      3.2.0
133 133
      */
134
-    static public function dumpArray( $asArray, $sFilePath=null ) {
135
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::dump()' );
134
+    static public function dumpArray( $asArray, $sFilePath = null ) {
135
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::dump()' );
136 136
         AdminPageFramework_Debug::dump( $asArray, $sFilePath );
137 137
     }
138 138
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
      * @since       3.0.0 Changed the $bEncloseInTag parameter to bEscape.
146 146
      * @deprecated  3.2.0
147 147
      */
148
-    static public function getArray( $asArray, $sFilePath=null, $bEscape=true ) {
149
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::get()' );
148
+    static public function getArray( $asArray, $sFilePath = null, $bEscape = true ) {
149
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::get()' );
150 150
         return AdminPageFramework_Debug::get( $asArray, $sFilePath, $bEscape );
151 151
     }
152 152
 
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
      * @since       3.0.3   Changed the default log location and file name.
158 158
      * @deprecated  3.1.0   Use the `log()` method instead.
159 159
      */
160
-    static public function logArray( $asArray, $sFilePath=null ) {
161
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::log()' );
160
+    static public function logArray( $asArray, $sFilePath = null ) {
161
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::log()' );
162 162
         AdminPageFramework_Debug::log( $asArray, $sFilePath );
163 163
     }
164 164
 
Please login to merge, or discard this patch.
factory/_common/utility/debug/AdminPageFramework_Debug_Utility.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     static public function getObjectName( $mItem ) {
30 30
         if ( is_object( $mItem ) ) {
31
-            return '(object) ' . get_class( $mItem );
31
+            return '(object) '.get_class( $mItem );
32 32
         }
33 33
         return $mItem;
34 34
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param  string  $sMore
47 47
      * @return array
48 48
      */
49
-    static public function getSlicedByDepth( array $aSubject, $iDepth=0, $sMore='(array truncated) ...' ) {
49
+    static public function getSlicedByDepth( array $aSubject, $iDepth = 0, $sMore = '(array truncated) ...' ) {
50 50
 
51 51
         foreach ( $aSubject as $_sKey => $_vValue ) {
52 52
 
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Log.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @param integer $iArrayDepthLimit   The depth limit for arrays.
27 27
      * @since 3.8.9
28 28
      */
29
-    static protected function _log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) {
29
+    static protected function _log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) {
30 30
 
31 31
         static $_fPreviousTimeStamp = 0;
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $_sCallerClass      = self::___getCallerClassName( $_oCallerInfo, $iTrace );
36 36
         $_fCurrentTimeStamp = microtime( true );
37 37
         $_sLogContent       = self::___getLogContents( $mValue, $_fCurrentTimeStamp, $_fPreviousTimeStamp, $_sCallerClass, $_sCallerFunction, $iStringLengthLimit, $iArrayDepthLimit )
38
-            . ( $bStackTrace ? self::getStackTrace($iTrace + 1 ) : '' )
38
+            . ( $bStackTrace ? self::getStackTrace( $iTrace + 1 ) : '' )
39 39
             . PHP_EOL;
40 40
 
41 41
         file_put_contents( self::___getLogFilePath( $sFilePath, $_sCallerClass ), $_sLogContent, FILE_APPEND );
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
                     round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time
53 53
                     $_sCallerClass,
54 54
                     $_sCallerFunction
55
-                ) . PHP_EOL
56
-                . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) . PHP_EOL;
55
+                ).PHP_EOL
56
+                . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ).PHP_EOL;
57 57
         }
58 58
         /**
59 59
          * @since  3.8.9
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
          */
62 62
         static private function ___getCallerFunctionName( $oCallerInfo, $iTrace ) {
63 63
             return self::getElement(
64
-                $oCallerInfo,  // subject array
64
+                $oCallerInfo, // subject array
65 65
                 array( 2 + $iTrace, 'function' ), // key
66 66
                 ''      // default
67 67
             );
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
          */
73 73
         static private function ___getCallerClassName( $oCallerInfo, $iTrace ) {
74 74
             return self::getElement(
75
-                $oCallerInfo,  // subject array
75
+                $oCallerInfo, // subject array
76 76
                 array( 2 + $iTrace, 'class' ), // key
77 77
                 ''      // default
78 78
             );
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
          */
87 87
         static private function ___getLogFilePath( $bsFilePathOrName, $sCallerClass ) {
88 88
 
89
-            $_sWPContentDir  = WP_CONTENT_DIR . DIRECTORY_SEPARATOR;
89
+            $_sWPContentDir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR;
90 90
 
91 91
             // It is a partial file name
92
-            if ( is_string( $bsFilePathOrName ) && ! self::hasSlash( $bsFilePathOrName ) ) {
93
-                return $_sWPContentDir . $bsFilePathOrName . '_' . date( "Ymd" ) . '.log';
92
+            if ( is_string( $bsFilePathOrName ) && !self::hasSlash( $bsFilePathOrName ) ) {
93
+                return $_sWPContentDir.$bsFilePathOrName.'_'.date( "Ymd" ).'.log';
94 94
             }
95 95
 
96 96
             // Try creating a file.
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
             // Return a generated default log path.
105 105
             $_sClassBaseName = $sCallerClass ? basename( $sCallerClass ) : basename( get_class() );
106
-            return $_sWPContentDir . $_sClassBaseName . '_' . date( "Ymd" ) . '.log';
106
+            return $_sWPContentDir.$_sClassBaseName.'_'.date( "Ymd" ).'.log';
107 107
 
108 108
         }
109 109
             /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
              * @return boolean
112 112
              */
113 113
             static private function ___createFile( $sFilePath ) {
114
-                if ( ! $sFilePath || true === $sFilePath ) {
114
+                if ( !$sFilePath || true === $sFilePath ) {
115 115
                     return false;
116 116
                 }
117 117
                 if ( file_exists( $sFilePath ) ) {
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
             $_nNow              = $fCurrentTimeStamp + ( self::___getSiteGMTOffset() * 60 * 60 );
132 132
             $_nMicroseconds     = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' );
133 133
             $_aOutput           = array(
134
-                date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds,
134
+                date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds,
135 135
                 self::___getFormattedElapsedTime( $nElapsed ),
136 136
                 self::___getPageLoadID(),
137 137
                 self::getFrameworkVersion(),
138
-                $sCallerClass . '::' . $sCallerFunction,
138
+                $sCallerClass.'::'.$sCallerFunction,
139 139
                 current_filter(),
140 140
                 self::getCurrentURL(),
141 141
             );
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
              */
148 148
             static private function ___getSiteGMTOffset() {
149 149
                 static $_nGMTOffset;
150
-                $_nGMTOffset        = isset( $_nGMTOffset )
150
+                $_nGMTOffset = isset( $_nGMTOffset )
151 151
                     ? $_nGMTOffset
152 152
                     : get_option( 'gmt_offset' );
153 153
                 return $_nGMTOffset;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
              */
158 158
             static private function ___getPageLoadID() {
159 159
                 static $_sPageLoadID;
160
-                $_sPageLoadID       = $_sPageLoadID
160
+                $_sPageLoadID = $_sPageLoadID
161 161
                     ? $_sPageLoadID
162 162
                     : uniqid();
163 163
                 return $_sPageLoadID;
@@ -180,15 +180,15 @@  discard block
 block discarded – undo
180 180
                     3,
181 181
                     '0'
182 182
                 );
183
-                $_sElapsed          = self::getElement(
184
-                    $_aElapsedParts,  // subject array
185
-                    0,  // key
183
+                $_sElapsed = self::getElement(
184
+                    $_aElapsedParts, // subject array
185
+                    0, // key
186 186
                     0   // default
187 187
                 );
188
-                $_sElapsed          = strlen( $_sElapsed ) > 1
189
-                    ? '+' . substr( $_sElapsed, -1, 2 )
190
-                    : ' ' . $_sElapsed;
191
-                return $_sElapsed . '.' . $_sElapsedFloat;
188
+                $_sElapsed = strlen( $_sElapsed ) > 1
189
+                    ? '+'.substr( $_sElapsed, -1, 2 )
190
+                    : ' '.$_sElapsed;
191
+                return $_sElapsed.'.'.$_sElapsedFloat;
192 192
 
193 193
             }
194 194
 
Please login to merge, or discard this patch.
_common/utility/base_utility/AdminPageFramework_Utility_Interpreter.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
      */
27 27
     static public function getReadableListOfArray( array $aArray ) {
28 28
 
29
-        $_aOutput   = array();
30
-        foreach( $aArray as $_sKey => $_vValue ) {
31
-            $_aOutput[] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ) . PHP_EOL;
29
+        $_aOutput = array();
30
+        foreach ( $aArray as $_sKey => $_vValue ) {
31
+            $_aOutput[ ] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ).PHP_EOL;
32 32
         }
33 33
         return implode( PHP_EOL, $_aOutput );
34 34
 
@@ -40,37 +40,37 @@  discard block
 block discarded – undo
40 40
      * @since       3.9.0       Moved from `AdminPageFramework_Utility_Array.php`.
41 41
      * @return      string      The generated human-readable array contents.
42 42
      */
43
-    static public function getReadableArrayContents( $sKey, $vValue, $sLabelCharLengths=16, $iOffset=0 ) {
43
+    static public function getReadableArrayContents( $sKey, $vValue, $sLabelCharLengths = 16, $iOffset = 0 ) {
44 44
 
45 45
         $_aOutput   = array();
46
-        $_aOutput[] = ( $iOffset
47
-                ? str_pad( ' ', $iOffset  )
46
+        $_aOutput[ ] = ( $iOffset
47
+                ? str_pad( ' ', $iOffset )
48 48
                 : ''
49 49
             )
50 50
             . ( $sKey
51
-                ? '[' . $sKey . ']'
51
+                ? '['.$sKey.']'
52 52
                 : ''
53 53
             );
54 54
 
55
-        if ( ! in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) {
56
-            $_aOutput[] = $vValue;
55
+        if ( !in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) {
56
+            $_aOutput[ ] = $vValue;
57 57
             return implode( PHP_EOL, $_aOutput );
58 58
         }
59 59
 
60 60
         foreach ( $vValue as $_sTitle => $_asDescription ) {
61
-            if ( ! in_array( gettype( $_asDescription ), array( 'array', 'object' ) ) ) {
62
-                $_aOutput[] = str_pad( ' ', $iOffset )
61
+            if ( !in_array( gettype( $_asDescription ), array( 'array', 'object' ) ) ) {
62
+                $_aOutput[ ] = str_pad( ' ', $iOffset )
63 63
                     . $_sTitle
64 64
                     . str_pad( ':', $sLabelCharLengths - self::getStringLength( $_sTitle ) )
65 65
                     . $_asDescription;
66 66
                 continue;
67 67
             }
68
-            $_aOutput[] = str_pad( ' ', $iOffset )
68
+            $_aOutput[ ] = str_pad( ' ', $iOffset )
69 69
                 . $_sTitle
70 70
                 . ": {"
71 71
                 . self::getReadableArrayContents( '', $_asDescription, 16, $iOffset + 4 )
72 72
                 . PHP_EOL
73
-                . str_pad( ' ', $iOffset ) . "}";
73
+                . str_pad( ' ', $iOffset )."}";
74 74
         }
75 75
         return implode( PHP_EOL, $_aOutput );
76 76
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
      * @return      string      The HTML list generated from the given array.
84 84
      */
85 85
     static public function getReadableListOfArrayAsHTML( array $aArray ) {
86
-        $_aOutput   = array();
87
-        foreach( $aArray as $_sKey => $_vValue ) {
88
-            $_aOutput[] = "<ul class='array-contents'>"
86
+        $_aOutput = array();
87
+        foreach ( $aArray as $_sKey => $_vValue ) {
88
+            $_aOutput[ ] = "<ul class='array-contents'>"
89 89
                     .  self::getReadableArrayContentsHTML( $_sKey, $_vValue )
90
-                . "</ul>" . PHP_EOL;
90
+                . "</ul>".PHP_EOL;
91 91
         }
92 92
         return implode( PHP_EOL, $_aOutput );
93 93
     }
@@ -105,25 +105,25 @@  discard block
 block discarded – undo
105 105
         $_aOutput   = array();
106 106
 
107 107
         // Title - array key
108
-        $_aOutput[] = $sKey
109
-            ? "<h3 class='array-key'>" . $sKey . "</h3>"
108
+        $_aOutput[ ] = $sKey
109
+            ? "<h3 class='array-key'>".$sKey."</h3>"
110 110
             : "";
111 111
 
112 112
         // If it does not have a nested array or object,
113
-        if ( ! in_array( gettype( $vValue ), array( 'array', 'object' ), true ) ) {
114
-            $_aOutput[] = "<div class='array-value'>"
113
+        if ( !in_array( gettype( $vValue ), array( 'array', 'object' ), true ) ) {
114
+            $_aOutput[ ] = "<div class='array-value'>"
115 115
                     . html_entity_decode( nl2br( $vValue ), ENT_QUOTES )
116 116
                 . "</div>";
117
-            return "<li>" . implode( PHP_EOL, $_aOutput ) . "</li>";
117
+            return "<li>".implode( PHP_EOL, $_aOutput )."</li>";
118 118
         }
119 119
 
120 120
         // Now it is a nested item.
121 121
         foreach ( $vValue as $_sKey => $_vValue ) {
122
-            $_aOutput[] =  "<ul class='array-contents'>"
122
+            $_aOutput[ ] = "<ul class='array-contents'>"
123 123
                     . self::getReadableArrayContentsHTML( $_sKey, $_vValue )
124 124
                 . "</ul>";
125 125
         }
126
-        return implode( PHP_EOL, $_aOutput ) ;
126
+        return implode( PHP_EOL, $_aOutput );
127 127
 
128 128
     }
129 129
 
Please login to merge, or discard this patch.