Completed
Branch master (bf4987)
by Michael
03:55
created
development/factory/admin_page/_model/AdminPageFramework_FormEmail.php 4 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -202,6 +202,7 @@
 block discarded – undo
202 202
          * 
203 203
          * @since       3.3.0
204 204
          * @since       3.4.2       Moved from the validation class.
205
+         * @param string $sKey
205 206
          */
206 207
         private function _getEmailArgument( $aInput, array $aEmailOptions, $sKey, $sSectionID ) {
207 208
             
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         }
86 86
 
87 87
         // Send mail.
88
-        $_bSent         = wp_mail( 
88
+        $_bSent = wp_mail( 
89 89
             $this->_getEmailArgument( $aInput, $aEmailOptions, 'to', $sSubmitSectionID ),
90 90
             $this->_getEmailArgument( $aInput, $aEmailOptions, 'subject', $sSubmitSectionID ),
91 91
             $_bIsHTML 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         remove_filter( 'wp_mail_from_name', array( $this, '_replyToSetEmailSenderAddress' ) );
101 101
         
102 102
         // Clean up.
103
-        foreach( $this->_aPathsToDelete as $_sPath ) {
103
+        foreach ( $this->_aPathsToDelete as $_sPath ) {
104 104
             unlink( $_sPath );
105 105
         }
106 106
         
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             }
122 122
             
123 123
             $_aAttachments = $this->getAsArray( $asAttachments );          
124
-            foreach( $_aAttachments as $_iIndex => $_sPathORURL ) {
124
+            foreach ( $_aAttachments as $_iIndex => $_sPathORURL ) {
125 125
                 
126 126
                 // If it is a file path, fine.
127 127
                 if ( is_file( $_sPathORURL ) ) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             }
212 212
             
213 213
             // If the key element is empty, search the corresponding item in the same section. 
214
-            if ( ! $aEmailOptions[ $sKey ] ) {
214
+            if ( !$aEmailOptions[ $sKey ] ) {
215 215
                 return $this->getArrayValueByArrayKeys( $aInput, array( $sSectionID, $sKey ) );
216 216
             }
217 217
             
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
                 
160 160
                 // Download the file. It returns a string value on success. WP Error object on failure.
161 161
                 $_sPath = $this->download( $sURL, 10 );
162
-                if ( is_string( $_sPath ) ) {                    
162
+                if ( is_string( $_sPath ) ) {
163 163
                     $this->_aPathsToDelete[ $_sPath ] = $_sPath;
164 164
                     return $_sPath;
165 165
                 }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
         );        
278 278
     }    
279 279
     
280
-       /**
280
+        /**
281 281
          * Extracts meta box form fields options array from the given options array of an admin page.
282 282
          * 
283 283
          * @since       3.5.6
Please login to merge, or discard this patch.
development/factory/admin_page/_model/AdminPageFramework_ImportOptions.php 2 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -89,6 +89,11 @@
 block discarded – undo
89 89
         return $vData;
90 90
         
91 91
     }
92
+
93
+    /**
94
+     * @param string $vData
95
+     * @param string $sFormatType
96
+     */
92 97
     public function formatImportData( &$vData, $sFormatType=null ) {
93 98
         
94 99
         $sFormatType = isset( $sFormatType ) ? $sFormatType : $this->getFormatType();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
         
58 58
     }
59 59
     
60
-    private function getElementInFilesArray( array $aFilesImport, $sInputID, $sElementKey='error' ) {
60
+    private function getElementInFilesArray( array $aFilesImport, $sInputID, $sElementKey = 'error' ) {
61 61
 
62 62
         $sElementKey = strtolower( $sElementKey );
63 63
         return $this->getElement( 
64
-            $aFilesImport,  // subject array
64
+            $aFilesImport, // subject array
65 65
             array( $sElementKey, $sInputID ), // dimensional keys
66 66
             null    // default
67 67
         );
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         return $vData;
90 90
         
91 91
     }
92
-    public function formatImportData( &$vData, $sFormatType=null ) {
92
+    public function formatImportData( &$vData, $sFormatType = null ) {
93 93
         
94 94
         $sFormatType = isset( $sFormatType ) ? $sFormatType : $this->getFormatType();
95 95
         switch ( strtolower( $sFormatType ) ) {
Please login to merge, or discard this patch.
admin_page/_model/delegate/AdminPageFramework_Model__FormEmailHandler.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Sets up properties.
27 27
      * @since       3.6.3
28
+     * @param AdminPageFramework_Model_Form $oFactory
28 29
      */
29 30
     public function __construct( $oFactory ) {
30 31
        
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  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
         // Form emails.
34
-        if ( ! isset( $_GET[ 'apf_action' ], $_GET[ 'transient' ] ) ) {
34
+        if ( !isset( $_GET[ 'apf_action' ], $_GET[ 'transient' ] ) ) {
35 35
             return;
36 36
         }
37 37
         if ( 'email' !== $_GET[ 'apf_action' ] ) {
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
             self::$_bDoneEmail = true;
74 74
 
75 75
             $_sTransient = $this->getElement( $_GET, 'transient', '' );
76
-            if ( ! $_sTransient ) {
76
+            if ( !$_sTransient ) {
77 77
                 return;
78 78
             }
79 79
             $_aFormEmail = $this->getTransient( $_sTransient );
80 80
             $this->deleteTransient( $_sTransient );
81
-            if ( ! is_array( $_aFormEmail ) ) {
81
+            if ( !is_array( $_aFormEmail ) ) {
82 82
                 return;
83 83
             }
84 84
 
Please login to merge, or discard this patch.
admin_page/_model/delegate/AdminPageFramework_Model__FormSubmission.php 3 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -26,6 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * Sets up hooks and properties.
28 28
      * @since       3.6.3
29
+     * @param AdminPageFramework_Model_Form $oFactory
29 30
      */
30 31
     public function __construct( $oFactory, $aSavedData, $aArguments, $aSectionsets, $aFieldsets ) {
31 32
        
@@ -250,6 +251,9 @@  discard block
 block discarded – undo
250 251
          * Do the 'submit_...' actions.
251 252
          * 
252 253
          * @internal
254
+         * @param null|string $_sSubmitSectionID
255
+         * @param null|string $_sPressedFieldID
256
+         * @param null|string $_sPressedInputID
253 257
          * @return      void
254 258
          * @since       3.5.3
255 259
          * @since       3.6.3       Moved from `AdminPageFramework_Validation`.
@@ -296,6 +300,8 @@  discard block
 block discarded – undo
296 300
          * Do the 'submit_after_...' actions.
297 301
          * 
298 302
          * @internal
303
+         * @param null|string $_sSubmitSectionID
304
+         * @param null|string $_sPressedFieldID
299 305
          * @return      void
300 306
          * @since       3.5.3
301 307
          * @since       3.6.3       Moved from `AdminPageFramework_Validation`.
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         
139 139
         // Save the data.
140 140
         $_bUpdated = false;
141
-        if ( ! $this->oFactory->oProp->_bDisableSavingOptions ) {  
141
+        if ( ! $this->oFactory->oProp->_bDisableSavingOptions ) {
142 142
             $_bUpdated = $this->oFactory->oProp->updateOption( $_aInputs );
143 143
         }
144 144
 
@@ -181,14 +181,15 @@  discard block
 block discarded – undo
181 181
                     $_POST[ 'admin_page_framework_start' ], // indicates the framework form is started
182 182
                     $_POST[ '_wp_http_referer' ]
183 183
                 ) 
184
-            ) {     
184
+            ) {
185 185
                 return false;
186 186
             }
187 187
             
188 188
             // Referrer
189 189
             $_sRequestURI   = remove_query_arg( array( 'settings-updated', 'confirmation', 'field_errors' ), wp_unslash( $_SERVER[ 'REQUEST_URI' ] ) );
190 190
             $_sReffererURI  = remove_query_arg( array( 'settings-updated', 'confirmation', 'field_errors' ), $_POST[ '_wp_http_referer' ] );
191
-            if ( $_sRequestURI != $_sReffererURI ) { // see the function definition of wp_referer_field() in functions.php.
191
+            if ( $_sRequestURI != $_sReffererURI ) {
192
+// see the function definition of wp_referer_field() in functions.php.
192 193
                 return false;
193 194
             }
194 195
             
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function __construct( $oFactory, $aSavedData, $aArguments, $aSectionsets, $aFieldsets ) {
31 31
        
32
-        $this->oFactory         = $oFactory;        
32
+        $this->oFactory = $oFactory;        
33 33
                 
34 34
         // add_action
35 35
         // @deprecated      3.7.0
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */    
73 73
     public function _handleFormData() {
74 74
         
75
-        if ( ! $this->_shouldProceed() ) {
75
+        if ( !$this->_shouldProceed() ) {
76 76
             return;
77 77
         }
78 78
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         new AdminPageFramework_Model__FormSubmission__Validator( $this->oFactory );
128 128
         
129 129
         // [3.6.3+] Apply filters. All the sub-routines of handling form submit data use this filter hook.
130
-        $_aInputs    = $this->addAndApplyFilters(    
130
+        $_aInputs = $this->addAndApplyFilters(    
131 131
             $this->oFactory, 
132 132
             "validation_pre_{$this->oFactory->oProp->sClassName}", 
133 133
             $_aInputs,
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         // Save the data.
140 140
         $_bUpdated = false;
141
-        if ( ! $this->oFactory->oProp->_bDisableSavingOptions ) {  
141
+        if ( !$this->oFactory->oProp->_bDisableSavingOptions ) {  
142 142
             $_bUpdated = $this->oFactory->oProp->updateOption( $_aInputs );
143 143
         }
144 144
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         private function _shouldProceed() {
178 178
             
179 179
             if ( 
180
-                ! isset( 
180
+                !isset( 
181 181
                     $_POST[ 'admin_page_framework_start' ], // indicates the framework form is started
182 182
                     $_POST[ '_wp_http_referer' ]
183 183
                 ) 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             
195 195
             // Check if all the form fields are sent. 
196 196
             if (
197
-                ! isset(
197
+                !isset(
198 198
                     // these keys are supposed to be embedded at the end of the form.
199 199
                     // if the server truncates the form input values for `max_input_vars`, these will be lost in PHP 5.3.9 or above.
200 200
                     $_POST[ '_is_admin_page_framework' ], // holds the form nonce
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 return false;
215 215
             }
216 216
                         
217
-            $_sNonceTransientKey = 'form_' . md5( $this->oFactory->oProp->sClassName . get_current_user_id() );
217
+            $_sNonceTransientKey = 'form_'.md5( $this->oFactory->oProp->sClassName.get_current_user_id() );
218 218
             if ( $_POST[ '_is_admin_page_framework' ] !== $this->getTransient( $_sNonceTransientKey ) ) {
219 219
                 $this->oFactory->setAdminNotice( $this->oFactory->oMsg->get( 'nonce_verification_failed' ) );
220 220
                 return false;
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
          */
233 233
         private function _getUserInputsFromPOST() {
234 234
 
235
-            $_aInputs     = $this->getElementAsArray( 
235
+            $_aInputs = $this->getElementAsArray( 
236 236
                 $_POST, 
237 237
                 $this->oFactory->oProp->sOptionKey, 
238 238
                 array() 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
                 $this->oFactory,
268 268
                 array( 
269 269
                     // @todo deprecate the hook with the input ID
270
-                    "submit_{$this->oFactory->oProp->sClassName}_{$_sPressedInputID}",  // will be deprecated in near future release
270
+                    "submit_{$this->oFactory->oProp->sClassName}_{$_sPressedInputID}", // will be deprecated in near future release
271 271
                     $_sSubmitSectionID 
272 272
                         ? "submit_{$this->oFactory->oProp->sClassName}_{$_sSubmitSectionID}_{$_sPressedFieldID}" 
273 273
                         : "submit_{$this->oFactory->oProp->sClassName}_{$_sPressedFieldID}",
@@ -350,9 +350,9 @@  discard block
 block discarded – undo
350 350
             
351 351
             // Drop the 'field_errors' key.
352 352
             $_aRemoveQueries = array();
353
-            if ( ! isset( $aStatus[ 'field_errors' ] ) || ! $aStatus[ 'field_errors' ] ) {
353
+            if ( !isset( $aStatus[ 'field_errors' ] ) || !$aStatus[ 'field_errors' ] ) {
354 354
                 unset( $aStatus[ 'field_errors' ] );
355
-                $_aRemoveQueries[] = 'field_errors';
355
+                $_aRemoveQueries[ ] = 'field_errors';
356 356
             }        
357 357
          
358 358
             return $this->addAndApplyFilters(    // 3.4.4+
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
          */
378 378
         private function _removePageElements( $aOptions, $sPageSlug, $sTabSlug ) {
379 379
             
380
-            if ( ! $sPageSlug && ! $sTabSlug ) {
380
+            if ( !$sPageSlug && !$sTabSlug ) {
381 381
                 return $aOptions;
382 382
             }
383 383
             
Please login to merge, or discard this patch.
_model/delegate/AdminPageFramework_Model__FormSubmission_Base.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -79,6 +79,7 @@
 block discarded – undo
79 79
      * @since       3.5.3
80 80
      * @since       3.6.3       Moved from `AdminPageFramework_Form_Model_Validation_Option`.
81 81
      * @internal
82
+     * @param boolean $bIsInputEmtpy
82 83
      * @return      void
83 84
      * @remark      Accessed from some of the parent/child classes.
84 85
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,12 +46,12 @@
 block discarded – undo
46 46
      * @return      null|string     Returns `null` if no value is found and the associated link url if found. 
47 47
      * Otherwise, the found value.
48 48
      */ 
49
-    protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey='field_id' ) {    
49
+    protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey = 'field_id' ) {    
50 50
 
51
-        foreach( $aPostElements as $_sInputID => $_aSubElements ) {
51
+        foreach ( $aPostElements as $_sInputID => $_aSubElements ) {
52 52
             
53 53
             // The 'name' key must be set.
54
-            if ( ! isset( $_aSubElements[ 'name' ] ) ) {
54
+            if ( !isset( $_aSubElements[ 'name' ] ) ) {
55 55
                 continue;
56 56
             }
57 57
             $_aNameKeys = explode( '|', $_aSubElements[ 'name' ] ); 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @return      null|string     Returns `null` if no value is found and the associated link url if found. 
47 47
      * Otherwise, the found value.
48 48
      */ 
49
-    protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey='field_id' ) {    
49
+    protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey='field_id' ) {
50 50
 
51 51
         foreach( $aPostElements as $_sInputID => $_aSubElements ) {
52 52
             
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     protected function _setSettingNoticeAfterValidation( $bIsInputEmtpy ) {
86 86
      
87
-        if ( $this->oFactory->hasSettingNotice() ) {     
87
+        if ( $this->oFactory->hasSettingNotice() ) {
88 88
             return;
89 89
         }
90 90
         $this->oFactory->setSettingNotice(  
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Export.php 3 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -92,6 +92,7 @@  discard block
 block discarded – undo
92 92
              * 
93 93
              * @since       3.5.4
94 94
              * @since       3.6.3       Moved from `AdminPageFramework_Form_Model_Export`.
95
+             * @param string $sFileName
95 96
              * @return      array
96 97
              */
97 98
             private function _getExportHeaderArray( array $aArguments, $sFileName, $mData ) {
@@ -132,6 +133,7 @@  discard block
 block discarded – undo
132 133
              * @since       3.5.3
133 134
              * @since       3.6.3       Moved from `AdminPageFramework_Form_Model_Export`.
134 135
              * @internal   
136
+             * @param string $mData
135 137
              * @return      string      The export file name.
136 138
              */        
137 139
             private function _getExportFileName( array $aArguments, $sExportFileName, $mData ) {        
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
35 35
         
36
-        if ( ! $this->_shouldProceed() ) {
36
+        if ( !$this->_shouldProceed() ) {
37 37
             return;
38 38
         }        
39 39
         $this->_exportOptions(
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
          */
66 66
         protected function _exportOptions( $mData, $sPageSlug, $sTabSlug ) {
67 67
 
68
-            $_oExport           = new AdminPageFramework_ExportOptions( 
68
+            $_oExport = new AdminPageFramework_ExportOptions( 
69 69
                 $_POST[ '__export' ], 
70 70
                 $this->oFactory->oProp->sClassName 
71 71
             );
72
-            $_aArguments        = array(
72
+            $_aArguments = array(
73 73
                 'class_name'        => $this->oFactory->oProp->sClassName,
74 74
                 'page_slug'         => $sPageSlug,
75 75
                 'tab_slug'          => $sTabSlug,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     $sExportFileName, 
142 142
                     $aArguments[ 'pressed_field_id' ],
143 143
                     $aArguments[ 'pressed_input_id' ],
144
-                    $mData,     // 3.4.6+
144
+                    $mData, // 3.4.6+
145 145
                     $this->oFactory       // 3.4.6+
146 146
                 );    
147 147
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
              * @internal   
121 121
              * @return      string      the filtered export data.
122 122
              */
123
-            private function _getFilteredExportingData( array $aArguments, $mData ) {                   
123
+            private function _getFilteredExportingData( array $aArguments, $mData ) {
124 124
                 return $this->_getFilteredItemForPortByPrefix(
125 125
                     'export_',
126 126
                     $mData,    
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
              * @internal   
135 135
              * @return      string      The export file name.
136 136
              */        
137
-            private function _getExportFileName( array $aArguments, $sExportFileName, $mData ) {        
137
+            private function _getExportFileName( array $aArguments, $sExportFileName, $mData ) {
138 138
                 return $this->addAndApplyFilters(
139 139
                     $this->oFactory,
140 140
                     $this->_getPortFilterHookNames( 'export_name_', $aArguments ),
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
              * @internal   
153 153
              * @return      string      The export format type.
154 154
              */        
155
-            private function _getExportFormatType( array $aArguments, $sExportFileFormat ) {  
155
+            private function _getExportFormatType( array $aArguments, $sExportFileFormat ) {
156 156
                 return $this->_getFilteredItemForPortByPrefix(
157 157
                     'export_format_',
158 158
                     $sExportFileFormat,    
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Import.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -143,6 +143,7 @@  discard block
 block discarded – undo
143 143
                 /**
144 144
                  * Sets update admin notice.
145 145
                  * @since       3.5.3
146
+                 * @param boolean $bEmpty
146 147
                  * @return      void
147 148
                  */
148 149
                 private function _setImportAdminNotice( $bEmpty ) {
@@ -204,6 +205,8 @@  discard block
 block discarded – undo
204 205
                  * @since       3.5.3
205 206
                  * @since       3.6.3       Moved from `AdminPageFramework_Form_Model_Import`.
206 207
                  * @internal   
208
+                 * @param string $sFormatType
209
+                 * @param string $sImportOptionKey
207 210
                  * @return      string      The filtered import data.
208 211
                  */    
209 212
                 private function _getFilteredImportData( array $aArguments, $mData, $aStoredOptions, $sFormatType, $sImportOptionKey ) {
@@ -232,6 +235,7 @@  discard block
 block discarded – undo
232 235
      * @param       string      The filter prefix.
233 236
      * @param       mixed       The subject filtering value.
234 237
      * @param       array       An argument array holding submit information. Part of this will be passed to the filter callbacks but this itself does not mean is for the filter callbacks.
238
+     * @param string $sPrefix
235 239
      */
236 240
     protected function _getFilteredItemForPortByPrefix( $sPrefix, $mFilteringValue, array $aArguments ) {
237 241
         return $this->addAndApplyFilters(
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 // Check the uploaded file MIME type.
103 103
                 $_aMIMEType = $this->_getImportMIMEType( $_aArguments );
104 104
                 $_sType     = $_oImport->getType();
105
-                if ( ! in_array( $_sType, $_aMIMEType ) ) {        
105
+                if ( ! in_array( $_sType, $_aMIMEType ) ) {
106 106
                     $this->oFactory->setSettingNotice( sprintf( $this->oFactory->oMsg->get( 'uploaded_file_type_not_supported' ), $_sType ) );
107 107
                     return $aStoredOptions;        // do not change the framework's options.
108 108
                 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                  * @since       3.5.3
164 164
                  * @return      array       An array holding processable MIME types.       
165 165
                  */
166
-                private function _getImportMIMEType( array $aArguments ) {  
166
+                private function _getImportMIMEType( array $aArguments ) {
167 167
                     return $this->_getFilteredItemForPortByPrefix(
168 168
                         'import_mime_types_',
169 169
                         array( 'text/plain', 'application/octet-stream' ), // .json file is dealt as a binary file.
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @callback    action      try_validation_after_{class name}
33 33
      */
34 34
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
35
-        if ( ! $this->_shouldProceed() ) {
35
+        if ( !$this->_shouldProceed() ) {
36 36
             return;
37 37
         }
38 38
         $this->_doImportOptions(
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
                 // Check the uploaded file MIME type.
103 103
                 $_aMIMEType = $this->_getImportMIMEType( $_aArguments );
104 104
                 $_sType     = $_oImport->getType();
105
-                if ( ! in_array( $_sType, $_aMIMEType ) ) {        
105
+                if ( !in_array( $_sType, $_aMIMEType ) ) {        
106 106
                     $this->oFactory->setSettingNotice( sprintf( $this->oFactory->oMsg->get( 'uploaded_file_type_not_supported' ), $_sType ) );
107
-                    return $aStoredOptions;        // do not change the framework's options.
107
+                    return $aStoredOptions; // do not change the framework's options.
108 108
                 }
109 109
 
110 110
                 // Retrieve the importing data.
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
                         array( 
170 170
                             'text/plain', 
171 171
                             'application/octet-stream', // .json file is dealt as a binary file.
172
-                            'application/json',         // 3.7.0+ some servers cannot upload json files without this
173
-                            'text/html',                // 3.7.2+
174
-                            'application/txt',          // 3.7.2+
172
+                            'application/json', // 3.7.0+ some servers cannot upload json files without this
173
+                            'text/html', // 3.7.2+
174
+                            'application/txt', // 3.7.2+
175 175
                         ), 
176 176
                         $aArguments
177 177
                     ); 
@@ -260,18 +260,18 @@  discard block
 block discarded – undo
260 260
     protected function _getPortFilterHookNames( $sPrefix, array $aArguments ) {
261 261
         
262 262
         return array(
263
-            $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'pressed_input_id' ],
263
+            $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'pressed_input_id' ],
264 264
             $aArguments[ 'section_id' ] 
265
-                ? $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'section_id' ] .'_' . $aArguments[ 'pressed_field_id' ]
266
-                : $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'pressed_field_id' ],
265
+                ? $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'section_id' ].'_'.$aArguments[ 'pressed_field_id' ]
266
+                : $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'pressed_field_id' ],
267 267
             $aArguments[ 'section_id' ] 
268
-                ? $sPrefix . $aArguments[ 'class_name' ] . '_' . $aArguments[ 'section_id' ] 
268
+                ? $sPrefix.$aArguments[ 'class_name' ].'_'.$aArguments[ 'section_id' ] 
269 269
                 : null,
270 270
             $aArguments[ 'tab_slug' ] 
271
-                ? $sPrefix . $aArguments[ 'page_slug' ] . '_' . $aArguments[ 'tab_slug' ]
271
+                ? $sPrefix.$aArguments[ 'page_slug' ].'_'.$aArguments[ 'tab_slug' ]
272 272
                 : null,
273
-            $sPrefix . $aArguments[ 'page_slug' ],
274
-            $sPrefix . $aArguments[ 'class_name' ]
273
+            $sPrefix.$aArguments[ 'page_slug' ],
274
+            $sPrefix.$aArguments[ 'class_name' ]
275 275
         );            
276 276
         
277 277
     }        
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Redirect.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -66,6 +66,7 @@
 block discarded – undo
66 66
          * Sets the given URL's transient.
67 67
          * @since       unknown
68 68
          * @since       3.6.3       Moved from `AdminPageFramework_Validation`.
69
+         * @param string $sURL
69 70
          */
70 71
         private function _setRedirectTransients( $sURL, $sPageSlug ) {
71 72
             if ( empty( $sURL ) ) { 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
          * @since       3.6.3       Moved from `AdminPageFramework_Validation`.
69 69
          */
70 70
         private function _setRedirectTransients( $sURL, $sPageSlug ) {
71
-            if ( empty( $sURL ) ) { 
71
+            if ( empty( $sURL ) ) {
72 72
                 return; 
73 73
             }
74 74
             $_sTransient = 'apf_rurl' . md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$sPageSlug}" ) );
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $aSubmits, 
36 36
             'redirect_url' 
37 37
         );
38
-        if ( ! $_sRedirectURL ) {
38
+        if ( !$_sRedirectURL ) {
39 39
             return;
40 40
         }
41 41
         
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
             if ( empty( $sURL ) ) { 
72 72
                 return; 
73 73
             }
74
-            $_sTransient = 'apf_rurl' . md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$sPageSlug}" ) );
75
-            return $this->setTransient( $_sTransient, $sURL , 60*2 );
74
+            $_sTransient = 'apf_rurl'.md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$sPageSlug}" ) );
75
+            return $this->setTransient( $_sTransient, $sURL, 60 * 2 );
76 76
         }
77 77
  
78 78
 }
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Reset.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -60,6 +60,7 @@
 block discarded – undo
60 60
          * @since       3.6.3       Moved from `AdminPageFramework_Validation`.
61 61
          * @remark      `$aInputs` has only the page elements that called the validation callback. 
62 62
          * In other words, it does not hold other pages' option keys.
63
+         * @param string $sKeyToReset
63 64
          * @return      array       The modified input array.
64 65
          */
65 66
         private function _resetOptions( $sKeyToReset, array $aInputs, array $aSubmitInformation ) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
37 37
             
38
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
38
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
39 39
             return;
40 40
         }       
41 41
             
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             'reset_key' 
46 46
         );
47 47
         $_sKeyToReset = trim( $_sKeyToReset );
48
-        if ( ! $_sKeyToReset ) {
48
+        if ( !$_sKeyToReset ) {
49 49
             return;
50 50
         }            
51 51
         $_oException = new Exception( 'aReturn' );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
          * @return      boolean
63 63
          */
64 64
         protected function _shouldProceed( $oFactory, $aSubmits ) {
65
-            return ! $oFactory->hasFieldError();            
65
+            return !$oFactory->hasFieldError();            
66 66
         }
67 67
         
68 68
         /**
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
             $this->_doResetActions( $sKeyToReset, $aInputs, $aSubmitInformation );
81 81
             
82 82
             // As of 3.1.0, an empty value is accepted for the option key.
83
-            if ( ! $this->oFactory->oProp->sOptionKey ) {
83
+            if ( !$this->oFactory->oProp->sOptionKey ) {
84 84
                 return array();
85 85
             }
86 86
             
87 87
             // The key to delete is not specified, 1 is sent from the form input.
88
-            if ( in_array( $sKeyToReset, array( '1', ), true ) ) {
88
+            if ( in_array( $sKeyToReset, array( '1',), true ) ) {
89 89
                 delete_option( $this->oFactory->oProp->sOptionKey );
90 90
                 return array();
91 91
             }
Please login to merge, or discard this patch.