Completed
Pull Request — dev (#292)
by
unknown
02:41 queued 22s
created
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             return $_aNestedSections;
81 81
             
82 82
         }
83
-        private function getFAQContents()  {
83
+        private function getFAQContents() {
84 84
             
85 85
             $_aReplacements   = array(
86 86
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function replyToLoadTab( $oAdminPage ) {
23 23
 
24
-        $_aSections  = $this->getContentsByHeader( $this->getFAQContents(), 4 );
25
-        foreach( $_aSections as $_iIndex => $_aContent ) {
24
+        $_aSections = $this->getContentsByHeader( $this->getFAQContents(), 4 );
25
+        foreach ( $_aSections as $_iIndex => $_aContent ) {
26 26
 
27 27
             $_sTitle   = $_aContent[ 0 ];
28 28
             $_sContent = $this->_getFAQSubSections( $_aContent[ 1 ] );
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $oAdminPage->addSettingSections(
33 33
                 $this->sPageSlug, // the target page slug
34 34
                 array(
35
-                    'section_id'        => 'faq_sections_' . $_iIndex,
35
+                    'section_id'        => 'faq_sections_'.$_iIndex,
36 36
                     'tab_slug'          => $this->sTabSlug,
37 37
                     'section_tab_slug'  => 'apf_faq',
38 38
                     'title'             => $_sTitle,
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
 
55 55
             $_aNestedSections = array();
56 56
             $_iLastIndex = count( $aItems ) - 1;
57
-            foreach( $aItems as $_iIndex => $_aContent ) {
57
+            foreach ( $aItems as $_iIndex => $_aContent ) {
58 58
 
59
-                $_oParser   = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
59
+                $_oParser = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
60 60
 
61 61
                 // If no sections, return the contents of the first item.
62
-                if ( ! $_aContent[ 0 ] ) {
62
+                if ( !$_aContent[ 0 ] ) {
63 63
                     return $_oParser->get();
64 64
                 }
65 65
 
66
-                $_aNestedSections[] = array(
67
-                    'section_id'        => 'faq_item_' . $_iIndex,
66
+                $_aNestedSections[ ] = array(
67
+                    'section_id'        => 'faq_item_'.$_iIndex,
68 68
                     'title'             => $_aContent[ 0 ],
69 69
                     'collapsible'       => array(
70 70
                         'toggle_all_button' => $_iLastIndex === $_iIndex
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
             return $_aNestedSections;
81 81
 
82 82
         }
83
-        private function getFAQContents()  {
83
+        private function getFAQContents() {
84 84
 
85
-            $_aReplacements   = array(
85
+            $_aReplacements = array(
86 86
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
87 87
                 '%WP_ADMIN_URL%'    => admin_url(),
88 88
             );
89 89
             $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser(
90
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt',
90
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt',
91 91
                 $_aReplacements
92 92
             );
93 93
             return $_oWPReadmeParser->getRawSection( 'Frequently asked questions' );
Please login to merge, or discard this patch.
help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
      */
164 164
     public function validate( $aInput, $aOldInput, $oFactory, $aSubmit ) {
165 165
     
166
-       // Local variables
166
+        // Local variables
167 167
         $_bIsValid = true;
168 168
         $_aErrors  = array();
169 169
       
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 'title'             => __( 'Your Name', 'admin-page-framework-loader' ),
30 30
                 'type'              => 'text',
31 31
                 'default'           => $_oCurrentUser->user_lastname || $_oCurrentUser->user_firstname
32
-                    ? $_oCurrentUser->user_lastname . ' ' .  $_oCurrentUser->user_lastname
32
+                    ? $_oCurrentUser->user_lastname.' '.$_oCurrentUser->user_lastname
33 33
                     : '',
34 34
                 'attributes'        => array(
35 35
                     'required'      => 'required',
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             array(
113 113
                 'field_id'          => 'allow_sending_system_information',
114 114
                 'title'             => __( 'Confirmation', 'admin-page-framework-loader' )
115
-                    . ' (' . __( 'required', 'admin-page-framework-loader' ) . ')',
115
+                    . ' ('.__( 'required', 'admin-page-framework-loader' ).')',
116 116
                 'type'              => 'checkbox',
117 117
                 'label'             => __( 'I understand that the system information including a PHP version and WordPress version etc. will be sent along with the messages to help developer trouble-shoot the problem.', 'admin-page-framework-loader' ),
118 118
                 'attributes'        => array(
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
         $_bIsValid = true;
168 168
         $_aErrors  = array();
169 169
       
170
-        if ( ! $aInput[ 'allow_sending_system_information' ] ) {
170
+        if ( !$aInput[ 'allow_sending_system_information' ] ) {
171 171
             $_bIsValid = false;
172 172
             $_aErrors[ 'allow_sending_system_information' ] = __( 'We need necessary information to help you.', 'admin-page-framework-loader' );
173 173
         }
174 174
         
175
-        if ( ! $_bIsValid ) {
175
+        if ( !$_bIsValid ) {
176 176
         
177 177
             $oFactory->setFieldErrors( $_aErrors );
178 178
             $oFactory->setSettingNotice( __( 'Please help us to help you.', 'admin-page-framework-loader' ) );
Please login to merge, or discard this patch.
include/class/admin/demo/AdminPageFrameworkLoader_Demo.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
  * @since        3.5.0
10 10
  */
11 11
 
12
- /**
13
-  * 
14
-  * 
15
-  * @action     do      admin_page_framework_loader_action_before_loading_demo
16
-  * @action     do      admin_page_framework_loader_action_after_loading_demo
17
-  */
12
+    /**
13
+     * 
14
+     * 
15
+     * @action     do      admin_page_framework_loader_action_before_loading_demo
16
+     * @action     do      admin_page_framework_loader_action_after_loading_demo
17
+     */
18 18
 class AdminPageFrameworkLoader_Demo {
19 19
     
20 20
     public function __construct() {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
     
20 20
     public function __construct() {
21 21
         
22
-        if ( ! $this->_shouldLoadDemo() ) {
22
+        if ( !$this->_shouldLoadDemo() ) {
23 23
             return;
24 24
         }
25 25
         
26 26
         do_action( 'admin_page_framework_loader_action_before_loading_demo' );
27 27
         
28 28
         // Include example components.
29
-        include( AdminPageFrameworkLoader_Registry::$sDirPath . '/example/admin-page-framework-demo-bootstrap.php' );
29
+        include( AdminPageFrameworkLoader_Registry::$sDirPath.'/example/admin-page-framework-demo-bootstrap.php' );
30 30
         
31 31
         do_action( 'admin_page_framework_loader_action_after_loading_demo' );
32 32
         
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         
44 44
             // Check if the demo is enabled.
45 45
             $_oOption = AdminPageFrameworkLoader_Option::getInstance();
46
-            if ( ! $_oOption->get( 'enable_admin_pages' ) ) {
46
+            if ( !$_oOption->get( 'enable_admin_pages' ) ) {
47 47
                 return false;
48 48
             }            
49
-            if ( ! $_oOption->get( 'enable_demo' ) ) {
49
+            if ( !$_oOption->get( 'enable_demo' ) ) {
50 50
                 $this->_setPointerToolTips();
51 51
                 return false;
52 52
             }           
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 'options'   => array(
75 75
                     'content' => sprintf( '<h3> %1$s </h3> <p> %2$s </p>',
76 76
                         AdminPageFrameworkLoader_Registry::NAME,
77
-                        __( 'Check out the functionality of Admin Page Framework by enabling the demo.','admin-page-framework-loader' )
77
+                        __( 'Check out the functionality of Admin Page Framework by enabling the demo.', 'admin-page-framework-loader' )
78 78
                     ),
79 79
                     'position'  => array( 'edge' => 'left', 'align' => 'middle' )
80 80
                 )
Please login to merge, or discard this patch.
factory/_common/_abstract/_controller/AdminPageFramework_Resource_Base.php 4 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -232,6 +232,8 @@  discard block
 block discarded – undo
232 232
      * @remark      The meta box class may be instantiated multiple times so prevent echoing the same styles multiple times.
233 233
      * @parameter   string      $sIDPrefix   The id selector embedded in the script tag.
234 234
      * @parameter   string      $sClassName  The class name that identify the call group. This is important for the meta-box class because it can be instantiated multiple times in one particular page.
235
+     * @param string $sIDPrefix
236
+     * @param string $sClassName
235 237
      */
236 238
     protected function _printCommonStyles( $sIDPrefix, $sClassName ) {
237 239
 
@@ -315,6 +317,8 @@  discard block
 block discarded – undo
315 317
      * @remark      The meta box class may be instantiated multiple times so prevent echoing the same styles multiple times.
316 318
      * @parametr    string      $sIDPrefix      The id selector embedded in the script tag.
317 319
      * @parametr    string      $sClassName     The class name that identify the call group. This is important for the meta-box class because it can be instantiated multiple times in one particular page.
320
+     * @param string $sIDPrefix
321
+     * @param string $sClassName
318 322
      */
319 323
     protected function _printCommonScripts( $sIDPrefix, $sClassName ) {
320 324
         
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
     /*
163 163
      * Shared methods
164 164
      */
165
-    	/**
165
+        /**
166 166
          * Checks the src url of the enqueued script/style to determine whether or not to set up a attribute modification callback.
167 167
          *
168 168
          * If it is one of the framework added item, the method sets up a hook to modify the url to add custom attributes.
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
 
37 37
         /* The system internal keys. */
38 38
         'sSRC'          => null,
39
-        'aPostTypes'    => array(),     // for meta box class
39
+        'aPostTypes'    => array(), // for meta box class
40 40
         'sPageSlug'     => null,
41 41
         'sTabSlug'      => null,
42
-        'sType'         => null,        // script or style
42
+        'sType'         => null, // script or style
43 43
 
44 44
         /* The below keys are for users. */
45 45
         'handle_id'     => null,
46 46
         'dependencies'  => array(),
47
-        'version'       => false,       // although the type should be string, the wp_enqueue_...() functions want false as the default value.
48
-        'translation'   => array(),     // only for scripts
49
-        'in_footer'     => false,       // only for scripts
50
-        'media'         => 'all',       // only for styles
51
-        'attributes'    => array(),     // 3.3.0+ - the attribute array
47
+        'version'       => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value.
48
+        'translation'   => array(), // only for scripts
49
+        'in_footer'     => false, // only for scripts
50
+        'media'         => 'all', // only for styles
51
+        'attributes'    => array(), // 3.3.0+ - the attribute array
52 52
 
53 53
     );
54 54
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @remark      This value should be overridden in an extended class.
60 60
      * @internal
61 61
      */
62
-    protected $_sClassSelector_Style    = 'admin-page-framework-style';
62
+    protected $_sClassSelector_Style = 'admin-page-framework-style';
63 63
 
64 64
     /**
65 65
      * Stores the class selector used to the class-specific script.
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @remark      This value should be overridden in an extended class.
69 69
      * @internal
70 70
      */
71
-    protected $_sClassSelector_Script   = 'admin-page-framework-script';
71
+    protected $_sClassSelector_Script = 'admin-page-framework-script';
72 72
 
73 73
     /**
74 74
      * Stores hand IDs by resource url to look up handle id and add custom arguments.
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
      * @internal
144 144
      */
145 145
 
146
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {}
147
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {}
146
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {}
147
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {}
148 148
 
149 149
     /**
150 150
      * A helper function for the _replyToEnqueueScripts() and the `_replyToEnqueueStyle()` methods.
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
                         return $sSanitizedURL;
205 205
                     }
206 206
 
207
-                    $_sAttributes   = $this->getAttributes( $_aAttributes );
208
-                    return $sSanitizedURL . "' " . rtrim( $_sAttributes, "'\"" );
207
+                    $_sAttributes = $this->getAttributes( $_aAttributes );
208
+                    return $sSanitizedURL."' ".rtrim( $_sAttributes, "'\"" );
209 209
 
210 210
                 }
211 211
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     protected function _printCommonStyles( $sIDPrefix, $sClassName ) {
227 227
 
228
-        if ( $this->hasBeenCalled( 'COMMON_STYLES: ' . get_class( $this ) . '::' . __METHOD__ ) ) {
228
+        if ( $this->hasBeenCalled( 'COMMON_STYLES: '.get_class( $this ).'::'.__METHOD__ ) ) {
229 229
             return;
230 230
         }
231 231
         $_oCaller = $this->oProp->oCaller;
@@ -241,10 +241,10 @@  discard block
 block discarded – undo
241 241
          */
242 242
         private function ___getCommonStyleTag( $oCaller, $sIDPrefix ) {
243 243
 
244
-            $_sStyle     = $this->addAndApplyFilters(
244
+            $_sStyle = $this->addAndApplyFilters(
245 245
                 $oCaller,
246 246
                 array(
247
-                    "style_common_admin_page_framework",            // 3.2.1+
247
+                    "style_common_admin_page_framework", // 3.2.1+
248 248
                     "style_common_{$this->oProp->sClassName}",
249 249
                 ),
250 250
                 AdminPageFramework_CSS::getDefaultCSS()
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             $_sStyle     = $this->isDebugMode() ? $_sStyle : $this->getCSSMinified( $_sStyle );
253 253
             $_sStyle     = trim( $_sStyle );
254 254
             if ( $_sStyle ) {
255
-                echo "<style type='text/css' id='" . esc_attr( strtolower( $sIDPrefix ) ) . "'>"
255
+                echo "<style type='text/css' id='".esc_attr( strtolower( $sIDPrefix ) )."'>"
256 256
                         . $_sStyle
257 257
                     . "</style>";
258 258
             }
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
          */
268 268
         private function ___getCommonIEStyleTag( $oCaller, $sIDPrefix ) {
269 269
 
270
-            $_sStyleIE   = $this->addAndApplyFilters(
270
+            $_sStyleIE = $this->addAndApplyFilters(
271 271
                 $oCaller,
272 272
                 array(
273
-                    "style_ie_common_admin_page_framework",         // 3.2.1+
273
+                    "style_ie_common_admin_page_framework", // 3.2.1+
274 274
                     "style_ie_common_{$this->oProp->sClassName}",
275 275
                 ),
276 276
                 AdminPageFramework_CSS::getDefaultCSSIE()
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $_sStyleIE  = $this->isDebugMode() ? $_sStyleIE : $this->getCSSMinified( $_sStyleIE );
279 279
             $_sStyleIE  = trim( $_sStyleIE );
280 280
             return $_sStyleIE
281
-                ? "<!--[if IE]><style type='text/css' id='" . esc_attr( strtolower( $sIDPrefix . "-ie" ) ) . "'>"
281
+                ? "<!--[if IE]><style type='text/css' id='".esc_attr( strtolower( $sIDPrefix."-ie" ) )."'>"
282 282
                         . $_sStyleIE
283 283
                     . "</style><![endif]-->"
284 284
                 : '';
@@ -297,23 +297,23 @@  discard block
 block discarded – undo
297 297
      */
298 298
     protected function _printCommonScripts( $sIDPrefix, $sClassName ) {
299 299
 
300
-        if ( $this->hasBeenCalled( 'COMMON_SCRIPT: ' . get_class( $this ) . '::' . __METHOD__ ) ) {
300
+        if ( $this->hasBeenCalled( 'COMMON_SCRIPT: '.get_class( $this ).'::'.__METHOD__ ) ) {
301 301
             return;
302 302
         }
303 303
 
304 304
         $_sScript = $this->addAndApplyFilters(
305 305
             $this->oProp->oCaller,
306 306
             array(
307
-                "script_common_admin_page_framework",       // 3.2.1+
307
+                "script_common_admin_page_framework", // 3.2.1+
308 308
                 "script_common_{$this->oProp->sClassName}",
309 309
             ),
310 310
             AdminPageFramework_Property_Base::$_sDefaultScript
311 311
         );
312 312
         $_sScript = trim( $_sScript );
313
-        if ( ! $_sScript ) {
313
+        if ( !$_sScript ) {
314 314
             return;
315 315
         }
316
-        echo "<script type='text/javascript' id='" . esc_attr( strtolower( $sIDPrefix ) ) . "'>"
316
+        echo "<script type='text/javascript' id='".esc_attr( strtolower( $sIDPrefix ) )."'>"
317 317
                 . '/* <![CDATA[ */'
318 318
                 . $_sScript
319 319
                 . '/* ]]> */'
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
      */
332 332
     protected function _printClassSpecificStyles( $sIDPrefix ) {
333 333
 
334
-        $_oCaller   = $this->oProp->oCaller;
334
+        $_oCaller = $this->oProp->oCaller;
335 335
         echo $this->_getClassSpecificStyleTag( $_oCaller, $sIDPrefix );
336 336
         echo $this->_getClassSpecificIEStyleTag( $_oCaller, $sIDPrefix );
337 337
 
@@ -352,18 +352,18 @@  discard block
 block discarded – undo
352 352
             static $_iCallCount = 0;
353 353
 
354 354
             $_sFilterName = "style_{$this->oProp->sClassName}";
355
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
355
+            if ( $this->hasBeenCalled( 'FILTER: '.$_sFilterName ) ) { // 3.8.22
356 356
                 return '';
357 357
             }
358 358
             $_sStyle = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyle );
359 359
             $_sStyle = $this->isDebugMode() ? $_sStyle : $this->getCSSMinified( $_sStyle );
360 360
             $_sStyle = trim( $_sStyle );
361
-            if ( ! $_sStyle ) {
361
+            if ( !$_sStyle ) {
362 362
                 return '';
363 363
             }
364 364
             $_iCallCount++;
365
-            $_sID = strtolower( "{$sIDPrefix}-" . $this->oProp->sClassName . "_{$_iCallCount}" );
366
-            return "<style type='text/css' id='" . esc_attr( $_sID ) . "'>"
365
+            $_sID = strtolower( "{$sIDPrefix}-".$this->oProp->sClassName."_{$_iCallCount}" );
366
+            return "<style type='text/css' id='".esc_attr( $_sID )."'>"
367 367
                     . $_sStyle
368 368
                 . "</style>";
369 369
 
@@ -379,18 +379,18 @@  discard block
 block discarded – undo
379 379
             static $_iCallCountIE = 1;
380 380
 
381 381
             $_sFilterName = "style_ie_{$this->oProp->sClassName}";
382
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
382
+            if ( $this->hasBeenCalled( 'FILTER: '.$_sFilterName ) ) { // 3.8.22
383 383
                 return '';
384 384
             }
385 385
             $_sStyleIE = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyleIE );
386 386
             $_sStyleIE = $this->isDebugMode() ? $_sStyleIE : $this->getCSSMinified( $_sStyleIE );
387 387
             $_sStyleIE = trim( $_sStyleIE );
388
-            if ( ! $_sStyleIE ) {
388
+            if ( !$_sStyleIE ) {
389 389
                 return '';
390 390
             }
391 391
             $_iCallCountIE++;
392
-            $_sID  = strtolower( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" );
393
-            return "<!--[if IE]><style type='text/css' id='" . esc_attr( $_sID ) . "'>"
392
+            $_sID = strtolower( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" );
393
+            return "<!--[if IE]><style type='text/css' id='".esc_attr( $_sID )."'>"
394 394
                     . $_sStyleIE
395 395
                 . "</style><![endif]-->";
396 396
 
@@ -407,18 +407,18 @@  discard block
 block discarded – undo
407 407
 
408 408
         static $_iCallCount = 1;
409 409
         $_sFilterName = "script_{$this->oProp->sClassName}";
410
-        if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
410
+        if ( $this->hasBeenCalled( 'FILTER: '.$_sFilterName ) ) { // 3.8.22
411 411
             return '';
412 412
         }
413 413
         $_sScript = $this->addAndApplyFilters( $this->oProp->oCaller, $_sFilterName, $this->oProp->sScript );
414 414
         $_sScript = trim( $_sScript );
415
-        if ( ! $_sScript ) {
415
+        if ( !$_sScript ) {
416 416
             return '';
417 417
         }
418 418
 
419 419
         $_iCallCount++;
420 420
         $_sID = strtolower( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" );
421
-        echo "<script type='text/javascript' id='" . esc_attr( $_sID ) . "'>"
421
+        echo "<script type='text/javascript' id='".esc_attr( $_sID )."'>"
422 422
                 . '/* <![CDATA[ */'
423 423
                 . $_sScript
424 424
                 . '/* ]]> */'
@@ -442,12 +442,12 @@  discard block
 block discarded – undo
442 442
     public function _replyToAddStyle() {
443 443
 
444 444
         $_oCaller = $this->oProp->oCaller;
445
-        if ( ! $_oCaller->isInThePage() ) {
445
+        if ( !$_oCaller->isInThePage() ) {
446 446
             return;
447 447
         }
448 448
 
449 449
         $this->_printCommonStyles( 'admin-page-framework-style-common', get_class() );
450
-        $this->_printClassSpecificStyles( $this->_sClassSelector_Style . '-' . $this->oProp->sStructureType );
450
+        $this->_printClassSpecificStyles( $this->_sClassSelector_Style.'-'.$this->oProp->sStructureType );
451 451
 
452 452
     }
453 453
     /**
@@ -462,12 +462,12 @@  discard block
 block discarded – undo
462 462
     public function _replyToAddScript() {
463 463
 
464 464
         $_oCaller = $this->oProp->oCaller;
465
-        if ( ! $_oCaller->isInThePage() ) {
465
+        if ( !$_oCaller->isInThePage() ) {
466 466
             return;
467 467
         }
468 468
 
469 469
         $this->_printCommonScripts( 'admin-page-framework-script-common', get_class() );
470
-        $this->_printClassSpecificScripts( $this->_sClassSelector_Script . '-' . $this->oProp->sStructureType );
470
+        $this->_printClassSpecificScripts( $this->_sClassSelector_Script.'-'.$this->oProp->sStructureType );
471 471
 
472 472
     }
473 473
 
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
      * @internal
520 520
      */
521 521
     public function _replyToEnqueueStyles() {
522
-        foreach( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
522
+        foreach ( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
523 523
             $this->_enqueueSRCByCondition( $_aEnqueuingStyle );
524 524
             unset( $this->oProp->aEnqueuingStyles[ $_sKey ] );
525 525
         }
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
      * @internal
537 537
      */
538 538
     public function _replyToEnqueueScripts() {
539
-        foreach( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
539
+        foreach ( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
540 540
             $this->_enqueueSRCByCondition( $_aEnqueuingScript );
541 541
             unset( $this->oProp->aEnqueuingScripts[ $_sKey ] );
542 542
         }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -352,7 +352,8 @@  discard block
 block discarded – undo
352 352
             static $_iCallCount = 0;
353 353
 
354 354
             $_sFilterName = "style_{$this->oProp->sClassName}";
355
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
355
+            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) {
356
+// 3.8.22
356 357
                 return '';
357 358
             }
358 359
             $_sStyle = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyle );
@@ -379,7 +380,8 @@  discard block
 block discarded – undo
379 380
             static $_iCallCountIE = 1;
380 381
 
381 382
             $_sFilterName = "style_ie_{$this->oProp->sClassName}";
382
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
383
+            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) {
384
+// 3.8.22
383 385
                 return '';
384 386
             }
385 387
             $_sStyleIE = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyleIE );
@@ -407,7 +409,8 @@  discard block
 block discarded – undo
407 409
 
408 410
         static $_iCallCount = 1;
409 411
         $_sFilterName = "script_{$this->oProp->sClassName}";
410
-        if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
412
+        if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) {
413
+// 3.8.22
411 414
             return '';
412 415
         }
413 416
         $_sScript = $this->addAndApplyFilters( $this->oProp->oCaller, $_sFilterName, $this->oProp->sScript );
Please login to merge, or discard this patch.
formatter/AdminPageFramework_Form_Model___Format_CollapsibleSection.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -77,6 +77,8 @@
 block discarded – undo
77 77
     }
78 78
         /**
79 79
          * @since       3.6.0
80
+         * @param boolean $abCollapsible
81
+         * @param string $sTitle
80 82
          * @return      array
81 83
          */
82 84
         private function _getArguments( $abCollapsible, $sTitle, array $aSection ) {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
      * @since       3.6.0       Moved from `AdminPageFramework_FormDefinition`.
25 25
      */
26 26
     static public $aStructure = array(
27
-        'title'                     => null,        // (string)  the section title will be assigned by default in the section formatting method.
28
-        'is_collapsed'              => true,        // (boolean) whether it is already collapsed or expanded
29
-        'toggle_all_button'         => null,        // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`.
30
-        'collapse_others_on_expand' => true,        // (boolean) whether the other collapsible sections should be folded when the section is unfolded.
31
-        'container'                 => 'sections',  // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted.
32
-        'type'                      => 'box',       // 3.7.0+  (string)  supported types 'box', 'button' Default: `box`. The `button` type is only supported when the `container` argument is `section`.
27
+        'title'                     => null, // (string)  the section title will be assigned by default in the section formatting method.
28
+        'is_collapsed'              => true, // (boolean) whether it is already collapsed or expanded
29
+        'toggle_all_button'         => null, // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`.
30
+        'collapse_others_on_expand' => true, // (boolean) whether the other collapsible sections should be folded when the section is unfolded.
31
+        'container'                 => 'sections', // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted.
32
+        'type'                      => 'box', // 3.7.0+  (string)  supported types 'box', 'button' Default: `box`. The `button` type is only supported when the `container` argument is `section`.
33 33
     );
34 34
     
35 35
     public $abCollapsible = false;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @remark      The framework will not pass this parameter when formatting a section definition array.
43 43
      * It will be passed when the framework is rendering a form table to generate collapsible elements.
44 44
      */
45
-    public $aSection      = array();
45
+    public $aSection = array();
46 46
     
47 47
     /**
48 48
      * Sets up properties.
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
             
86 86
             $_aCollapsible = $this->getAsArray( $this->abCollapsible ) + array(
87 87
                 'title'     => $sTitle,
88
-            ) +  self::$aStructure;
88
+            ) + self::$aStructure;
89 89
             
90 90
             $_aCollapsible[ 'toggle_all_button' ] = implode(
91 91
                 ',',
92 92
                 $this->getAsArray( $_aCollapsible[ 'toggle_all_button' ] )
93 93
             );
94 94
             
95
-            if ( ! empty( $aSection ) ) {
95
+            if ( !empty( $aSection ) ) {
96 96
                 $_aCollapsible[ 'toggle_all_button' ] = $this->_getToggleAllButtonArgument(
97 97
                     $_aCollapsible[ 'toggle_all_button' ],
98 98
                     $aSection
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
              */
117 117
             private function _getToggleAllButtonArgument( $sToggleAll, array $aSection ) {
118 118
                 
119
-                if ( ! $aSection[ 'repeatable' ] ) {
119
+                if ( !$aSection[ 'repeatable' ] ) {
120 120
                     return $sToggleAll;
121 121
                 }
122 122
                 
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
                 }
127 127
                 
128 128
                 // Disable the toggle all button for middle sub-sections in repeatable sections.
129
-                if ( ! $aSection[ '_is_first_index' ] && ! $aSection[ '_is_last_index' ] ) {
129
+                if ( !$aSection[ '_is_first_index' ] && !$aSection[ '_is_last_index' ] ) {
130 130
                     return 0;
131 131
                 }
132 132
                 
133 133
                 $_aToggleAll = $this->getAOrB(
134
-                    true === $sToggleAll || 1 ===  $sToggleAll, // evaluate
135
-                    array( 'top-right', 'bottom-right' ),   // if true
134
+                    true === $sToggleAll || 1 === $sToggleAll, // evaluate
135
+                    array( 'top-right', 'bottom-right' ), // if true
136 136
                     explode( ',', $sToggleAll ) // if false
137 137
                 );
138 138
                 $_aToggleAll = $this->getAOrB(
Please login to merge, or discard this patch.
generator/field/AdminPageFramework_Form_View___Generate_Field_Base.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@
 block discarded – undo
23 23
      * @internal
24 24
      * @since       3.5.3
25 25
      * @since       3.6.0       Moved from `AdminPageFramework_FormDefinition`.
26
-     * @param       array       $aFieldset     a field definition array.
27 26
      * @return      boolean
28 27
      */
29 28
     protected function _isSectionSet() {
Please login to merge, or discard this patch.
generator/field/AdminPageFramework_Form_View___Generate_FieldInputName.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -60,6 +60,7 @@
 block discarded – undo
60 60
         /**
61 61
          * Applies the subject string to the set callback filter function.
62 62
          * @since       3.6.0
63
+         * @param string $sSubject
63 64
          */
64 65
         protected function _getFiltered( $sSubject ) {
65 66
             return is_callable( $this->hfCallback )
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
         $_sIndex = $this->getAOrB(
55 55
             '0' !== $this->sIndex && empty( $this->sIndex ),
56 56
             '',
57
-            "[" . $this->sIndex . "]"
57
+            "[".$this->sIndex."]"
58 58
         );
59
-        return $this->_getFiltered( $this->_getFieldName() . $_sIndex );
59
+        return $this->_getFiltered( $this->_getFieldName().$_sIndex );
60 60
 
61 61
     }
62 62
 
Please login to merge, or discard this patch.
development/factory/_common/form/input/AdminPageFramework_Input_Base.php 3 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,10 +105,8 @@
 block discarded – undo
105 105
      * If a parameter is not passed, it returns the entire attribute array.
106 106
      * 
107 107
      * @since       3.5.3
108
-     * @return      string|array|null        The specified attribute value or the entire attribute array if not specified. 
108
+     * @return      string        The specified attribute value or the entire attribute array if not specified. 
109 109
      * If not set, null will be returned as the `getAttributes()` method will not list an attribute with the null value.
110
-     * @param       string      $sName      The attribute name.
111
-     * @param       string      $sDefault   The defaqult value if the value is not set.
112 110
      */
113 111
     public function getAttribute( /* $sName=null, $sDefault=null */ ) {
114 112
         $_aParams = func_get_args() + array(
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
      * @return      string      The set class selector(s).
128 128
      */
129 129
     public function addClass( /* $asSelectors1, $asSelectors2 */ ) {
130
-        foreach( func_get_args() as $_asSelectors ) {            
130
+        foreach( func_get_args() as $_asSelectors ) {
131 131
             $this->aAttributes['class'] = $this->getClassAttribute( 
132 132
                 $this->aAttributes['class'],
133 133
                 $_asSelectors
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
      * @param       array       $aAttributes    The attribute array. A field definition array is deprecated.
64 64
      * @param       array       $aOptions       options that allows the user to set custom container tags and class selectors.
65 65
      */
66
-    public function __construct( array $aAttributes, array $aOptions=array() ) {
66
+    public function __construct( array $aAttributes, array $aOptions = array() ) {
67 67
 
68
-        $this->aAttributes  = $this->getElementAsArray( 
68
+        $this->aAttributes = $this->getElementAsArray( 
69 69
             $aAttributes, 
70 70
             'attributes', 
71 71
             $aAttributes    // if the above key is not set, this will be set
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
      * @return      string      The set class selector(s).
128 128
      */
129 129
     public function addClass( /* $asSelectors1, $asSelectors2 */ ) {
130
-        foreach( func_get_args() as $_asSelectors ) {            
131
-            $this->aAttributes['class'] = $this->getClassAttribute( 
132
-                $this->aAttributes['class'],
130
+        foreach ( func_get_args() as $_asSelectors ) {            
131
+            $this->aAttributes[ 'class' ] = $this->getClassAttribute( 
132
+                $this->aAttributes[ 'class' ],
133 133
                 $_asSelectors
134 134
             );
135 135
         }
136
-        return $this->aAttributes['class'];
136
+        return $this->aAttributes[ 'class' ];
137 137
     }
138 138
     
139 139
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         // $this->aAttributes[ $_aParams[ 0 ] ] = $_aParams[ 1 ];
159 159
         $this->setMultiDimensionalArray(
160 160
             $this->aAttributes, 
161
-            $this->getElementAsArray( $_aParams, 0 ),   // $asAttributeName
161
+            $this->getElementAsArray( $_aParams, 0 ), // $asAttributeName
162 162
             $_aParams[ 1 ]  // $mValue
163 163
         );
164 164
     }
Please login to merge, or discard this patch.
utility/base_utility/AdminPageFramework_Utility_SystemInformation.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      * Returns an array of constants.
96 96
      * 
97 97
      * @since       3.4.6
98
-     * @param       array|string      $asCategory      The category key names of the returning array.
98
+     * @param       array|string      $asCategories      The category key names of the returning array.
99 99
      */
100 100
     static public function getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
101 101
         
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $_sOutput = preg_replace(
42 42
             array(
43 43
                 '#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms',
44
-                '#<h1>Configuration</h1>#',  "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#',
44
+                '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#',
45 45
                 "#[ \t]+#", '#&nbsp;#', '#  +#', '# class=".*?"#', '%&#039;%',
46 46
                 '#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>'
47 47
                     .'<h1>PHP Version (.*?)</h1>(?:\n+?)</td></tr>#',
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
                 '#</tr>#'
53 53
             ),
54 54
             array(
55
-                '$1', '', '', '', '</$1>' . "\n", '<', ' ', ' ', ' ', '', ' ',
55
+                '$1', '', '', '', '</$1>'."\n", '<', ' ', ' ', ' ', '', ' ',
56 56
                 '<h2>PHP Configuration</h2>'."\n".'<tr><td>PHP Version</td><td>$2</td></tr>'.
57 57
                 "\n".'<tr><td>PHP Egg</td><td>$1</td></tr>',
58 58
                 '<tr><td>PHP Credits Egg</td><td>$1</td></tr>',
59
-                '<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" . '<tr><td>Zend Egg</td><td>$1</td></tr>',
59
+                '<tr><td>Zend Engine</td><td>$2</td></tr>'."\n".'<tr><td>Zend Egg</td><td>$1</td></tr>',
60 60
                 ' ',
61 61
                 '%S%',
62 62
                 '%E%'
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         unset( $_aSections[ 0 ] );
69 69
 
70 70
         $_aOutput = array();
71
-        foreach( $_aSections as $_sSection ) {
71
+        foreach ( $_aSections as $_sSection ) {
72 72
             $_iIndex = substr( $_sSection, 0, strpos( $_sSection, '</h2>' ) );
73 73
             preg_match_all(
74 74
                 '#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#',
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
                 $_aAskApache, 
77 77
                 PREG_SET_ORDER
78 78
             );
79
-            foreach( $_aAskApache as $_aMatches ) {
80
-                if ( ! isset( $_aMatches[ 1 ], $_aMatches[ 2 ] ) ) {
79
+            foreach ( $_aAskApache as $_aMatches ) {
80
+                if ( !isset( $_aMatches[ 1 ], $_aMatches[ 2 ] ) ) {
81 81
                     array_slice( $_aMatches, 2 );
82 82
                     continue;
83 83
                 }
84
-                $_aOutput[ $_iIndex ][ $_aMatches[ 1 ] ] = ! isset( $_aMatches[ 3 ] ) || $_aMatches[ 2 ] == $_aMatches[ 3 ]
84
+                $_aOutput[ $_iIndex ][ $_aMatches[ 1 ] ] = !isset( $_aMatches[ 3 ] ) || $_aMatches[ 2 ] == $_aMatches[ 3 ]
85 85
                     ? $_aMatches[ 2 ] 
86 86
                     : array_slice( $_aMatches, 2 );
87 87
             }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @since       3.4.6
98 98
      * @param       array|string      $asCategory      The category key names of the returning array.
99 99
      */
100
-    static public function getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
100
+    static public function getDefinedConstants( $asCategories = null, $asRemovingCategories = null ) {
101 101
         
102 102
         $_aCategories           = is_array( $asCategories ) ? $asCategories : array( $asCategories );
103 103
         $_aCategories           = array_filter( $_aCategories );
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
     static public function getPHPErrorLogPath() {
125 125
                 
126 126
         $_aPHPInfo = self::getPHPInfo();
127
-        return isset( $_aPHPInfo['PHP Core']['error_log'] ) 
128
-            ? $_aPHPInfo['PHP Core']['error_log']
127
+        return isset( $_aPHPInfo[ 'PHP Core' ][ 'error_log' ] ) 
128
+            ? $_aPHPInfo[ 'PHP Core' ][ 'error_log' ]
129 129
             : '';
130 130
         
131 131
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * Returns a PHP error log.
135 135
      * @since       3.4.6
136 136
      */
137
-    static public function getPHPErrorLog( $iLines=1 ) {
137
+    static public function getPHPErrorLog( $iLines = 1 ) {
138 138
         
139 139
         $_sLog = self::getFileTailContents( self::getPHPErrorLogPath(), $iLines );
140 140
         
Please login to merge, or discard this patch.