Test Setup Failed
Branch dev (5f92be)
by Michael
01:08
created
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.
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.
development/factory/admin_page/_model/AdminPageFramework_ImportOptions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 
57 57
     }
58 58
 
59
-    private function getElementInFilesArray( array $aFilesImport, $sInputID, $sElementKey='error' ) {
59
+    private function getElementInFilesArray( array $aFilesImport, $sInputID, $sElementKey = 'error' ) {
60 60
 
61 61
         $sElementKey = strtolower( $sElementKey );
62 62
         return $this->getElement(
63
-            $aFilesImport,  // subject array
63
+            $aFilesImport, // subject array
64 64
             array( $sElementKey, $sInputID ), // dimensional keys
65 65
             null    // default
66 66
         );
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         return $vData;
89 89
 
90 90
     }
91
-    public function formatImportData( &$vData, $sFormatType=null ) {
91
+    public function formatImportData( &$vData, $sFormatType = null ) {
92 92
 
93 93
         $sFormatType = isset( $sFormatType ) ? $sFormatType : $this->getFormatType();
94 94
         switch ( strtolower( $sFormatType ) ) {
Please login to merge, or discard this patch.