Completed
Branch master (478c6b)
by
unknown
02:10
created
validaor/AdminPageFramework_Model__FormSubmission__Validator_Base.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             : 'add_filter';
36 36
 
37 37
         $_sFunctionName(
38
-            $this->sActionHookPrefix . $this->oFactory->oProp->sClassName,
38
+            $this->sActionHookPrefix.$this->oFactory->oProp->sClassName,
39 39
             array( $this, $this->sCallbackName ),
40 40
             $this->iHookPriority,
41 41
             $this->iCallbackParameters
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
      * @since   3.6.3       Moved from `AdminPageFramework_Validation`.
56 56
      * @return  array       The intact stored options.
57 57
      */
58
-    protected function _confirmSubmitButtonAction( $sPressedInputName, $sSectionID, $sType='reset' ) {
58
+    protected function _confirmSubmitButtonAction( $sPressedInputName, $sSectionID, $sType = 'reset' ) {
59 59
 
60
-        switch( $sType ) {
60
+        switch ( $sType ) {
61 61
             default:
62 62
             case 'reset':
63 63
                 $_sFieldErrorMessage = $this->oFactory->oMsg->get( 'reset_options' );
64
-                $_sTransientKey      =  'apf_rc_' . md5( $sPressedInputName . get_current_user_id() );
64
+                $_sTransientKey      = 'apf_rc_'.md5( $sPressedInputName.get_current_user_id() );
65 65
                 break;
66 66
             case 'email':
67 67
                 $_sFieldErrorMessage = $this->oFactory->oMsg->get( 'send_email' );
68
-                $_sTransientKey      =  'apf_ec_' . md5( $sPressedInputName . get_current_user_id() );
68
+                $_sTransientKey      = 'apf_ec_'.md5( $sPressedInputName.get_current_user_id() );
69 69
                 break;
70 70
         }
71 71
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->oFactory->setFieldErrors( $_aErrors );
88 88
 
89 89
         // Set a flag that the confirmation is displayed
90
-        $this->setTransient( $_sTransientKey, $sPressedInputName, 60*2 );
90
+        $this->setTransient( $_sTransientKey, $sPressedInputName, 60 * 2 );
91 91
 
92 92
         // Set the admin notice
93 93
         $this->oFactory->setSettingNotice( $this->oFactory->oMsg->get( 'confirm_perform_task' ), 'error confirmation' );
Please login to merge, or discard this patch.
_model/delegate/AdminPageFramework_Model__FormRedirectHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function __construct( $oFactory ) {
30 30
 
31
-        $this->oFactory         = $oFactory;
31
+        $this->oFactory = $oFactory;
32 32
 
33 33
         // wp_mail() will be loaded by the time 'after_setup_theme' is loaded.
34 34
         // @deprecated      3.7.0
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function _replyToCheckRedirects() {
54 54
 
55
-        if ( ! $this->_shouldProceed() ) {
55
+        if ( !$this->_shouldProceed() ) {
56 56
             return;
57 57
         }
58 58
 
59 59
         // The redirect transient key.
60
-        $_sTransient = 'apf_rurl' . md5(
61
-            trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_GET['page']}" )
60
+        $_sTransient = 'apf_rurl'.md5(
61
+            trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_GET[ 'page' ]}" )
62 62
         );
63 63
 
64 64
         // Check the settings error transient.
65 65
         $_aError = $this->oFactory->getFieldErrors();
66
-        if ( ! empty( $_aError ) ) {
66
+        if ( !empty( $_aError ) ) {
67 67
             $this->deleteTransient( $_sTransient ); // we don't need it any more.
68 68
             return;
69 69
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         private function _shouldProceed() {
91 91
 
92 92
             // Check if it's one of the plugin's added page. If not, do nothing.
93
-            if ( ! $this->oFactory->isInThePage() ) {
93
+            if ( !$this->oFactory->isInThePage() ) {
94 94
                 return false;
95 95
             }
96 96
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 'settings-updated',
104 104
                 false
105 105
             );
106
-            if ( ! $_bsSettingsUpdatedFlag ) {
106
+            if ( !$_bsSettingsUpdatedFlag ) {
107 107
                 return false;
108 108
             }
109 109
 
Please login to merge, or discard this patch.
factory/admin_page/_model/AdminPageFramework_CustomSubmitFields.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function __construct( array $aPostElement ) {
36 36
 
37 37
         $this->aPost    = $aPostElement;
38
-        $this->sInputID = $this->getInputID( $aPostElement['submit'] ); // the submit element must be set by the field type.
38
+        $this->sInputID = $this->getInputID( $aPostElement[ 'submit' ] ); // the submit element must be set by the field type.
39 39
 
40 40
     }
41 41
 
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
      * @since   2.0.0
48 48
      * @since   3.4.0   Changed the name from `getElement()`.
49 49
      */
50
-    protected function getSubmitValueByType( $aElement, $sInputID, $sElementKey='format' ) {
50
+    protected function getSubmitValueByType( $aElement, $sInputID, $sElementKey = 'format' ) {
51 51
 
52 52
         return $this->getElement(
53
-            $aElement,  // subject array
53
+            $aElement, // subject array
54 54
             array( $sInputID, $sElementKey ), // dimensional keys
55 55
             null    // default
56 56
         );
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // Only the pressed element will be stored in the array.
81 81
         // The input tag: name="__import[submit][my_section_my_import_field_the_index]" value="Import Button"
82 82
         // The array structure:  array( 'my_section_my_import_field_the_index' => 'Import Button' )
83
-        foreach( $aSubmitElement as $sInputID => $v ) { // $aSubmitElement should have been set in the constructor.
83
+        foreach ( $aSubmitElement as $sInputID => $v ) { // $aSubmitElement should have been set in the constructor.
84 84
             $this->sInputID = $sInputID;
85 85
             return $this->sInputID;
86 86
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,8 @@
 block discarded – undo
80 80
         // Only the pressed element will be stored in the array.
81 81
         // The input tag: name="__import[submit][my_section_my_import_field_the_index]" value="Import Button"
82 82
         // The array structure:  array( 'my_section_my_import_field_the_index' => 'Import Button' )
83
-        foreach( $aSubmitElement as $sInputID => $v ) { // $aSubmitElement should have been set in the constructor.
83
+        foreach( $aSubmitElement as $sInputID => $v ) {
84
+// $aSubmitElement should have been set in the constructor.
84 85
             $this->sInputID = $sInputID;
85 86
             return $this->sInputID;
86 87
         }
Please login to merge, or discard this patch.
_model/format/AdminPageFramework_Format_NavigationTab_InPageTab.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             )
64 64
         );
65 65
 
66
-        if ( ! $this->_isEnabled( $_aTab ) ) {
66
+        if ( !$this->_isEnabled( $_aTab ) ) {
67 67
             return array();
68 68
         }
69 69
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 : esc_url(
78 78
                     $this->getElement(
79 79
                         $_aTab,
80
-                        'url',  // if the 'url' argument is set, use it. Otherwise, use the below gnerated url.
80
+                        'url', // if the 'url' argument is set, use it. Otherwise, use the below gnerated url.
81 81
                         $this->getQueryAdminURL(
82 82
                             array(
83 83
                                 'page'  => $this->aArguments[ 'page_slug' ],
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
          * @return      boolean
107 107
          */
108 108
         private function _isEnabled( $aTab ) {
109
-            return ! in_array(
109
+            return !in_array(
110 110
                 false,
111 111
                 array(
112 112
                     ( bool ) current_user_can( $aTab[ 'capability' ] ), // whether the user has the sufficient capability level
Please login to merge, or discard this patch.
admin_page/_model/format/AdminPageFramework_Format_PageResource_Script.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
      * @static
24 24
      */
25 25
     static public $aStructure = array(
26
-        'src'           => null,    // (required, string) the source url or path
26
+        'src'           => null, // (required, string) the source url or path
27 27
         'handle_id'     => null,
28 28
         'dependencies'  => array(),
29
-        'version'       => false,       // although the type should be string, the wp_enqueue_...() functions want false as the default value.
30
-        'translation'   => array(),     // only for scripts
31
-        'in_footer'     => false,       // only for scripts
29
+        'version'       => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value.
30
+        'translation'   => array(), // only for scripts
31
+        'in_footer'     => false, // only for scripts
32 32
         // 'attributes'    => null,    // (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )`
33 33
     );
34 34
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $_aParameters = func_get_args() + array(
42 42
             $this->asSubject,
43 43
         );
44
-        $this->asSubject             = $_aParameters[ 0 ];
44
+        $this->asSubject = $_aParameters[ 0 ];
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
admin_page/_model/format/AdminPageFramework_Format_PageResource_Style.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
      * @static
24 24
      */
25 25
     static public $aStructure = array(
26
-        'src'           => null,    // (required, string) the source url or path
27
-        'handle_id'     => null,    // (optional, string) The handle ID of the stylesheet
28
-        'dependencies'  => null,    // (optional, array) The dependency array.
29
-        'version'       => null,    // (optional, string) The stylesheet version number.
30
-        'media'         => null,    // (optional, string) the description of the field which is inserted into the after the input field tag.
26
+        'src'           => null, // (required, string) the source url or path
27
+        'handle_id'     => null, // (optional, string) The handle ID of the stylesheet
28
+        'dependencies'  => null, // (optional, array) The dependency array.
29
+        'version'       => null, // (optional, string) The stylesheet version number.
30
+        'media'         => null, // (optional, string) the description of the field which is inserted into the after the input field tag.
31 31
         // 'attributes'    => null,    // (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )`
32 32
     );
33 33
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $_aParameters = func_get_args() + array(
41 41
             $this->asSubject,
42 42
         );
43
-        $this->asSubject             = $_aParameters[ 0 ];
43
+        $this->asSubject = $_aParameters[ 0 ];
44 44
     }
45 45
 
46 46
     /**
Please login to merge, or discard this patch.
factory/admin_page/_model/format/AdminPageFramework_Format_SubMenuItem.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 
19 19
     /**
20 20
      * Represents the structure of the sub-field definition array.
21
-
22 21
      */
23 22
     static public $aStructure = array(
24 23
     );
Please login to merge, or discard this patch.
factory/admin_page/_model/format/AdminPageFramework_Format_SubMenuPage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
         'page_slug'                 => null, // (required)
32 32
         'type'                      => 'page', // this is used to compare with the link type.
33 33
         'title'                     => null,
34
-        'page_title'                => null,    // (optional) 3.3.0+ When the page title is different from the above 'title' argument, set this.
35
-        'menu_title'                => null,    // (optional) 3.3.0+ When the menu title is different from the above 'title' argument, set this.
34
+        'page_title'                => null, // (optional) 3.3.0+ When the page title is different from the above 'title' argument, set this.
35
+        'menu_title'                => null, // (optional) 3.3.0+ When the menu title is different from the above 'title' argument, set this.
36 36
         'screen_icon'               => null, // this will become either href_icon_32x32 or screen_icon_id
37 37
         'capability'                => null,
38 38
         'order'                     => null,
@@ -123,12 +123,12 @@  discard block
 block discarded – undo
123 123
 
124 124
             $aSubMenuPage = $aSubMenuPage
125 125
                 + array(
126
-                    'show_page_title'           => $this->oFactory->oProp->bShowPageTitle,       // boolean
126
+                    'show_page_title'           => $this->oFactory->oProp->bShowPageTitle, // boolean
127 127
                     'show_page_heading_tabs'    => $this->oFactory->oProp->bShowPageHeadingTabs, // boolean
128
-                    'show_in_page_tabs'         => $this->oFactory->oProp->bShowInPageTabs,      // boolean
129
-                    'in_page_tab_tag'           => $this->oFactory->oProp->sInPageTabTag,        // string
130
-                    'page_heading_tab_tag'      => $this->oFactory->oProp->sPageHeadingTabTag,   // string
131
-                    'capability'                => $this->oFactory->oProp->sCapability,  // 3.6.0+
128
+                    'show_in_page_tabs'         => $this->oFactory->oProp->bShowInPageTabs, // boolean
129
+                    'in_page_tab_tag'           => $this->oFactory->oProp->sInPageTabTag, // string
130
+                    'page_heading_tab_tag'      => $this->oFactory->oProp->sPageHeadingTabTag, // string
131
+                    'capability'                => $this->oFactory->oProp->sCapability, // 3.6.0+
132 132
                 )
133 133
                 + self::$aStructure;
134 134
 
Please login to merge, or discard this patch.
factory/admin_page/_model/format/AdminPageFramework_Format_InPageTab.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
         'page_slug'         => null,
31 31
         'tab_slug'          => null,
32 32
         'title'             => null,
33
-        'order'             => 10,      // (integer)
34
-        'show_in_page_tab'  => true,    // 3.6.0+ (boolean)
35
-        'parent_tab_slug'   => null,    // this needs to be set if the above show_in_page_tab is false so that the framework can mark the parent tab to be active when the hidden page is accessed.
36
-        'url'               => null,    // 3.5.0+ This allows the user set custom link.
37
-        'disabled'          => null,    // 3.5.10+ (boolean) If true, the link will be unlinked.
38
-        'attributes'        => null,    // 3.5.10+ (array) Applies to the navigation tab bar element.
39
-        'capability'        => null,    // 3.6.0+ (string)
40
-        'if'                => true,    // 3.6.0+ (boolean)
41
-        'show_debug_info'   => null,    // 3.8.8+ (boolean, optional) Whether to show debug information. If not set, the existent `bShowDebugInfo` property value will be used. The initial value here is `null` as the default value will be assigned in the formatting method.
33
+        'order'             => 10, // (integer)
34
+        'show_in_page_tab'  => true, // 3.6.0+ (boolean)
35
+        'parent_tab_slug'   => null, // this needs to be set if the above show_in_page_tab is false so that the framework can mark the parent tab to be active when the hidden page is accessed.
36
+        'url'               => null, // 3.5.0+ This allows the user set custom link.
37
+        'disabled'          => null, // 3.5.10+ (boolean) If true, the link will be unlinked.
38
+        'attributes'        => null, // 3.5.10+ (array) Applies to the navigation tab bar element.
39
+        'capability'        => null, // 3.6.0+ (string)
40
+        'if'                => true, // 3.6.0+ (boolean)
41
+        'show_debug_info'   => null, // 3.8.8+ (boolean, optional) Whether to show debug information. If not set, the existent `bShowDebugInfo` property value will be used. The initial value here is `null` as the default value will be assigned in the formatting method.
42 42
     );
43 43
 
44 44
     /**
Please login to merge, or discard this patch.