Test Failed
Branch dev (88dacc)
by Michael
02:09
created
admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
         // add_filter( 'wp_feed_cache_transient_lifetime', '__return_zero' );
34 34
 
35 35
         // Styles
36
-        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css' );
37
-        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/feed-list.css' );
36
+        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css' );
37
+        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/feed-list.css' );
38 38
 
39 39
         // $this->oFactory->setPageTitleVisibility( false );
40 40
         $this->oFactory->setInPageTabsVisibility( false );
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
     public function replyToDoTab() {
48 48
 
49 49
         $_oFeedList  = new AdminPageFrameworkLoader_FeedList( $this->sRSSURL );
50
-        $_aFeedItems = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_add_ons', $this->_getDemo() + $_oFeedList->get() );
50
+        $_aFeedItems = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_admin_add_ons', $this->_getDemo() + $_oFeedList->get() );
51 51
         if ( empty( $_aFeedItems ) ) {
52
-            echo "<p>" . __( 'No add-on could be found.', 'admin-page-framework-loader' ) . "</p>";
52
+            echo "<p>".__( 'No add-on could be found.', 'admin-page-framework-loader' )."</p>";
53 53
             return;
54 54
         }
55 55
 
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
         private function _getList( array $aFeedItems ) {
68 68
 
69 69
             $_aOutput       = array();
70
-            $_aColumnInfo   = array (    // this will be modified as the items get rendered
70
+            $_aColumnInfo   = array(    // this will be modified as the items get rendered
71 71
                 'bRowTagOpened'      => false,
72 72
                 'bRowTagClosed'      => false,
73 73
                 'iCurrRowPos'        => 0,
74 74
                 'iCurrColPos'        => 0,
75 75
             );
76
-            $_aColumnOption = array (
76
+            $_aColumnOption = array(
77 77
                 'iMaxCols'           => 3,
78 78
                 'sClassAttr'         => 'apfl_columns',
79 79
                 'sClassAttrGroup'    => 'apfl_columns_box',
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
                 'sClassAttrFirstCol' => 'apfl_columns_first_col',
83 83
             );
84 84
 
85
-            $_sSiteURLWOQuery   = preg_replace( '/\?.*/', '', get_bloginfo( 'url' ) );
86
-            foreach( $aFeedItems as $_aItem ) {
87
-                $_aOutput[] = $this->_getFeedListItem(
85
+            $_sSiteURLWOQuery = preg_replace( '/\?.*/', '', get_bloginfo( 'url' ) );
86
+            foreach ( $aFeedItems as $_aItem ) {
87
+                $_aOutput[ ] = $this->_getFeedListItem(
88 88
                     ( array ) $_aItem,
89 89
                     $_aColumnInfo,
90 90
                     $_aColumnOption,
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
             }
94 94
 
95 95
             // If the section (row) tag is not closed, close it.
96
-            if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) {
97
-                $_aOutput[] = '</div>';
96
+            if ( $_aColumnInfo[ 'bRowTagOpened' ] && !$_aColumnInfo[ 'bRowTagClosed' ] ) {
97
+                $_aOutput[ ] = '</div>';
98 98
             }
99 99
             $_aColumnInfo[ 'bRowTagClosed' ] = true;
100 100
 
101 101
             // Enclose the output in the group tag
102 102
             return '<div class="apfl_addon_list_container">'
103
-                    . '<div class="' . $_aColumnOption[ 'sClassAttr' ] . ' ' . $_aColumnOption[ 'sClassAttrGroup' ] . '">'
103
+                    . '<div class="'.$_aColumnOption[ 'sClassAttr' ].' '.$_aColumnOption[ 'sClassAttrGroup' ].'">'
104 104
                         . implode( '', $_aOutput )
105 105
                     . '</div>'
106 106
                 . '</div>';
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
              * Returns an HTML output from the given feed item array.
111 111
              * @return      string
112 112
              */
113
-            private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery='' ) {
113
+            private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery = '' ) {
114 114
 
115 115
                 // Initial checks
116
-                if ( ! isset( $aItem[ 'title' ] ) ) {
116
+                if ( !isset( $aItem[ 'title' ] ) ) {
117 117
                     return '';
118 118
                 }
119 119
 
@@ -139,20 +139,20 @@  discard block
 block discarded – undo
139 139
                 $_sTarget = '';
140 140
 
141 141
                 // Enclose the item buffer into the item container
142
-                $_sItem = '<div class="' . $aColumnOption['sClassAttrCol']
143
-                    . ' apfl_col_element_of_' . $aColumnOption['iMaxCols'] . ' '
142
+                $_sItem = '<div class="'.$aColumnOption[ 'sClassAttrCol' ]
143
+                    . ' apfl_col_element_of_'.$aColumnOption[ 'iMaxCols' ].' '
144 144
                     . ' apfl_extension '
145
-                    . ( ( 1 == $aColumnInfo['iCurrColPos'] ) ?  $aColumnOption['sClassAttrFirstCol']  : '' )
145
+                    . ( ( 1 == $aColumnInfo[ 'iCurrColPos' ] ) ? $aColumnOption[ 'sClassAttrFirstCol' ] : '' )
146 146
                     . '"'
147 147
                     . '>'
148 148
                         . '<div class="apfl_addon_item">'
149
-                            . "<h4 class='apfl_feed_item_title'>{$aItem['title']}</h4>"
149
+                            . "<h4 class='apfl_feed_item_title'>{$aItem[ 'title' ]}</h4>"
150 150
                             . "<div class='apfl_feed_item_description'>"
151
-                                . $aItem['description']
151
+                                . $aItem[ 'description' ]
152 152
                             . "</div>"
153 153
                             . "<div class='get-now apfl_feed_item_link_button'>"
154
-                                . "<a href='" . esc_url( $aItem[ 'link' ] ) . "' target='{$_sTarget}' rel='nofollow' class='button button-secondary'>"
155
-                                    . $aItem['label']
154
+                                . "<a href='".esc_url( $aItem[ 'link' ] )."' target='{$_sTarget}' rel='nofollow' class='button button-secondary'>"
155
+                                    . $aItem[ 'label' ]
156 156
                                 . "</a>"
157 157
                             . "</div>"
158 158
                         . '</div>'
@@ -160,18 +160,18 @@  discard block
 block discarded – undo
160 160
 
161 161
                 // If it's the first item in the row, add the class attribute.
162 162
                 // Be aware that at this point, the tag will be unclosed. Therefore, it must be closed later at some point.
163
-                if ( 1 == $aColumnInfo['iCurrColPos'] ) {
164
-                    $aColumnInfo['bRowTagOpened'] = true;
165
-                    $_sItem = '<div class="' . $aColumnOption['sClassAttrRow']  . '">'
163
+                if ( 1 == $aColumnInfo[ 'iCurrColPos' ] ) {
164
+                    $aColumnInfo[ 'bRowTagOpened' ] = true;
165
+                    $_sItem = '<div class="'.$aColumnOption[ 'sClassAttrRow' ].'">'
166 166
                         . $_sItem;
167 167
                 }
168 168
 
169 169
                 // If the current column position reached the set max column, increment the current position of row
170
-                if ( 0 === ( $aColumnInfo['iCurrColPos'] % $aColumnOption['iMaxCols'] ) ) {
171
-                    $aColumnInfo['iCurrRowPos']++;          // increment the row number
172
-                    $aColumnInfo['iCurrColPos'] = 0;        // reset the current column position
173
-                    $_sItem .= '</div>';  // close the section(row) div tag
174
-                    $aColumnInfo['bRowTagClosed'] = true;
170
+                if ( 0 === ( $aColumnInfo[ 'iCurrColPos' ] % $aColumnOption[ 'iMaxCols' ] ) ) {
171
+                    $aColumnInfo[ 'iCurrRowPos' ]++; // increment the row number
172
+                    $aColumnInfo[ 'iCurrColPos' ] = 0; // reset the current column position
173
+                    $_sItem .= '</div>'; // close the section(row) div tag
174
+                    $aColumnInfo[ 'bRowTagClosed' ] = true;
175 175
                 }
176 176
                 return $_sItem;
177 177
 
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
          */
184 184
         private function _getDemo() {
185 185
 
186
-            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] );
186
+            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] );
187 187
             $_bEnabled = $_oOption->get( 'enable_demo' );
188 188
 
189 189
             $_sTitle = __( 'Demo', 'admin=page-framework-loader' );
190 190
             return array(
191 191
                 $_sTitle => array(
192 192
                     'title'         => $_sTitle,
193
-                    'description'   => '<div style="text-align: center;" class="aligncenter"><img class="aligncenter" src="' . AdminPageFrameworkLoader_Registry::getPluginURL( '/asset/image/icon-128x128.png' ) . '" alt="' . esc_attr( $_sTitle ) . '"/></div>'
193
+                    'description'   => '<div style="text-align: center;" class="aligncenter"><img class="aligncenter" src="'.AdminPageFrameworkLoader_Registry::getPluginURL( '/asset/image/icon-128x128.png' ).'" alt="'.esc_attr( $_sTitle ).'"/></div>'
194 194
                         . '<p>'
195 195
                             . __( 'Showcases the features of Admin Page Framework.', 'admin-page-framework-loader' )
196 196
                         . '</p>',
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                                 ? 0
201 201
                                 : 1,
202 202
                         ) + $_GET,
203
-                        admin_url( $GLOBALS['pagenow'] )
203
+                        admin_url( $GLOBALS[ 'pagenow' ] )
204 204
                     ),
205 205
                     'label'         => $_bEnabled
206 206
                         ? "<span id='button-deactivate-demo' class='deactivate'>"
Please login to merge, or discard this patch.
AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function replyToDecideToLoad( /* $oScreen */ ) {
35 35
 
36
-        if ( ! $this->_isInThePage() ) {
36
+        if ( !$this->_isInThePage() ) {
37 37
             return;
38 38
         }
39 39
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         // Retrieve the development version.
46 46
         $this->_sDevelopmentVersion = $this->oUtil->getTransient(
47
-            AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX . 'devver'
47
+            AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX.'devver'
48 48
         );
49 49
 
50 50
         // Disable the meta box if the development version is not above the running one.
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          */
64 64
         private function _scheduleEvent() {
65 65
 
66
-            $_sActionName = AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_action_get_development_version';
66
+            $_sActionName = AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_action_get_development_version';
67 67
             $_aArguments  = array();
68 68
             if ( wp_next_scheduled( $_sActionName, $_aArguments ) ) {
69 69
                 return false;
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 )
98 98
             . "</p>"
99 99
             . "<div style='width:100%; display:inline-block;'>"
100
-                . '<a href="' . esc_url( 'https://github.com/michaeluno/admin-page-framework/archive/dev.zip' ). '">'
100
+                . '<a href="'.esc_url( 'https://github.com/michaeluno/admin-page-framework/archive/dev.zip' ).'">'
101 101
                     . "<div class='button button-primary float-right'>"
102 102
                         . __( 'Download', 'admin-page-framework-loader' )
103 103
                     . "</div>"
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             . "</div>"
106 106
             ;
107 107
 
108
-        return $_sInsert . $sContent;
108
+        return $_sInsert.$sContent;
109 109
 
110 110
     }
111 111
 
Please login to merge, or discard this patch.
factory/taxonomy_field/form/AdminPageFramework_Form_taxonomy_field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             '' // default value
40 40
         );
41 41
 
42
-        if ( ! $this->canUserView( $this->sCapability ) ) {
42
+        if ( !$this->canUserView( $this->sCapability ) ) {
43 43
             return '';
44 44
         }
45 45
 
Please login to merge, or discard this patch.
include/class/utility/AdminPageFrameworkLoader_FeedList.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return      array
49 49
      */
50
-    public function get( $iItems=0 ) {
50
+    public function get( $iItems = 0 ) {
51 51
 
52 52
         $_aOutput   = array();
53 53
         $_aURLs     = $this->_aURLs;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             return $_aOutput;
57 57
         }
58 58
 
59
-        $_oFeed     = fetch_feed( $_aURLs );
59
+        $_oFeed = fetch_feed( $_aURLs );
60 60
         if ( is_wp_error( $_oFeed ) ) {
61 61
             return $_aOutput;
62 62
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 'title'          => $_oItem->get_title(),
68 68
                 'date'           => $_oItem->get_date( 'j F Y, g:i a' ),
69 69
                 'author'         => $_oItem->get_author(),
70
-                'link'           => $_oItem->get_permalink(),    // get_link() may be used as well
70
+                'link'           => $_oItem->get_permalink(), // get_link() may be used as well
71 71
             );
72 72
         }
73 73
 
Please login to merge, or discard this patch.
factory/_common/utility/base_utility/AdminPageFramework_Utility_Path.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     static public function getRelativePath( $from, $to ) {
29 29
 
30 30
         // some compatibility fixes for Windows paths
31
-        $from = is_dir( $from ) ? rtrim( $from, '\/') . '/' : $from;
32
-        $to   = is_dir( $to )   ? rtrim( $to, '\/') . '/'   : $to;
31
+        $from = is_dir( $from ) ? rtrim( $from, '\/' ).'/' : $from;
32
+        $to   = is_dir( $to ) ? rtrim( $to, '\/' ).'/' : $to;
33 33
         $from = str_replace( '\\', '/', $from );
34 34
         $to   = str_replace( '\\', '/', $to );
35 35
 
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
         $to       = explode( '/', $to );
38 38
         $relPath  = $to;
39 39
 
40
-        foreach( $from as $depth => $dir ) {
40
+        foreach ( $from as $depth => $dir ) {
41 41
             // find first non-matching dir
42
-            if( $dir === $to[ $depth ] ) {
42
+            if ( $dir === $to[ $depth ] ) {
43 43
                 // ignore this directory
44 44
                 array_shift( $relPath );
45 45
             } else {
46 46
                 // get number of remaining dirs to $from
47 47
                 $remaining = count( $from ) - $depth;
48
-                if( $remaining > 1 ) {
48
+                if ( $remaining > 1 ) {
49 49
                     // add traversals up to first matching dir
50 50
                     $padLength = ( count( $relPath ) + $remaining - 1 ) * -1;
51 51
                     $relPath = array_pad( $relPath, $padLength, '..' );
52 52
                     break;
53 53
                 } else {
54
-                    $relPath[ 0 ] = './' . $relPath[ 0 ];
54
+                    $relPath[ 0 ] = './'.$relPath[ 0 ];
55 55
                 }
56 56
             }
57 57
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             'debug_backtrace',
76 76
             self::_getDebugBacktraceArguments()
77 77
         );
78
-        foreach( $_aBackTrace as $_aDebugInfo )  {
78
+        foreach ( $_aBackTrace as $_aDebugInfo ) {
79 79
             $_aDebugInfo      = self::getAsArray( $_aDebugInfo ) + array( 'file' => '' ); // prevents an undefined index
80 80
             $_sCallerFilePath = $_aDebugInfo[ 'file' ];
81 81
             if ( in_array( $_sCallerFilePath, $_aRedirectedFilePaths ) ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
             'debug_backtrace',
76 76
             self::_getDebugBacktraceArguments()
77 77
         );
78
-        foreach( $_aBackTrace as $_aDebugInfo )  {
78
+        foreach( $_aBackTrace as $_aDebugInfo ) {
79 79
             $_aDebugInfo      = self::getAsArray( $_aDebugInfo ) + array( 'file' => '' ); // prevents an undefined index
80 80
             $_sCallerFilePath = $_aDebugInfo[ 'file' ];
81 81
             if ( in_array( $_sCallerFilePath, $_aRedirectedFilePaths ) ) {
Please login to merge, or discard this patch.
factory/admin_page/_view/AdminPageFramework_View__PageRenderer.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         // Do actions before rendering the page. In this order, global -> page -> in-page tab
49 49
         $this->addAndDoActions(
50
-            $this->oFactory,  // the caller object
50
+            $this->oFactory, // the caller object
51 51
             $this->getFilterArrayByPrefix( 'do_before_', $this->oFactory->oProp->sClassName, $_sPageSlug, $_sTabSlug, true ), // the action hooks
52 52
             $this->oFactory   // the argument 1
53 53
         );
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                     </div><!-- #post-body -->
73 73
                 </div><!-- #poststuff -->
74 74
 
75
-            <?php echo $this->_printFormClosingTag( $_sPageSlug, $_sTabSlug, $this->oFactory->oProp->bEnableForm );  // </form> ?>
75
+            <?php echo $this->_printFormClosingTag( $_sPageSlug, $_sTabSlug, $this->oFactory->oProp->bEnableForm ); // </form> ?>
76 76
             </div><!-- .admin-page-framework-container -->
77 77
 
78 78
             <?php
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         <?php
84 84
         // Do actions after rendering the page.
85 85
         $this->addAndDoActions(
86
-            $this->oFactory,  // the caller object
86
+            $this->oFactory, // the caller object
87 87
             $this->getFilterArrayByPrefix( 'do_after_', $this->oFactory->oProp->sClassName, $_sPageSlug, $_sTabSlug, true ), // the action hooks
88 88
             $this->oFactory   // the argument 1
89 89
         );
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
          */
101 101
         private function _getNumberOfColumns() {
102 102
 
103
-            if ( ! $this->doesMetaBoxExist( 'side' ) ) {
103
+            if ( !$this->doesMetaBoxExist( 'side' ) ) {
104 104
                 return 1;
105 105
             }
106 106
 
107 107
             $_iColumns = $this->getNumberOfScreenColumns();
108 108
             return $_iColumns
109 109
                 ? $_iColumns
110
-                : 1;    // default - this is because generic pages do not have meta boxes.
110
+                : 1; // default - this is because generic pages do not have meta boxes.
111 111
         }
112 112
             // @deprecated
113 113
             // Make sure if no side meta box exists, set it 1.
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         private function _getContentTop() {
127 127
 
128 128
             // Screen icon, page heading tabs(page title), and in-page tabs.
129
-            $_oScreenIcon       = new AdminPageFramework_View__PageRenderer__ScreenIcon(
129
+            $_oScreenIcon = new AdminPageFramework_View__PageRenderer__ScreenIcon(
130 130
                 $this->oFactory,
131 131
                 $this->sPageSlug,
132 132
                 $this->sTabSlug
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 $this->oFactory,
143 143
                 $this->sPageSlug
144 144
             );
145
-            $_sContentTop      .= $_oInPageTabs->get();
145
+            $_sContentTop .= $_oInPageTabs->get();
146 146
 
147 147
             // Apply filters in this order, in-page tab -> page -> global.
148 148
             return $this->addAndApplyFilters(
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
              */
215 215
             private function _getFormOutput( $sPageSlug ) {
216 216
 
217
-                if ( ! $this->oFactory->oProp->bEnableForm ) {
217
+                if ( !$this->oFactory->oProp->bEnableForm ) {
218 218
                     return '';
219 219
                 }
220 220
                 return $this->oFactory->oForm->get();
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
          * @internal
245 245
          * @return      void
246 246
          */
247
-        private function _printFormOpeningTag( $fEnableForm=true ) {
247
+        private function _printFormOpeningTag( $fEnableForm = true ) {
248 248
 
249
-            if ( ! $fEnableForm ) {
249
+            if ( !$fEnableForm ) {
250 250
                 return;
251 251
             }
252 252
 
@@ -259,12 +259,12 @@  discard block
 block discarded – undo
259 259
                             'action'    => wp_unslash( remove_query_arg( 'settings-updated', $this->oFactory->oProp->sTargetFormPage ) ),
260 260
                         )
261 261
                     )
262
-                . " >" . PHP_EOL;
262
+                . " >".PHP_EOL;
263 263
 
264 264
             // [3.5.11+] Insert a mark that indicates the framework form has started.
265 265
             // This will be checked in the validation method with the `is_admin_page_framework` input value which gets inserted at the end of the form
266 266
             // in order to determine all the fields are sent for the PHP max_input_vars limitation set in the server configuration.
267
-            echo "<input type='hidden' name='admin_page_framework_start' value='1' />" . PHP_EOL;
267
+            echo "<input type='hidden' name='admin_page_framework_start' value='1' />".PHP_EOL;
268 268
 
269 269
             // Embed the '_wp_http_referer' hidden field that is checked in the submit data processing method.
270 270
             settings_fields( $this->oFactory->oProp->sOptionKey );
@@ -280,16 +280,16 @@  discard block
 block discarded – undo
280 280
          * @internal
281 281
          * @return      void
282 282
          */
283
-        private function _printFormClosingTag( $sPageSlug, $sTabSlug, $fEnableForm=true ) {
283
+        private function _printFormClosingTag( $sPageSlug, $sTabSlug, $fEnableForm = true ) {
284 284
 
285
-            if ( ! $fEnableForm ) {
285
+            if ( !$fEnableForm ) {
286 286
                 return;
287 287
             }
288
-            $_sNonce = wp_create_nonce( 'form_' . md5( $this->oFactory->oProp->sClassName . get_current_user_id() ) );
289
-            echo "<input type='hidden' name='page_slug' value='{$sPageSlug}' />" . PHP_EOL
290
-                . "<input type='hidden' name='tab_slug' value='{$sTabSlug}' />" . PHP_EOL
291
-                . "<input type='hidden' name='_is_admin_page_framework' value='{$_sNonce}' />" . PHP_EOL
292
-                . "</form><!-- End Form -->" . PHP_EOL;
288
+            $_sNonce = wp_create_nonce( 'form_'.md5( $this->oFactory->oProp->sClassName.get_current_user_id() ) );
289
+            echo "<input type='hidden' name='page_slug' value='{$sPageSlug}' />".PHP_EOL
290
+                . "<input type='hidden' name='tab_slug' value='{$sTabSlug}' />".PHP_EOL
291
+                . "<input type='hidden' name='_is_admin_page_framework' value='{$_sNonce}' />".PHP_EOL
292
+                . "</form><!-- End Form -->".PHP_EOL;
293 293
 
294 294
         }
295 295
 
Please login to merge, or discard this patch.
development/factory/admin_page/_view/AdminPageFramework_View__Resource.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
                  */
68 68
                 public function _appendInternalAssets( $sInternal, &$aContainer ) {
69 69
                     $_aInternals = array_unique( $aContainer );
70
-                    $sInternal   = PHP_EOL . $sInternal;
71
-                    foreach( $_aInternals as $_iIndex => $_sInternal ) {
72
-                        $sInternal .= $_sInternal . PHP_EOL;
70
+                    $sInternal   = PHP_EOL.$sInternal;
71
+                    foreach ( $_aInternals as $_iIndex => $_sInternal ) {
72
+                        $sInternal .= $_sInternal.PHP_EOL;
73 73
                         unset( $_aInternals[ $_iIndex ] );
74 74
                     }
75 75
                     $aContainer = $_aInternals; // update the container array.
@@ -83,23 +83,23 @@  discard block
 block discarded – undo
83 83
         private function _parseAssets( $oFactory ) {
84 84
 
85 85
             // page
86
-            $_aPageStyles      = $this->getElementAsArray(
86
+            $_aPageStyles = $this->getElementAsArray(
87 87
                 $oFactory->oProp->aPages,
88 88
                 array( $this->sCurrentPageSlug, 'style' )
89 89
             );
90 90
             $this->_enqueuePageAssets( $_aPageStyles, 'style' );
91 91
 
92
-            $_aPageScripts     = $this->getElementAsArray(
92
+            $_aPageScripts = $this->getElementAsArray(
93 93
                 $oFactory->oProp->aPages,
94 94
                 array( $this->sCurrentPageSlug, 'script' )
95 95
             );
96 96
             $this->_enqueuePageAssets( $_aPageScripts, 'script' );
97 97
 
98 98
             // In-page tabs
99
-            if ( ! $this->sCurrentTabSlug ) {
99
+            if ( !$this->sCurrentTabSlug ) {
100 100
                 return;
101 101
             }
102
-            $_aInPageTabStyles  = $this->getElementAsArray(
102
+            $_aInPageTabStyles = $this->getElementAsArray(
103 103
                 $oFactory->oProp->aInPageTabs,
104 104
                 array( $this->sCurrentPageSlug, $this->sCurrentTabSlug, 'style' )
105 105
             );
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
              * @since       3.6.3
117 117
              * @return      void
118 118
              */
119
-            private function _enqueuePageAssets( array $aPageAssets, $sType='style' ) {
120
-                $_sMethodName = "_enqueueAsset_" . $sType;
121
-                foreach( $aPageAssets as $_asPageAsset ) {
122
-                    $this->{$_sMethodName}( $_asPageAsset);
119
+            private function _enqueuePageAssets( array $aPageAssets, $sType = 'style' ) {
120
+                $_sMethodName = "_enqueueAsset_".$sType;
121
+                foreach ( $aPageAssets as $_asPageAsset ) {
122
+                    $this->{$_sMethodName}( $_asPageAsset );
123 123
                 }
124 124
             }
125 125
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     }
145 145
 
146 146
                     // Insert the CSS rule in the head tag.
147
-                    $this->aCSSRules[] = $_sSRC;
147
+                    $this->aCSSRules[ ] = $_sSRC;
148 148
 
149 149
                 }
150 150
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                     }
170 170
 
171 171
                     // Insert the scripts in the head tag.
172
-                    $this->aScripts[] = $_sSRC;
172
+                    $this->aScripts[ ] = $_sSRC;
173 173
 
174 174
                 }
175 175
 
Please login to merge, or discard this patch.
factory/_common/_abstract/_controller/AdminPageFramework_Resource_Base.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
     /*
163 163
      * Shared methods
164 164
      */
165
-    	/**
165
+        /**
166 166
          * Checks the src url of the enqueued script/style to determine whether or not to set up a attribute modification callback.
167 167
          *
168 168
          * If it is one of the framework added item, the method sets up a hook to modify the url to add custom attributes.
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -352,7 +352,8 @@  discard block
 block discarded – undo
352 352
             static $_iCallCount = 0;
353 353
 
354 354
             $_sFilterName = "style_{$this->oProp->sClassName}";
355
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
355
+            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) {
356
+// 3.8.22
356 357
                 return '';
357 358
             }
358 359
             $_sStyle = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyle );
@@ -379,7 +380,8 @@  discard block
 block discarded – undo
379 380
             static $_iCallCountIE = 1;
380 381
 
381 382
             $_sFilterName = "style_ie_{$this->oProp->sClassName}";
382
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
383
+            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) {
384
+// 3.8.22
383 385
                 return '';
384 386
             }
385 387
             $_sStyleIE = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyleIE );
@@ -407,7 +409,8 @@  discard block
 block discarded – undo
407 409
 
408 410
         static $_iCallCount = 1;
409 411
         $_sFilterName = "script_{$this->oProp->sClassName}";
410
-        if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
412
+        if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) {
413
+// 3.8.22
411 414
             return '';
412 415
         }
413 416
         $_sScript = $this->addAndApplyFilters( $this->oProp->oCaller, $_sFilterName, $this->oProp->sScript );
Please login to merge, or discard this patch.
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -37,30 +37,30 @@  discard block
 block discarded – undo
37 37
         /* The system internal keys. */
38 38
         'sSRC'              => null,
39 39
         'sSRCRaw'           => null,
40
-        'aPostTypes'        => array(),     // for meta box class
40
+        'aPostTypes'        => array(), // for meta box class
41 41
         'sPageSlug'         => null,
42 42
         'sTabSlug'          => null,
43
-        'sType'             => null,        // script or style
43
+        'sType'             => null, // script or style
44 44
 
45 45
         /* The below keys are for users. */
46 46
         'handle_id'         => null,
47 47
         'dependencies'      => array(),
48
-        'version'           => false,       // although the type should be string, the wp_enqueue_...() functions want false as the default value.
49
-        'attributes'        => array(),     // [3.3.0+] - the attribute array @deprecated 3.9.0
50
-        'conditional'       => null,        // [3.9.0+] Comments for IE 6, lte IE 7 etc. @see wp_style_add_data() and wp_script_add_data()
48
+        'version'           => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value.
49
+        'attributes'        => array(), // [3.3.0+] - the attribute array @deprecated 3.9.0
50
+        'conditional'       => null, // [3.9.0+] Comments for IE 6, lte IE 7 etc. @see wp_style_add_data() and wp_script_add_data()
51 51
 
52 52
         // script specific
53
-        'translation'       => array(),     // only for scripts
54
-        'translation_var'   => '',          // [3.9.0+] the object name of the passed translation data to JavaScript script
55
-        'in_footer'         => false,       // only for scripts
53
+        'translation'       => array(), // only for scripts
54
+        'translation_var'   => '', // [3.9.0+] the object name of the passed translation data to JavaScript script
55
+        'in_footer'         => false, // only for scripts
56 56
 
57 57
         // style specific
58
-        'media'             => 'all',       // only for styles
58
+        'media'             => 'all', // only for styles
59 59
         /// [3.9.0+] @see wp_style_add_data()
60
-        'rtl'               => null,        // bool|string To declare an RTL stylesheet.
61
-        'suffix'            => null,        // string      Optional suffix, used in combination with RTL.
62
-        'alt'               => null,        // bool        For rel="alternate stylesheet".
63
-        'title'             => null,        // string      For preferred/alternate stylesheets.
60
+        'rtl'               => null, // bool|string To declare an RTL stylesheet.
61
+        'suffix'            => null, // string      Optional suffix, used in combination with RTL.
62
+        'alt'               => null, // bool        For rel="alternate stylesheet".
63
+        'title'             => null, // string      For preferred/alternate stylesheets.
64 64
     );
65 65
 
66 66
     /**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @remark      This value should be overridden in an extended class.
71 71
      * @internal
72 72
      */
73
-    protected $_sClassSelector_Style    = 'admin-page-framework-style';
73
+    protected $_sClassSelector_Style = 'admin-page-framework-style';
74 74
 
75 75
     /**
76 76
      * Stores the class selector used to the class-specific script.
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      * @remark      This value should be overridden in an extended class.
80 80
      * @internal
81 81
      */
82
-    protected $_sClassSelector_Script   = 'admin-page-framework-script';
82
+    protected $_sClassSelector_Script = 'admin-page-framework-script';
83 83
 
84 84
     /**
85 85
      * Stores hand IDs by resource url to look up handle id and add custom arguments.
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
          */
131 131
         public function _replyToSetUpHooks() {
132 132
 
133
-            if ( ! $this->oProp->oCaller->isInThePage() ) {
133
+            if ( !$this->oProp->oCaller->isInThePage() ) {
134 134
                 return;
135 135
             }
136 136
 
137 137
             // Hook the admin header to insert custom admin stylesheets and scripts.
138 138
             add_action( 'admin_enqueue_scripts', array( $this, '_replyToEnqueueCommonScripts' ), 1 );
139
-            add_action( 'admin_enqueue_scripts', array( $this, '_replyToEnqueueCommonStyles' ), 1  );
139
+            add_action( 'admin_enqueue_scripts', array( $this, '_replyToEnqueueCommonStyles' ), 1 );
140 140
 
141 141
             add_action( 'admin_enqueue_scripts', array( $this, '_replyToEnqueueScripts' ) );
142 142
             add_action( 'admin_enqueue_scripts', array( $this, '_replyToEnqueueStyles' ) );
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
                         return $sSanitizedURL;
234 234
                     }
235 235
 
236
-                    $_sAttributes   = $this->getAttributes( $_aAttributes );
237
-                    return $sSanitizedURL . "' " . rtrim( $_sAttributes, "'\"" );
236
+                    $_sAttributes = $this->getAttributes( $_aAttributes );
237
+                    return $sSanitizedURL."' ".rtrim( $_sAttributes, "'\"" );
238 238
 
239 239
                 }
240 240
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      */
255 255
     protected function _printCommonStyles( $sIDPrefix, $sClassName ) {
256 256
 
257
-        if ( $this->hasBeenCalled( 'COMMON_STYLES: ' . get_class( $this ) . '::' . __METHOD__ ) ) {
257
+        if ( $this->hasBeenCalled( 'COMMON_STYLES: '.get_class( $this ).'::'.__METHOD__ ) ) {
258 258
             return;
259 259
         }
260 260
         $_oCaller = $this->oProp->oCaller;
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
          */
271 271
         private function ___getCommonStyleTag( $oCaller, $sIDPrefix ) {
272 272
 
273
-            $_sStyle     = $this->addAndApplyFilters(
273
+            $_sStyle = $this->addAndApplyFilters(
274 274
                 $oCaller,
275 275
                 array(
276
-                    "style_common_admin_page_framework",            // 3.2.1+
276
+                    "style_common_admin_page_framework", // 3.2.1+
277 277
                     "style_common_{$this->oProp->sClassName}",
278 278
                 ),
279 279
                 '' // AdminPageFramework_CSS::getDefaultCSS() @deprecated 3.9.0 No longer uses internal stylesheets
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             $_sStyle     = $this->isDebugMode() ? $_sStyle : $this->getCSSMinified( $_sStyle );
282 282
             $_sStyle     = trim( $_sStyle );
283 283
             if ( $_sStyle ) {
284
-                return "<style type='text/css' id='" . esc_attr( strtolower( $sIDPrefix ) ) . "'>"
284
+                return "<style type='text/css' id='".esc_attr( strtolower( $sIDPrefix ) )."'>"
285 285
                         . $_sStyle
286 286
                     . "</style>";
287 287
             }
@@ -296,10 +296,10 @@  discard block
 block discarded – undo
296 296
          */
297 297
         private function ___getCommonIEStyleTag( $oCaller, $sIDPrefix ) {
298 298
 
299
-            $_sStyleIE   = $this->addAndApplyFilters(
299
+            $_sStyleIE = $this->addAndApplyFilters(
300 300
                 $oCaller,
301 301
                 array(
302
-                    "style_ie_common_admin_page_framework",         // 3.2.1+
302
+                    "style_ie_common_admin_page_framework", // 3.2.1+
303 303
                     "style_ie_common_{$this->oProp->sClassName}",
304 304
                 ),
305 305
                 AdminPageFramework_CSS::getDefaultCSSIE()
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             $_sStyleIE  = $this->isDebugMode() ? $_sStyleIE : $this->getCSSMinified( $_sStyleIE );
308 308
             $_sStyleIE  = trim( $_sStyleIE );
309 309
             return $_sStyleIE
310
-                ? "<!--[if IE]><style type='text/css' id='" . esc_attr( strtolower( $sIDPrefix . "-ie" ) ) . "'>"
310
+                ? "<!--[if IE]><style type='text/css' id='".esc_attr( strtolower( $sIDPrefix."-ie" ) )."'>"
311 311
                         . $_sStyleIE
312 312
                     . "</style><![endif]-->"
313 313
                 : '';
@@ -326,23 +326,23 @@  discard block
 block discarded – undo
326 326
      */
327 327
     protected function _printCommonScripts( $sIDPrefix, $sClassName ) {
328 328
 
329
-        if ( $this->hasBeenCalled( 'COMMON_SCRIPT: ' . get_class( $this ) . '::' . __METHOD__ ) ) {
329
+        if ( $this->hasBeenCalled( 'COMMON_SCRIPT: '.get_class( $this ).'::'.__METHOD__ ) ) {
330 330
             return;
331 331
         }
332 332
 
333 333
         $_sScript = $this->addAndApplyFilters(
334 334
             $this->oProp->oCaller,
335 335
             array(
336
-                "script_common_admin_page_framework",       // 3.2.1+
336
+                "script_common_admin_page_framework", // 3.2.1+
337 337
                 "script_common_{$this->oProp->sClassName}",
338 338
             ),
339 339
             AdminPageFramework_Property_Base::$_sDefaultScript
340 340
         );
341 341
         $_sScript = trim( $_sScript );
342
-        if ( ! $_sScript ) {
342
+        if ( !$_sScript ) {
343 343
             return;
344 344
         }
345
-        echo "<script type='text/javascript' id='" . esc_attr( strtolower( $sIDPrefix ) ) . "'>"
345
+        echo "<script type='text/javascript' id='".esc_attr( strtolower( $sIDPrefix ) )."'>"
346 346
                 . '/* <![CDATA[ */'
347 347
                 . $_sScript
348 348
                 . '/* ]]> */'
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
      */
361 361
     protected function _printClassSpecificStyles( $sIDPrefix ) {
362 362
 
363
-        $_oCaller   = $this->oProp->oCaller;
363
+        $_oCaller = $this->oProp->oCaller;
364 364
         echo $this->_getClassSpecificStyleTag( $_oCaller, $sIDPrefix );
365 365
         echo $this->_getClassSpecificIEStyleTag( $_oCaller, $sIDPrefix );
366 366
 
@@ -381,18 +381,18 @@  discard block
 block discarded – undo
381 381
             static $_iCallCount = 0;
382 382
 
383 383
             $_sFilterName = "style_{$this->oProp->sClassName}";
384
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
384
+            if ( $this->hasBeenCalled( 'FILTER: '.$_sFilterName ) ) { // 3.8.22
385 385
                 return '';
386 386
             }
387 387
             $_sStyle = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyle );
388 388
             $_sStyle = $this->isDebugMode() ? $_sStyle : $this->getCSSMinified( $_sStyle );
389 389
             $_sStyle = trim( $_sStyle );
390
-            if ( ! $_sStyle ) {
390
+            if ( !$_sStyle ) {
391 391
                 return '';
392 392
             }
393 393
             $_iCallCount++;
394
-            $_sID = strtolower( "{$sIDPrefix}-" . $this->oProp->sClassName . "_{$_iCallCount}" );
395
-            return "<style type='text/css' id='" . esc_attr( $_sID ) . "'>"
394
+            $_sID = strtolower( "{$sIDPrefix}-".$this->oProp->sClassName."_{$_iCallCount}" );
395
+            return "<style type='text/css' id='".esc_attr( $_sID )."'>"
396 396
                     . $_sStyle
397 397
                 . "</style>";
398 398
 
@@ -408,18 +408,18 @@  discard block
 block discarded – undo
408 408
             static $_iCallCountIE = 1;
409 409
 
410 410
             $_sFilterName = "style_ie_{$this->oProp->sClassName}";
411
-            if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
411
+            if ( $this->hasBeenCalled( 'FILTER: '.$_sFilterName ) ) { // 3.8.22
412 412
                 return '';
413 413
             }
414 414
             $_sStyleIE = $this->addAndApplyFilters( $_oCaller, $_sFilterName, $this->oProp->sStyleIE );
415 415
             $_sStyleIE = $this->isDebugMode() ? $_sStyleIE : $this->getCSSMinified( $_sStyleIE );
416 416
             $_sStyleIE = trim( $_sStyleIE );
417
-            if ( ! $_sStyleIE ) {
417
+            if ( !$_sStyleIE ) {
418 418
                 return '';
419 419
             }
420 420
             $_iCallCountIE++;
421
-            $_sID  = strtolower( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" );
422
-            return "<!--[if IE]><style type='text/css' id='" . esc_attr( $_sID ) . "'>"
421
+            $_sID = strtolower( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" );
422
+            return "<!--[if IE]><style type='text/css' id='".esc_attr( $_sID )."'>"
423 423
                     . $_sStyleIE
424 424
                 . "</style><![endif]-->";
425 425
 
@@ -436,18 +436,18 @@  discard block
 block discarded – undo
436 436
 
437 437
         static $_iCallCount = 1;
438 438
         $_sFilterName = "script_{$this->oProp->sClassName}";
439
-        if ( $this->hasBeenCalled( 'FILTER: ' . $_sFilterName ) ) { // 3.8.22
439
+        if ( $this->hasBeenCalled( 'FILTER: '.$_sFilterName ) ) { // 3.8.22
440 440
             return '';
441 441
         }
442 442
         $_sScript = $this->addAndApplyFilters( $this->oProp->oCaller, $_sFilterName, $this->oProp->sScript );
443 443
         $_sScript = trim( $_sScript );
444
-        if ( ! $_sScript ) {
444
+        if ( !$_sScript ) {
445 445
             return '';
446 446
         }
447 447
 
448 448
         $_iCallCount++;
449 449
         $_sID = strtolower( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" );
450
-        echo "<script type='text/javascript' id='" . esc_attr( $_sID ) . "'>"
450
+        echo "<script type='text/javascript' id='".esc_attr( $_sID )."'>"
451 451
                 . '/* <![CDATA[ */'
452 452
                 . $_sScript
453 453
                 . '/* ]]> */'
@@ -470,12 +470,12 @@  discard block
 block discarded – undo
470 470
     public function _replyToAddStyle() {
471 471
 
472 472
         $_oCaller = $this->oProp->oCaller;
473
-        if ( ! $_oCaller->isInThePage() ) {
473
+        if ( !$_oCaller->isInThePage() ) {
474 474
             return;
475 475
         }
476 476
 
477 477
         $this->_printCommonStyles( 'admin-page-framework-style-common', get_class() );
478
-        $this->_printClassSpecificStyles( $this->_sClassSelector_Style . '-' . $this->oProp->sStructureType );
478
+        $this->_printClassSpecificStyles( $this->_sClassSelector_Style.'-'.$this->oProp->sStructureType );
479 479
 
480 480
     }
481 481
     /**
@@ -490,12 +490,12 @@  discard block
 block discarded – undo
490 490
     public function _replyToAddScript() {
491 491
 
492 492
         $_oCaller = $this->oProp->oCaller;
493
-        if ( ! $_oCaller->isInThePage() ) {
493
+        if ( !$_oCaller->isInThePage() ) {
494 494
             return;
495 495
         }
496 496
 
497 497
         $this->_printCommonScripts( 'admin-page-framework-script-common', get_class() );
498
-        $this->_printClassSpecificScripts( $this->_sClassSelector_Script . '-' . $this->oProp->sStructureType );
498
+        $this->_printClassSpecificScripts( $this->_sClassSelector_Script.'-'.$this->oProp->sStructureType );
499 499
 
500 500
     }
501 501
 
@@ -558,8 +558,8 @@  discard block
 block discarded – undo
558 558
                 $aEnqueueItem[ 'media' ]
559 559
             );
560 560
             $_aAddData = array( 'conditional', 'rtl', 'suffix', 'alt', 'title' );
561
-            foreach( $_aAddData as $_sDataKey ) {
562
-                if ( ! isset( $aEnqueueItem[ $_sDataKey ] ) ) {
561
+            foreach ( $_aAddData as $_sDataKey ) {
562
+                if ( !isset( $aEnqueueItem[ $_sDataKey ] ) ) {
563 563
                     continue;
564 564
                 }
565 565
                 wp_style_add_data( $aEnqueueItem[ 'handle_id' ], $_sDataKey, $aEnqueueItem[ $_sDataKey ] );
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
          */
576 576
         private function ___getSRCFormatted( array $aEnqueueItem ) {
577 577
 
578
-            if ( ! $this->oProp->bAutoloadMinifiedResource ) {
578
+            if ( !$this->oProp->bAutoloadMinifiedResource ) {
579 579
                 return $aEnqueueItem[ 'sSRC' ];
580 580
             }
581 581
 
@@ -602,16 +602,16 @@  discard block
 block discarded – undo
602 602
                 + array( 'dirname' => '', 'filename' => '', 'basename' => '', 'extension' => '' ); // avoid undefined index warnings
603 603
 
604 604
             // If there is no extension, avoid using a minified version.
605
-            if ( ! $_aPathParts[ 'extension' ] ) {
605
+            if ( !$_aPathParts[ 'extension' ] ) {
606 606
                 return $aEnqueueItem[ 'sSRC' ];
607 607
             }
608 608
 
609 609
             $_aPathPartsURL = pathinfo( $aEnqueueItem[ 'sSRC' ] )
610 610
                 + array( 'dirname' => '', 'filename' => '', 'basename' => '', 'extension' => '' ); // avoid undefined index warnings
611 611
 
612
-            $_sPathMinifiedVersion = $_aPathParts[ 'dirname' ] . '/' . $_aPathParts[ 'filename' ] . $_sMinPrefix . '.' . $_aPathParts[ 'extension' ];
612
+            $_sPathMinifiedVersion = $_aPathParts[ 'dirname' ].'/'.$_aPathParts[ 'filename' ].$_sMinPrefix.'.'.$_aPathParts[ 'extension' ];
613 613
             return file_exists( $_sPathMinifiedVersion )
614
-                ? $_aPathPartsURL[ 'dirname' ] . '/' . $_aPathPartsURL[ 'filename' ] . $_sMinPrefix . '.' . $_aPathPartsURL[ 'extension' ]
614
+                ? $_aPathPartsURL[ 'dirname' ].'/'.$_aPathPartsURL[ 'filename' ].$_sMinPrefix.'.'.$_aPathPartsURL[ 'extension' ]
615 615
                 : $aEnqueueItem[ 'sSRC' ];
616 616
 
617 617
         }
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
      * @deprecated 3.9.0 Unused
623 623
      */
624 624
     public function _replyToEnqueueCommonScripts() {
625
-        if ( $this->hasBeenCalled( 'COMMON_EXTERNAL_SCRIPTS: ' . __METHOD__ ) ) {
625
+        if ( $this->hasBeenCalled( 'COMMON_EXTERNAL_SCRIPTS: '.__METHOD__ ) ) {
626 626
             return;
627 627
         }
628 628
         // Currently no common JS script is needed
@@ -641,11 +641,11 @@  discard block
 block discarded – undo
641 641
      * @callback action wp_enqueue_scripts
642 642
      */
643 643
     public function _replyToEnqueueCommonStyles() {
644
-        if ( $this->hasBeenCalled( 'COMMON_EXTERNAL_STYLES: ' . __METHOD__ ) ) {
644
+        if ( $this->hasBeenCalled( 'COMMON_EXTERNAL_STYLES: '.__METHOD__ ) ) {
645 645
             return;
646 646
         }
647 647
         $this->_addEnqueuingResourceByType(
648
-            AdminPageFramework_Registry::$sDirPath . '/factory/_common/asset/css/common.css',
648
+            AdminPageFramework_Registry::$sDirPath.'/factory/_common/asset/css/common.css',
649 649
             array(
650 650
                 'version' => AdminPageFramework_Registry::VERSION,
651 651
             ),
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
      * @internal
665 665
      */
666 666
     public function _replyToEnqueueStyles() {
667
-        foreach( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
667
+        foreach ( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
668 668
             $this->_enqueueSRCByCondition( $_aEnqueuingStyle );
669 669
             unset( $this->oProp->aEnqueuingStyles[ $_sKey ] );
670 670
         }
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
      * @internal
682 682
      */
683 683
     public function _replyToEnqueueScripts() {
684
-        foreach( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
684
+        foreach ( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
685 685
             $this->_enqueueSRCByCondition( $_aEnqueuingScript );
686 686
             unset( $this->oProp->aEnqueuingScripts[ $_sKey ] );
687 687
         }
@@ -695,10 +695,10 @@  discard block
 block discarded – undo
695 695
      * @param  string   $sType          Accepts 'style' or 'script'
696 696
      * @return string[] Added resource handle IDs.
697 697
      */
698
-    public function _enqueueResourcesByType( $aSRCs, array $aCustomArgs=array(), $sType='style' ) {
698
+    public function _enqueueResourcesByType( $aSRCs, array $aCustomArgs = array(), $sType = 'style' ) {
699 699
         $_aHandleIDs = array();
700
-        foreach( $aSRCs as $_sSRC ) {
701
-            $_aHandleIDs[] = call_user_func_array( array( $this, '_addEnqueuingResourceByType' ), array( $_sSRC, $aCustomArgs, $sType ) );
700
+        foreach ( $aSRCs as $_sSRC ) {
701
+            $_aHandleIDs[ ] = call_user_func_array( array( $this, '_addEnqueuingResourceByType' ), array( $_sSRC, $aCustomArgs, $sType ) );
702 702
         }
703 703
         return $_aHandleIDs;
704 704
     }
@@ -715,9 +715,9 @@  discard block
 block discarded – undo
715 715
      * @return      string      The script handle ID if added. If the passed url is not a valid url string, an empty string will be returned.
716 716
      * @internal
717 717
      */
718
-    public function _addEnqueuingResourceByType( $sSRC, array $aCustomArgs=array(), $sType='style' ) {
718
+    public function _addEnqueuingResourceByType( $sSRC, array $aCustomArgs = array(), $sType = 'style' ) {
719 719
 
720
-        $sSRC       = trim( $sSRC );
720
+        $sSRC = trim( $sSRC );
721 721
         if ( empty( $sSRC ) ) {
722 722
             return '';
723 723
         }
@@ -733,12 +733,12 @@  discard block
 block discarded – undo
733 733
                 'sSRCRaw'   => $_sRawSRC,
734 734
                 'sSRC'      => $_sSRC,
735 735
                 'sType'     => $sType,
736
-                'handle_id' => $sType . '_' . strtolower( $this->oProp->sClassName ) . '_' .  ( ++$this->oProp->{$_sEnqueuedIndexPropertyName} ),
736
+                'handle_id' => $sType.'_'.strtolower( $this->oProp->sClassName ).'_'.( ++$this->oProp->{$_sEnqueuedIndexPropertyName} ),
737 737
             )
738 738
             + self::$_aStructure_EnqueuingResources;
739 739
 
740 740
         // Store the attributes in another container by url.
741
-        $this->oProp->aResourceAttributes[ $this->oProp->{$_sContainerPropertyName}[ $_sSRC ]['handle_id'] ] = $this->oProp->{$_sContainerPropertyName}[ $_sSRC ]['attributes'];
741
+        $this->oProp->aResourceAttributes[ $this->oProp->{$_sContainerPropertyName}[ $_sSRC ][ 'handle_id' ] ] = $this->oProp->{$_sContainerPropertyName}[ $_sSRC ][ 'attributes' ];
742 742
 
743 743
         return $this->oProp->{$_sContainerPropertyName}[ $_sSRC ][ 'handle_id' ];
744 744
 
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Base.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@
 block discarded – undo
266 266
      * @since  3.8.22
267 267
      */
268 268
     static public function getSlicedByDepth( array $aSubject, $iDepth=0, $sMore='(array truncated) ...' ) {
269
-       return self::_getSlicedByDepth( $aSubject, $iDepth, $sMore );
269
+        return self::_getSlicedByDepth( $aSubject, $iDepth, $sMore );
270 270
     }
271 271
 
272 272
     /**
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
      * @return  string
38 38
      * @since   3.8.9
39 39
      */
40
-    static protected function _getLegibleDetails( $mValue, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
40
+    static protected function _getLegibleDetails( $mValue, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
41 41
         if ( is_array( $mValue ) ) {
42
-            return '(array, length: ' . count( $mValue ).') '
43
-                . self::getAsString( print_r( self::___getLegibleDetailedArray( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) , true ) );
42
+            return '(array, length: '.count( $mValue ).') '
43
+                . self::getAsString( print_r( self::___getLegibleDetailedArray( $mValue, $iStringLengthLimit, $iArrayDepthLimit ), true ) );
44 44
         }
45 45
         return self::getAsString( print_r( self::getLegibleDetailedValue( $mValue, $iStringLengthLimit ), true ) );
46 46
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     static public function getObjectName( $mItem ) {
59 59
         if ( is_object( $mItem ) ) {
60
-            return '(object) ' . get_class( $mItem );
60
+            return '(object) '.get_class( $mItem );
61 61
         }
62 62
         return $mItem;
63 63
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @since  3.8.9
73 73
      * @since  3.8.22  Added the `$sStringLengthLimit` and `$iArrayDepthLimit` parameters.
74 74
      */
75
-    static protected function _getLegible( $mValue, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
75
+    static protected function _getLegible( $mValue, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
76 76
 
77 77
         $iArrayDepthLimit = $iArrayDepthLimit ? $iArrayDepthLimit : self::$iLegibleArrayDepthLimit;
78 78
         $mValue           = is_object( $mValue )
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             )
90 90
             : $mValue;
91 91
         $mValue = is_string( $mValue )
92
-            ? self::___getLegibleString( $mValue,  $iStringLengthLimit, false )
92
+            ? self::___getLegibleString( $mValue, $iStringLengthLimit, false )
93 93
             : $mValue;
94 94
         return self::_getArrayRepresentationSanitized( self::getAsString( print_r( $mValue, true ) ) );
95 95
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
          * @return      string
102 102
          */
103 103
         static private function ___getLegibleDetailedCallable( $asoCallable ) {
104
-            return '(callable) ' . self::___getCallableName( $asoCallable );
104
+            return '(callable) '.self::___getCallableName( $asoCallable );
105 105
         }
106 106
             /**
107 107
              * @since       3.8.9
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 $_sSubject = is_object( $asoCallable[ 0 ] )
120 120
                     ? get_class( $asoCallable[ 0 ] )
121 121
                     : ( string ) $asoCallable[ 0 ];
122
-                return $_sSubject . '::' . ( string ) $asoCallable[ 1 ];
122
+                return $_sSubject.'::'.( string ) $asoCallable[ 1 ];
123 123
 
124 124
             }
125 125
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             if ( method_exists( $oObject, '__toString' ) ) {
134 134
                 return ( string ) $oObject;
135 135
             }
136
-            return '(object) ' . get_class( $oObject ) . ' ' . count( get_object_vars( $oObject ) ) . ' properties.';
136
+            return '(object) '.get_class( $oObject ).' '.count( get_object_vars( $oObject ) ).' properties.';
137 137
 
138 138
         }
139 139
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
          * @since  3.8.22  Changed the scope to private from public.
150 150
          * @since  3.8.22  Renamed from `_getLegibleArray()`.
151 151
          */
152
-        static private function ___getLegibleDetailedArray( array $aArray, $iStringLengthLimit=0, $iDepthLimit=0 ) {
152
+        static private function ___getLegibleDetailedArray( array $aArray, $iStringLengthLimit = 0, $iDepthLimit = 0 ) {
153 153
             $_iDepthLimit = $iDepthLimit ? $iDepthLimit : self::$iLegibleArrayDepthLimit;
154 154
             return self::getArrayMappedRecursive(
155 155
                 array( __CLASS__, 'getLegibleDetailedValue' ),
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
                 return self::___getLegibleDetailedObject( $mNonScalar );
192 192
             }
193 193
             if ( is_array( $mNonScalar ) ) {
194
-                return '(' . $_sType . ') ' . count( $mNonScalar ) . ' elements';
194
+                return '('.$_sType.') '.count( $mNonScalar ).' elements';
195 195
             }
196
-            return '(' . $_sType . ') ' . ( string ) $mNonScalar;
196
+            return '('.$_sType.') '.( string ) $mNonScalar;
197 197
 
198 198
         }
199 199
         /**
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
          */
206 206
         static private function ___getLegibleDetailedScalar( $sScalar, $iStringLengthLimit ) {
207 207
             if ( is_bool( $sScalar ) ) {
208
-                return '(boolean) ' . ( $sScalar ? 'true' : 'false' );
208
+                return '(boolean) '.( $sScalar ? 'true' : 'false' );
209 209
             }
210 210
             return is_string( $sScalar )
211 211
                 ? self::___getLegibleString( $sScalar, $iStringLengthLimit, true )
212
-                : '(' . gettype( $sScalar ) . ', length: ' . self::___getValueLength( $sScalar ) .  ') ' . $sScalar;
212
+                : '('.gettype( $sScalar ).', length: '.self::___getValueLength( $sScalar ).') '.$sScalar;
213 213
         }
214 214
             /**
215 215
              * Returns a length of a value.
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
              * @param       boolean     $bShowDetails
235 235
              * @return      string
236 236
              */
237
-            static private function ___getLegibleString( $sString, $iLengthLimit, $bShowDetails=true ) {
237
+            static private function ___getLegibleString( $sString, $iLengthLimit, $bShowDetails = true ) {
238 238
 
239 239
                 static $_iMBSupport;
240 240
                 $_iMBSupport    = isset( $_iMBSupport ) ? $_iMBSupport : ( integer ) function_exists( 'mb_strlen' );
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
 
246 246
                 if ( $bShowDetails ) {
247 247
                     return $_iCharLength <= $iCharLimit
248
-                        ? '(string, length: ' . $_iCharLength . ') ' . $sString
249
-                        : '(string, length: ' . $_iCharLength . ') ' . call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) )
248
+                        ? '(string, length: '.$_iCharLength.') '.$sString
249
+                        : '(string, length: '.$_iCharLength.') '.call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) )
250 250
                             . '...';
251 251
                 }
252 252
                 return $_iCharLength <= $iCharLimit
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      * @return array
287 287
      * @since  3.8.22
288 288
      */
289
-    static public function getSlicedByDepth( array $aSubject, $iDepth=0, $sMore='(array truncated) ...' ) {
289
+    static public function getSlicedByDepth( array $aSubject, $iDepth = 0, $sMore = '(array truncated) ...' ) {
290 290
        return self::_getSlicedByDepth( $aSubject, $iDepth, $sMore );
291 291
     }
292 292
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      * @since       3.8.22      Added the `$sMore` parameter.
307 307
      * @internal
308 308
      */
309
-    static private function _getSlicedByDepth( array $aSubject, $iDepth=0, $sMore='(array truncated) ...' ) {
309
+    static private function _getSlicedByDepth( array $aSubject, $iDepth = 0, $sMore = '(array truncated) ...' ) {
310 310
 
311 311
         foreach ( $aSubject as $_sKey => $_vValue ) {
312 312
 
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
      * @since   3.8.22
340 340
      * @since   3.8.23 Deprecated the `$oException` parameter.
341 341
      */
342
-    static public function getStackTrace( $iSkip=0, $_deprecated=null ) {
342
+    static public function getStackTrace( $iSkip = 0, $_deprecated = null ) {
343 343
 
344
-        $_iSkip      = 1;   // need to skip this method trace itself
344
+        $_iSkip      = 1; // need to skip this method trace itself
345 345
         $_oException = new Exception();
346 346
 
347 347
         // Backward compatibility.
@@ -357,22 +357,22 @@  discard block
 block discarded – undo
357 357
         $_aFrames    = array_slice( $_aFrames, $_iSkip );
358 358
         foreach ( array_reverse( $_aFrames ) as $_iIndex => $_aFrame ) {
359 359
 
360
-            $_aFrame     = $_aFrame + array(
360
+            $_aFrame = $_aFrame + array(
361 361
                 'file'  => null, 'line' => null, 'function' => null,
362 362
                 'class' => null, 'args' => array(),
363 363
             );
364 364
             $_sArguments = self::___getArgumentsOfEachStackTrace( $_aFrame[ 'args' ] );
365
-            $_aTraces[]  = sprintf(
365
+            $_aTraces[ ]  = sprintf(
366 366
                 "#%s %s(%s): %s(%s)",
367 367
                 $_iIndex + 1,
368 368
                 $_aFrame[ 'file' ],
369 369
                 $_aFrame[ 'line' ],
370
-                isset( $_aFrame[ 'class' ] ) ? $_aFrame[ 'class' ] . '->' . $_aFrame[ 'function' ] : $_aFrame[ 'function' ],
370
+                isset( $_aFrame[ 'class' ] ) ? $_aFrame[ 'class' ].'->'.$_aFrame[ 'function' ] : $_aFrame[ 'function' ],
371 371
                 $_sArguments
372 372
             );
373 373
 
374 374
         }
375
-        return implode( PHP_EOL, $_aTraces ) . PHP_EOL;
375
+        return implode( PHP_EOL, $_aTraces ).PHP_EOL;
376 376
 
377 377
     }
378 378
         /**
@@ -387,16 +387,16 @@  discard block
 block discarded – undo
387 387
             foreach ( $aTraceArguments as $_mArgument ) {
388 388
                 $_sType        = gettype( $_mArgument );
389 389
                 $_sType        = str_replace(
390
-                    array( 'resource (closed)', 'unknown type', 'integer', 'double', ),
391
-                    array( 'resource', 'unknown', 'scalar', 'scalar', ),
390
+                    array( 'resource (closed)', 'unknown type', 'integer', 'double',),
391
+                    array( 'resource', 'unknown', 'scalar', 'scalar',),
392 392
                     $_sType
393 393
                 );
394 394
                 $_sMethodName  = "___getStackTraceArgument_{$_sType}";
395
-                $_aArguments[] = method_exists( __CLASS__, $_sMethodName )
395
+                $_aArguments[ ] = method_exists( __CLASS__, $_sMethodName )
396 396
                     ? self::{$_sMethodName}( $_mArgument )
397 397
                     : $_sType;
398 398
             }
399
-            return join(", ",  $_aArguments );
399
+            return join( ", ", $_aArguments );
400 400
         }
401 401
             /**
402 402
              * @since 3.8.22
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
              */
407 407
             static private function ___getStackTraceArgument_string( $mArgument ) {
408 408
                 $_sString = self::___getLegibleString( $mArgument, 200, true );
409
-                return "'" . $_sString . "'";
409
+                return "'".$_sString."'";
410 410
             }
411 411
             static private function ___getStackTraceArgument_scalar( $mArgument ) {
412 412
                 return $mArgument;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
                 return 'NULL';
419 419
             }
420 420
             static private function ___getStackTraceArgument_object( $mArgument ) {
421
-                return 'Object(' . get_class( $mArgument ) . ')';
421
+                return 'Object('.get_class( $mArgument ).')';
422 422
             }
423 423
             static private function ___getStackTraceArgument_resource( $mArgument ) {
424 424
                 return get_resource_type( $mArgument );
@@ -431,18 +431,18 @@  discard block
 block discarded – undo
431 431
                 $_iMax    = 10;
432 432
                 $_iTotal  = count( $mArgument );
433 433
                 $_iIndex  = 0;
434
-                foreach( $mArgument as $_sKey => $_mValue ) {
434
+                foreach ( $mArgument as $_sKey => $_mValue ) {
435 435
                     $_iIndex++;
436
-                    $_mValue   = is_scalar( $_mValue )
436
+                    $_mValue = is_scalar( $_mValue )
437 437
                         ? self::___getLegibleDetailedScalar( $_mValue, 100 )
438
-                        : ucfirst( gettype( $_mValue ) ) . (
438
+                        : ucfirst( gettype( $_mValue ) ).(
439 439
                             is_object( $_mValue )
440
-                                ? ' (' . get_class( $_mValue ) . ')'
440
+                                ? ' ('.get_class( $_mValue ).')'
441 441
                                 : ''
442 442
                         );
443
-                    $_sOutput .= $_sKey . ': ' . $_mValue . ', ';
443
+                    $_sOutput .= $_sKey.': '.$_mValue.', ';
444 444
                     if ( $_iIndex > $_iMax && $_iTotal > $_iMax ) {
445
-                        $_sOutput  = rtrim( $_sOutput, ','  ) . '...';
445
+                        $_sOutput = rtrim( $_sOutput, ',' ).'...';
446 446
                         break;
447 447
                     }
448 448
                 }
Please login to merge, or discard this patch.