Completed
Branch master (e9f65a)
by
unknown
03:51 queued 01:58
created
factory/admin_page/_controller/AdminPageFramework_HelpPane_admin_page.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function _replyToRegisterHelpTabs() {
67 67
 
68
-        if ( ! $this->oProp->oCaller->isInThePage() ) {
68
+        if ( !$this->oProp->oCaller->isInThePage() ) {
69 69
             return;
70 70
         }
71 71
 
72 72
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
73 73
         $_sCurrentTabSlug   = $this->oProp->getCurrentTabSlug( $_sCurrentPageSlug );
74 74
 
75
-        if ( ! $this->oProp->isPageAdded( $_sCurrentPageSlug ) ) {
75
+        if ( !$this->oProp->isPageAdded( $_sCurrentPageSlug ) ) {
76 76
             return;
77 77
         }
78 78
 
79
-        foreach( $this->oProp->aHelpTabs as $aHelpTab ) {
79
+        foreach ( $this->oProp->aHelpTabs as $aHelpTab ) {
80 80
             $this->_registerHelpTab( $aHelpTab, $_sCurrentPageSlug, $_sCurrentTabSlug );
81 81
         }
82 82
 
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
          */
90 90
         private function _registerHelpTab( array $aHelpTab, $sCurrentPageSlug, $sCurrentTabSlug ) {
91 91
 
92
-            if ( $sCurrentPageSlug != $aHelpTab['sPageSlug'] ) {
92
+            if ( $sCurrentPageSlug != $aHelpTab[ 'sPageSlug' ] ) {
93 93
                 return;
94 94
             }
95
-            if ( isset( $aHelpTab['sPageTabSlug'] ) && ! empty( $aHelpTab['sPageTabSlug'] ) && $sCurrentTabSlug != $aHelpTab['sPageTabSlug'] ) {
95
+            if ( isset( $aHelpTab[ 'sPageTabSlug' ] ) && !empty( $aHelpTab[ 'sPageTabSlug' ] ) && $sCurrentTabSlug != $aHelpTab[ 'sPageTabSlug' ] ) {
96 96
                 return;
97 97
             }
98 98
 
@@ -131,24 +131,24 @@  discard block
 block discarded – undo
131 131
         $aHelpTab = ( array ) $aHelpTab + self::$_aStructure_HelpTabUserArray;
132 132
 
133 133
         // If the key is not set, that means the help tab array is not created yet. So create it and go back.
134
-        if ( ! isset( $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ] ) ) {
135
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ] = array(
136
-                'sID'           => $aHelpTab['help_tab_id'],
137
-                'sTitle'        => $aHelpTab['help_tab_title'],
138
-                'aContent'      => ! empty( $aHelpTab['help_tab_content'] ) ? array( $this->_formatHelpDescription( $aHelpTab['help_tab_content'] ) ) : array(),
139
-                'aSidebar'      => ! empty( $aHelpTab['help_tab_sidebar_content'] ) ? array( $this->_formatHelpDescription( $aHelpTab['help_tab_sidebar_content'] ) ) : array(),
140
-                'sPageSlug'     => $aHelpTab['page_slug'],
141
-                'sPageTabSlug'  => $aHelpTab['page_tab_slug'],
134
+        if ( !isset( $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ] ) ) {
135
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ] = array(
136
+                'sID'           => $aHelpTab[ 'help_tab_id' ],
137
+                'sTitle'        => $aHelpTab[ 'help_tab_title' ],
138
+                'aContent'      => !empty( $aHelpTab[ 'help_tab_content' ] ) ? array( $this->_formatHelpDescription( $aHelpTab[ 'help_tab_content' ] ) ) : array(),
139
+                'aSidebar'      => !empty( $aHelpTab[ 'help_tab_sidebar_content' ] ) ? array( $this->_formatHelpDescription( $aHelpTab[ 'help_tab_sidebar_content' ] ) ) : array(),
140
+                'sPageSlug'     => $aHelpTab[ 'page_slug' ],
141
+                'sPageTabSlug'  => $aHelpTab[ 'page_tab_slug' ],
142 142
             );
143 143
             return;
144 144
         }
145 145
 
146 146
         // This line will be reached if the help tab array is already set. In this case, just append an array element into the keys.
147
-        if ( ! empty( $aHelpTab['help_tab_content'] ) ) {
148
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ]['aContent'][] = $this->_formatHelpDescription( $aHelpTab['help_tab_content'] );
147
+        if ( !empty( $aHelpTab[ 'help_tab_content' ] ) ) {
148
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ][ 'aContent' ][ ] = $this->_formatHelpDescription( $aHelpTab[ 'help_tab_content' ] );
149 149
         }
150
-        if ( ! empty( $aHelpTab['help_tab_sidebar_content'] ) ) {
151
-            $this->oProp->aHelpTabs[ $aHelpTab['help_tab_id'] ]['aSidebar'][] = $this->_formatHelpDescription( $aHelpTab['help_tab_sidebar_content'] );
150
+        if ( !empty( $aHelpTab[ 'help_tab_sidebar_content' ] ) ) {
151
+            $this->oProp->aHelpTabs[ $aHelpTab[ 'help_tab_id' ] ][ 'aSidebar' ][ ] = $this->_formatHelpDescription( $aHelpTab[ 'help_tab_sidebar_content' ] );
152 152
         }
153 153
 
154 154
     }
Please login to merge, or discard this patch.
development/factory/admin_page/_model/AdminPageFramework_ExportOptions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
      * @since       2.0.0
94 94
      * @since       3.5.4       Added the `$aHeader` parameter. Deprecated the `$sFileName` parameter as it is included in the $aHeader definition.
95 95
      */
96
-    public function doExport( $vData, $sFormatType=null, array $aHeader=array() ) {
96
+    public function doExport( $vData, $sFormatType = null, array $aHeader = array() ) {
97 97
 
98
-        $sFormatType    = isset( $sFormatType )
98
+        $sFormatType = isset( $sFormatType )
99 99
             ? $sFormatType
100 100
             : $this->sFormatType;
101 101
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
          * @since       3.5.4
122 122
          * @return      void
123 123
          */
124
-        private function _outputHTTPHeader( array $aHeader, $sKey='' ) {
124
+        private function _outputHTTPHeader( array $aHeader, $sKey = '' ) {
125 125
 
126
-            foreach( $aHeader as $_sKey => $_asValue ) {
126
+            foreach ( $aHeader as $_sKey => $_asValue ) {
127 127
 
128 128
                 // Nested items. Set the key to overrider array keys.
129 129
                 if ( is_array( $_asValue ) ) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                     return;
164 164
                 case 'json': // for json.
165 165
                     echo json_encode( ( array ) $vData );
166
-                    return ;
166
+                    return;
167 167
                 case 'array': // for serialized PHP array.
168 168
                 default: // for anything else,
169 169
                     echo serialize( ( array ) $vData );
Please login to merge, or discard this patch.
delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $this->oFactory = $oFactory;
30 30
 
31 31
         add_filter(
32
-            "validation_pre_" . $this->oFactory->oProp->sClassName,
32
+            "validation_pre_".$this->oFactory->oProp->sClassName,
33 33
             array( $this, '_replyToValidateUserFormInputs' ),
34 34
             10,
35 35
             4
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $_sSubmitSectionID  = $this->_getPressedSubmitButtonData( $_aSubmits, 'section_id' );
61 61
 
62 62
             // Submit Information - [3.5.0+] this will be passed to validation callback methods.
63
-            $_aSubmitsInformation        = array(
63
+            $_aSubmitsInformation = array(
64 64
                 'page_slug'     => $_sPageSlug,
65 65
                 'tab_slug'      => $_sTabSlug,
66 66
                 'input_id'      => $this->_getPressedSubmitButtonData( $_aSubmits, 'input_id' ),
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
                 'AdminPageFramework_Model__FormSubmission__Validator__Export',
81 81
                 'AdminPageFramework_Model__FormSubmission__Validator__Reset',
82 82
                 'AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm', // 3.7.6+ Moved to after validation from before validation
83
-                'AdminPageFramework_Model__FormSubmission__Validator__ContactForm',  // 3.7.6+ Moved to after validation from before validation
83
+                'AdminPageFramework_Model__FormSubmission__Validator__ContactForm', // 3.7.6+ Moved to after validation from before validation
84 84
                 'AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm',
85 85
 
86 86
             );
87
-            foreach( $_aClassNames as $_sClassName ) {
87
+            foreach ( $_aClassNames as $_sClassName ) {
88 88
                 new $_sClassName( $this->oFactory );
89 89
             }
90 90
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
                 $this->addAndDoActions(
95 95
                     $this->oFactory,
96
-                    'try_validation_before_' . $this->oFactory->oProp->sClassName,
96
+                    'try_validation_before_'.$this->oFactory->oProp->sClassName,
97 97
                     $aInputs,
98 98
                     $aRawInputs,
99 99
                     $_aSubmits,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
                 $this->addAndDoActions(
114 114
                     $this->oFactory,
115
-                    'try_validation_after_' . $this->oFactory->oProp->sClassName,
115
+                    'try_validation_after_'.$this->oFactory->oProp->sClassName,
116 116
                     $aInputs,
117 117
                     $aRawInputs,
118 118
                     $_aSubmits,
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Link.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
36 36
         $_sLinkURL = $this->_getPressedSubmitButtonData( $aSubmits, 'href' );
37
-        if ( ! $_sLinkURL ) {
37
+        if ( !$_sLinkURL ) {
38 38
             return;
39 39
         }
40 40
         $this->goToURL( $_sLinkURL );
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
33 33
 
34 34
         // if the 'reset' key in the field definition array is set, this value will be set.
35
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
35
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
36 36
             return;
37 37
         }
38 38
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         );
43 43
 
44 44
         // Go to the catch clause.
45
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clasue.
45
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue.
46 46
         $_oException->aReturn = $this->_confirmSubmitButtonAction(
47 47
             $this->getElement( $aSubmitInformation, 'input_name' ),
48 48
             $this->getElement( $aSubmitInformation, 'section_id' ),
Please login to merge, or discard this patch.
AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
34 34
 
35
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
35
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
36 36
             return;
37 37
         }
38 38
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         );
46 46
 
47 47
         // Go to the catch clause.
48
-        $_oException = new Exception( 'aReturn' );  // the property name to return from the catch clasue.
48
+        $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clasue.
49 49
         $_oException->aReturn = $this->_confirmSubmitButtonAction(
50 50
             $this->getElement( $aSubmitInformation, 'input_name' ),
51 51
             $this->getElement( $aSubmitInformation, 'section_id' ),
Please login to merge, or discard this patch.
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.