Test Failed
Branch dev (2230d2)
by Michael
38:39
created
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.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Reset.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory ) {
36 36
 
37
-        if ( ! $this->_shouldProceed( $oFactory, $aSubmits ) ) {
37
+        if ( !$this->_shouldProceed( $oFactory, $aSubmits ) ) {
38 38
             return;
39 39
         }
40 40
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             'reset_key'
45 45
         );
46 46
         $_sKeyToReset = trim( $_sKeyToReset );
47
-        if ( ! $_sKeyToReset ) {
47
+        if ( !$_sKeyToReset ) {
48 48
             return;
49 49
         }
50 50
         $_oException = new Exception( 'aReturn' );
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
          * @return      boolean
62 62
          */
63 63
         protected function _shouldProceed( $oFactory, $aSubmits ) {
64
-            return ! $oFactory->hasFieldError();
64
+            return !$oFactory->hasFieldError();
65 65
         }
66 66
 
67 67
         /**
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
             $this->_doResetActions( $sKeyToReset, $aInputs, $aSubmitInformation );
80 80
 
81 81
             // As of 3.1.0, an empty value is accepted for the option key.
82
-            if ( ! $this->oFactory->oProp->sOptionKey ) {
82
+            if ( !$this->oFactory->oProp->sOptionKey ) {
83 83
                 return array();
84 84
             }
85 85
 
86 86
             // The key to delete is not specified, 1 is sent from the form input.
87
-            if ( in_array( $sKeyToReset, array( '1', ), true ) ) {
87
+            if ( in_array( $sKeyToReset, array( '1',), true ) ) {
88 88
                 delete_option( $this->oFactory->oProp->sOptionKey );
89 89
                 return array();
90 90
             }
Please login to merge, or discard this patch.
validaor/AdminPageFramework_Model__FormSubmission__Validator__Redirect.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             $aSubmits,
35 35
             'redirect_url'
36 36
         );
37
-        if ( ! $_sRedirectURL ) {
37
+        if ( !$_sRedirectURL ) {
38 38
             return;
39 39
         }
40 40
 
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
             if ( empty( $sURL ) ) {
71 71
                 return;
72 72
             }
73
-            $_sTransient = 'apf_rurl' . md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$sPageSlug}" ) );
74
-            return $this->setTransient( $_sTransient, $sURL , 60*2 );
73
+            $_sTransient = 'apf_rurl'.md5( trim( "redirect_{$this->oFactory->oProp->sClassName}_{$sPageSlug}" ) );
74
+            return $this->setTransient( $_sTransient, $sURL, 60 * 2 );
75 75
         }
76 76
 
77 77
 }
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.