Completed
Branch dev (3dc60b)
by
unknown
39s
created
development/factory/user_meta/AdminPageFramework_UserMeta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,16 +38,16 @@
 block discarded – undo
38 38
      * @since       3.7.4       Changed the default capability value to `read`.
39 39
      * @todo        Examine the appropriate default capability level.
40 40
      */
41
-    public function __construct( $sCapability='read', $sTextDomain='admin-page-framework' ) {
41
+    public function __construct( $sCapability = 'read', $sTextDomain = 'admin-page-framework' ) {
42 42
 
43 43
         $_sPropertyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
44 44
             ? $this->aSubClassNames[ 'oProp' ]
45
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;
45
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;
46 46
         $this->oProp = new $_sPropertyClassName(
47
-            $this,                  // the caller object
48
-            get_class( $this ),     // the caller class name
49
-            $sCapability,           // the capability level
50
-            $sTextDomain,           // the text domain
47
+            $this, // the caller object
48
+            get_class( $this ), // the caller class name
49
+            $sCapability, // the capability level
50
+            $sTextDomain, // the text domain
51 51
             $this->_sStructureType  // the structure type
52 52
         );
53 53
 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Router.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @since       3.3.0
28 28
      */
29
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
29
+    public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
30 30
 
31 31
         $_sPropertyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
32 32
             ? $this->aSubClassNames[ 'oProp' ]
33
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;
33
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;
34 34
 
35 35
         $this->oProp = new $_sPropertyClassName(
36 36
             $this,
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 //        if ( $this->oProp->bIsAdminAjax ) {
48 48
 //            return;
49 49
 //        }
50
-        if ( ! $this->oProp->bIsAdmin ) {
50
+        if ( !$this->oProp->bIsAdmin ) {
51 51
             return;
52 52
         }
53 53
 
54 54
         add_action( 'wp_loaded', array( $this, '_replyToDetermineToLoad' ) );
55
-        add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToLoadComponentsForAjax' ), 100 );
55
+        add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToLoadComponentsForAjax' ), 100 );
56 56
 
57 57
     }
58 58
 
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
      * @callback        add_action      set_up_{extended class name}
65 65
      */
66 66
     public function _replyToLoadComponentsForAjax() {
67
-        if ( ! $this->oProp->bIsAdminAjax ) {
67
+        if ( !$this->oProp->bIsAdminAjax ) {
68 68
             return;
69 69
         }
70 70
 
71 71
         new AdminPageFramework_Model_Menu__RegisterMenu( $this, 'pseudo_admin_menu' );
72 72
         do_action( 'pseudo_admin_menu', '' );
73
-        do_action( 'pseudo_current_screen' );       // @deprecated 3.8.22 Kept for backward-compatibility
73
+        do_action( 'pseudo_current_screen' ); // @deprecated 3.8.22 Kept for backward-compatibility
74 74
 
75 75
         $_sPageSlug = $this->oProp->getCurrentPageSlug();
76 76
         if ( $this->oProp->isPageAdded( $_sPageSlug ) ) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @since       3.3.1       Moved from `AdminPageFramework_Base`.
118 118
      * @internal
119 119
      */
120
-    public function __call( $sMethodName, $aArgs=null ) {
120
+    public function __call( $sMethodName, $aArgs = null ) {
121 121
 
122 122
         $_sPageSlug             = $this->oProp->getCurrentPageSlug();
123 123
         $_sTabSlug              = $this->oProp->getCurrentTabSlug( $_sPageSlug );
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
             'load_pre_',
129 129
         );
130 130
 
131
-        switch( $this->_getCallbackName( $sMethodName, $_sPageSlug, $_aKnownMethodPrefixes ) ) {
131
+        switch ( $this->_getCallbackName( $sMethodName, $_sPageSlug, $_aKnownMethodPrefixes ) ) {
132 132
 
133 133
             // add_settings_section() callback
134 134
             case 'section_pre_':
135
-                return $this->_renderSectionDescription( $sMethodName );    // defined in AdminPageFramework_Setting
135
+                return $this->_renderSectionDescription( $sMethodName ); // defined in AdminPageFramework_Setting
136 136
 
137 137
             // add_settings_field() callback
138 138
             case 'field_pre_':
139
-                return $this->_renderSettingField( $_mFirstArg, $_sPageSlug );  // defined in AdminPageFramework_Setting
139
+                return $this->_renderSettingField( $_mFirstArg, $_sPageSlug ); // defined in AdminPageFramework_Setting
140 140
 
141 141
             // load-{page} callback
142 142
             case 'load_pre_':
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
          * @return      string      The found callback method name or the prefix of a known callback method name. An empty string if not found.
155 155
          * @internal
156 156
          */
157
-        private function _getCallbackName( $sMethodName, $sPageSlug, array $aKnownMethodPrefixes=array() ) {
157
+        private function _getCallbackName( $sMethodName, $sPageSlug, array $aKnownMethodPrefixes = array() ) {
158 158
 
159
-            foreach( $aKnownMethodPrefixes as $_sMethodPrefix ) {
159
+            foreach ( $aKnownMethodPrefixes as $_sMethodPrefix ) {
160 160
                 if ( $this->oUtil->hasPrefix( $_sMethodPrefix, $sMethodName ) ) {
161 161
                     return $_sMethodPrefix;
162 162
                 }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
          */
181 181
         protected function _doPageLoadCall( $sMethodName, $sPageSlug, $sTabSlug, $oScreen ) {
182 182
 
183
-            if ( ! $this->_isPageLoadCall( $sMethodName, $sPageSlug, $oScreen ) ) {
183
+            if ( !$this->_isPageLoadCall( $sMethodName, $sPageSlug, $oScreen ) ) {
184 184
                 return;
185 185
             }
186 186
 
@@ -204,10 +204,10 @@  discard block
 block discarded – undo
204 204
             // the tab slug will be empty unless an in-page tab is added.
205 205
             $sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug );
206 206
             if ( strlen( $sTabSlug ) ) {
207
-                $this->_setShowDebugInfoProperty( $sPageSlug, $sTabSlug );  // 3.8.8+
207
+                $this->_setShowDebugInfoProperty( $sPageSlug, $sTabSlug ); // 3.8.8+
208 208
                 $this->oUtil->addAndDoActions(
209 209
                     $this, // the caller object
210
-                    array( "load_{$sPageSlug}_" . $sTabSlug ),
210
+                    array( "load_{$sPageSlug}_".$sTabSlug ),
211 211
                     $this // the admin page object - this lets third-party scripts use the framework methods.
212 212
                 );
213 213
                 add_filter( 'admin_title', array( $this, '_replyToSetAdminPageTitleForTab' ), 1, 2 );
@@ -233,10 +233,10 @@  discard block
 block discarded – undo
233 233
              * @since       3.8.8
234 234
              * @return      void
235 235
              */
236
-            private function _setShowDebugInfoProperty( $sPageSlug, $sTabSlug='' ) {
236
+            private function _setShowDebugInfoProperty( $sPageSlug, $sTabSlug = '' ) {
237 237
 
238 238
                 // For the page,
239
-                if ( ! strlen( $sTabSlug ) ) {
239
+                if ( !strlen( $sTabSlug ) ) {
240 240
                     $this->oProp->bShowDebugInfo = $this->oUtil->getElement(
241 241
                         $this->oProp->aPages,
242 242
                         array( $sPageSlug, 'show_debug_info' ),
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
                 if ( substr( $sMethodName, strlen( 'load_pre_' ) ) !== $sPageSlug ) {
282 282
                     return false;
283 283
                 }
284
-                if ( ! isset( $this->oProp->aPageHooks[ $sPageSlug ] ) ) {
284
+                if ( !isset( $this->oProp->aPageHooks[ $sPageSlug ] ) ) {
285 285
                     return false;
286 286
                 }
287 287
                 $_sPageHook = is_object( $osScreenORPageHook )
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         }
308 308
 
309 309
         // Nothing to do in the network admin area.
310
-        return ! is_network_admin();
310
+        return !is_network_admin();
311 311
 
312 312
     }
313 313
 
@@ -322,13 +322,13 @@  discard block
 block discarded – undo
322 322
      */
323 323
     protected function _isInThePage() {
324 324
 
325
-        if ( ! $this->oProp->bIsAdmin ) {
325
+        if ( !$this->oProp->bIsAdmin ) {
326 326
             return false;
327 327
         }
328 328
 
329 329
         // If the `setUp()` method is not loaded yet, nothing can be checked
330 330
         // as there is not page is added.
331
-        if ( ! did_action( 'set_up_' . $this->oProp->sClassName ) ) {
331
+        if ( !did_action( 'set_up_'.$this->oProp->sClassName ) ) {
332 332
             return true;
333 333
         }
334 334
 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_View_Page.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
                 $this->oProp->aInPageTabs,
33 33
                 array( $this->oProp->getCurrentPageSlug(), $this->oProp->getCurrentTabSlug(), 'title' )
34 34
             );
35
-        if ( ! $_sTabTitle ) {
35
+        if ( !$_sTabTitle ) {
36 36
             return $sAdminTitle;
37 37
         }
38
-        return $_sTabTitle . ' ‹ ' . $sAdminTitle;
38
+        return $_sTabTitle.' ‹ '.$sAdminTitle;
39 39
     }
40 40
 
41 41
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @return      void
83 83
      * @internal
84 84
      */
85
-    protected function _renderPage( $sPageSlug, $sTabSlug=null ) {
85
+    protected function _renderPage( $sPageSlug, $sTabSlug = null ) {
86 86
         $_oPageRenderer = new AdminPageFramework_View__PageRenderer( $this, $sPageSlug, $sTabSlug );
87 87
         $_oPageRenderer->render();
88 88
     }
Please login to merge, or discard this patch.
development/factory/meta_box/AdminPageFramework_MetaBox.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
      * @param       string            $sTextDomain              (optional) The text domain applied to the displayed text messages. Default: `admin-page-framework`.
54 54
      * @return      void
55 55
      */
56
-    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework' ) {
56
+    public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array( 'post' ), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework' ) {
57 57
 
58
-        if ( ! $this->_isInstantiatable() ) {
58
+        if ( !$this->_isInstantiatable() ) {
59 59
             return;
60 60
         }
61 61
         if ( empty( $asPostTypeOrScreenID ) ) {
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
         // A property object needs to be done first.
66 66
         $_sPropertyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
67 67
             ? $this->aSubClassNames[ 'oProp' ]
68
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;
69
-        $this->oProp                = new $_sPropertyClassName(
68
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;
69
+        $this->oProp = new $_sPropertyClassName(
70 70
             $this,
71 71
             get_class( $this ),
72 72
             $sCapability,
73 73
             $sTextDomain,
74 74
             $this->_sStructureType
75 75
         );
76
-        $this->oProp->aPostTypes    = is_string( $asPostTypeOrScreenID )
76
+        $this->oProp->aPostTypes = is_string( $asPostTypeOrScreenID )
77 77
             ? array( $asPostTypeOrScreenID )
78 78
             : $asPostTypeOrScreenID;
79 79
 
Please login to merge, or discard this patch.
development/factory/term_meta/AdminPageFramework_TermMeta.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param       string          The text domain. Default: `admin-page-framework`.
46 46
      * @return      void
47 47
      */
48
-    public function __construct( $asTaxonomySlug, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
48
+    public function __construct( $asTaxonomySlug, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
49 49
 
50 50
         if ( empty( $asTaxonomySlug ) ) {
51 51
             return;
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
         // Properties
55 55
         $_sPropertyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
56 56
             ? $this->aSubClassNames[ 'oProp' ]
57
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;
58
-        $this->oProp        = new $_sPropertyClassName(
57
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;
58
+        $this->oProp = new $_sPropertyClassName(
59 59
             $this,
60 60
             get_class( $this ),
61 61
             $sCapability,
62 62
             $sTextDomain,
63 63
             $this->_sStructureType
64 64
         );
65
-        $this->oProp->aTaxonomySlugs    = ( array ) $asTaxonomySlug;
65
+        $this->oProp->aTaxonomySlugs = ( array ) $asTaxonomySlug;
66 66
 
67 67
         parent::__construct( $this->oProp );
68 68
 
Please login to merge, or discard this patch.
factory/_common/utility/base_utility/AdminPageFramework_Utility_URL.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             0 => '',
53 53
             1 => 's',
54 54
         );
55
-        $_sProtocol         = substr( $_sServerProtocol, 0, strpos( $_sServerProtocol, '/' ) )
55
+        $_sProtocol = substr( $_sServerProtocol, 0, strpos( $_sServerProtocol, '/' ) )
56 56
             . $_aProtocolSuffix[ ( int ) $_bSSL ];
57 57
 
58 58
         // Port: e.g. :80
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
                 ? $_SERVER[ 'HTTP_HOST' ]
66 66
                 : $_SERVER[ 'SERVER_NAME' ]
67 67
             );
68
-        $_sHost             = preg_replace( '/:.+/', '', $_sHost ); // remove the port part in case it is added.
69
-        return $_sProtocol . '://' . $_sHost . $_sPort . $_SERVER[ 'REQUEST_URI' ];
68
+        $_sHost = preg_replace( '/:.+/', '', $_sHost ); // remove the port part in case it is added.
69
+        return $_sProtocol.'://'.$_sHost.$_sPort.$_SERVER[ 'REQUEST_URI' ];
70 70
 
71 71
     }
72 72
         /**
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
                 ? ( string ) $_SERVER[ 'SERVER_PORT' ]
81 81
                 : '';
82 82
             $_aPort     = array(
83
-                0 => ':' . $_sPort,
83
+                0 => ':'.$_sPort,
84 84
                 1 => '',
85 85
             );
86
-            $_bPortSet  = ( ! $bSSL && '80' === $_sPort ) || ( $bSSL && '443' === $_sPort );
86
+            $_bPortSet = ( !$bSSL && '80' === $_sPort ) || ( $bSSL && '443' === $_sPort );
87 87
             return $_aPort[ ( int ) $_bPortSet ];
88 88
         }
89 89
 
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_Option.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param   array|string    $asPrefixes
37 37
      * @retuen  void
38 38
      */
39
-    public static function cleanTransients( $asPrefixes=array( 'apf' ) ) {
39
+    public static function cleanTransients( $asPrefixes = array( 'apf' ) ) {
40 40
 
41 41
         $_aPrefixes = self::getAsArray( $asPrefixes );
42 42
         if ( self::isNetworkAdmin() ) {
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
         /**
47 47
          * @var wpdb
48 48
          */
49
-        $_oWPDB     = $GLOBALS[ 'wpdb' ];
50
-        foreach( $_aPrefixes as $_sPrefix ) {
49
+        $_oWPDB = $GLOBALS[ 'wpdb' ];
50
+        foreach ( $_aPrefixes as $_sPrefix ) {
51 51
             $_sSQLQuery = "DELETE FROM `{$_oWPDB->options}` "
52 52
                 . "WHERE `option_name` "
53
-                . "LIKE ( '_transient_%{$_sPrefix}%' )";    // this also matches _transient_timeout_{prefix}
53
+                . "LIKE ( '_transient_%{$_sPrefix}%' )"; // this also matches _transient_timeout_{prefix}
54 54
             $_oWPDB->query( $_sSQLQuery );
55 55
         }
56 56
 
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
         /**
67 67
          * @var wpdb
68 68
          */
69
-        $_oWPDB     = $GLOBALS[ 'wpdb' ];
70
-        foreach( $_aPrefixes as $_sPrefix ) {
69
+        $_oWPDB = $GLOBALS[ 'wpdb' ];
70
+        foreach ( $_aPrefixes as $_sPrefix ) {
71 71
             $_sSQLQuery = "DELETE FROM `{$_oWPDB->sitemeta}` "
72 72
                 . "WHERE "
73 73
                 // this matches _site_transient_timeout_{...} as well
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @return array
83 83
      * @since  3.8.23
84 84
      */
85
-    static public function getTransientAsArray( $sTransientKey, $mDefault=null ) {
85
+    static public function getTransientAsArray( $sTransientKey, $mDefault = null ) {
86 86
         return self::getAsArray(
87 87
             self::getTransient( $sTransientKey, $mDefault )
88 88
         );
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @return array
95 95
      * @since  3.8.23
96 96
      */
97
-    static public function getTransientWithoutCacheAsArray( $sTransientKey, $mDefault=null ) {
97
+    static public function getTransientWithoutCacheAsArray( $sTransientKey, $mDefault = null ) {
98 98
         return self::getAsArray(
99 99
             self::getTransientWithoutCache( $sTransientKey, $mDefault )
100 100
         );
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
      * @sicne   3.8.23
112 112
      * @return  mixed|false `false` on failing to retrieve the transient value.
113 113
      */
114
-    static public function getTransientWithoutCache( $sTransientKey, $mDefault=null ) {
114
+    static public function getTransientWithoutCache( $sTransientKey, $mDefault = null ) {
115 115
 
116
-        $sTransientKey  = self::_getCompatibleTransientKey( $sTransientKey );
116
+        $sTransientKey = self::_getCompatibleTransientKey( $sTransientKey );
117 117
         if ( self::isNetworkAdmin() ) {
118 118
             return self::getTransientWithoutCacheForNetwork( $sTransientKey, $mDefault );
119 119
         }
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
         $_mData = $_oWPDB->get_var(
132 132
             $_oWPDB->prepare(
133 133
                 $_sSQLQuery,
134
-                '_transient_' . $sTransientKey,
135
-                '_transient_timeout_' . $sTransientKey
134
+                '_transient_'.$sTransientKey,
135
+                '_transient_timeout_'.$sTransientKey
136 136
             )
137 137
         );
138 138
         return is_null( $_mData ) ? $mDefault : maybe_unserialize( $_mData );
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @since   3.8.23
146 146
      * @return  mixed
147 147
      */
148
-    static public function getTransientWithoutCacheForNetwork($sTransientKey, $mDefault ) {
148
+    static public function getTransientWithoutCacheForNetwork( $sTransientKey, $mDefault ) {
149 149
 
150 150
         /**
151 151
          * @var wpdb $_oWPDB
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
         $_mData = $_oWPDB->get_var(
162 162
             $_oWPDB->prepare(
163 163
                 $_sSQLQuery,
164
-                '_site_transient_' . $sTransientKey,
165
-                '_site_transient_timeout_' . $sTransientKey,
164
+                '_site_transient_'.$sTransientKey,
165
+                '_site_transient_timeout_'.$sTransientKey,
166 166
                 get_current_network_id()
167 167
             )
168 168
         );
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             0 => 'delete_transient',
196 196
             1 => 'delete_site_transient',
197 197
         );
198
-        $_vTransient     = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
198
+        $_vTransient = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
199 199
 
200 200
         // reset prior value of $_wp_using_ext_object_cache
201 201
         $_wp_using_ext_object_cache = $_bWpUsingExtObjectCacheTemp;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * @param   mixed   $vDefault
212 212
      * @return  mixed
213 213
      */
214
-    static public function getTransient( $sTransientKey, $vDefault=null ) {
214
+    static public function getTransient( $sTransientKey, $vDefault = null ) {
215 215
 
216 216
         // Temporarily disable $_wp_using_ext_object_cache
217 217
         global $_wp_using_ext_object_cache;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             0 => 'get_transient',
224 224
             1 => 'get_site_transient',
225 225
         );
226
-        $_vTransient     = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
226
+        $_vTransient = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
227 227
 
228 228
         // Restore the prior value of `$_wp_using_ext_object_cache`.
229 229
         $_wp_using_ext_object_cache = $_bWpUsingExtObjectCacheTemp;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      * @param       mixed       $vValue
246 246
      * @param       integer     $iExpiration
247 247
      */
248
-    static public function setTransient( $sTransientKey, $vValue, $iExpiration=0 ) {
248
+    static public function setTransient( $sTransientKey, $vValue, $iExpiration = 0 ) {
249 249
 
250 250
         // Temporarily disable `$_wp_using_ext_object_cache`.
251 251
         global $_wp_using_ext_object_cache;
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
          * @return      string
277 277
          * @todo it is said as of WordPress 4.3, it will be 255 since the database table column type becomes VARCHAR(255).
278 278
          */
279
-        static public function _getCompatibleTransientKey( $sSubject, $iDeprecated=null ) {
279
+        static public function _getCompatibleTransientKey( $sSubject, $iDeprecated = null ) {
280 280
 
281 281
             $_iAllowedCharacterLength = isset( $iDeprecated )
282 282
                 ? $iDeprecated
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                 0, // start position
295 295
                 $_iPrefixLengthToKeep - 1 // how many characters to extract
296 296
             );
297
-            return $_sPrefixToKeep . '_' . md5( $sSubject );
297
+            return $_sPrefixToKeep.'_'.md5( $sSubject );
298 298
 
299 299
         }
300 300
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      * @param   array           $aAdditionalOptions     an additional options array to merge with the options array.
310 310
      * @return  mixed
311 311
      */
312
-    static public function getOption( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array() ) {
312
+    static public function getOption( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array() ) {
313 313
         return self::_getOptionByFunctionName( $sOptionKey, $asKey, $vDefault, $aAdditionalOptions );
314 314
     }
315 315
     /**
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
      * @remark  Used in the network admin area.
325 325
      * @return  mixed
326 326
      */
327
-    static public function getSiteOption( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array() ) {
327
+    static public function getSiteOption( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array() ) {
328 328
         return self::_getOptionByFunctionName( $sOptionKey, $asKey, $vDefault, $aAdditionalOptions, 'get_site_option' );
329 329
     }
330 330
 
@@ -340,16 +340,16 @@  discard block
 block discarded – undo
340 340
          * @return      mixed
341 341
          * @since       3.5.3
342 342
          */
343
-        static private function _getOptionByFunctionName( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array(), $sFunctionName='get_option' ) {
343
+        static private function _getOptionByFunctionName( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array(), $sFunctionName = 'get_option' ) {
344 344
 
345 345
             // Entire options
346
-            if ( ! isset( $asKey ) ) {
346
+            if ( !isset( $asKey ) ) {
347 347
                 $_aOptions = $sFunctionName(
348 348
                     $sOptionKey,
349 349
                     isset( $vDefault )
350 350
                         ? $vDefault
351 351
                         : array()
352
-                );;
352
+                ); ;
353 353
                 return empty( $aAdditionalOptions )
354 354
                     ? $_aOptions
355 355
                     : self::uniteArrays(
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Log.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @since       3.8.9
29 29
      * @return      void
30 30
      **/
31
-    static protected function _log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) {
31
+    static protected function _log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) {
32 32
 
33 33
         static $_fPreviousTimeStamp = 0;
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $_sCallerClass      = self::___getCallerClassName( $_oCallerInfo, $iTrace );
38 38
         $_fCurrentTimeStamp = microtime( true );
39 39
         $_sLogContent       = self::___getLogContents( $mValue, $_fCurrentTimeStamp, $_fPreviousTimeStamp, $_sCallerClass, $_sCallerFunction, $iStringLengthLimit, $iArrayDepthLimit )
40
-            . ( $bStackTrace ? self::getStackTrace($iTrace + 1 ) : '' )
40
+            . ( $bStackTrace ? self::getStackTrace( $iTrace + 1 ) : '' )
41 41
             . PHP_EOL;
42 42
 
43 43
         file_put_contents( self::___getLogFilePath( $sFilePath, $_sCallerClass ), $_sLogContent, FILE_APPEND );
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
                     round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time
55 55
                     $_sCallerClass,
56 56
                     $_sCallerFunction
57
-                ) . PHP_EOL
58
-                . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) . PHP_EOL;
57
+                ).PHP_EOL
58
+                . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ).PHP_EOL;
59 59
         }
60 60
         /**
61 61
          * @since       3.8.9
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          */
64 64
         static private function ___getCallerFunctionName( $oCallerInfo, $iTrace ) {
65 65
             return self::getElement(
66
-                $oCallerInfo,  // subject array
66
+                $oCallerInfo, // subject array
67 67
                 array( 2 + $iTrace, 'function' ), // key
68 68
                 ''      // default
69 69
             );
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
          */
75 75
         static private function ___getCallerClassName( $oCallerInfo, $iTrace ) {
76 76
             return self::getElement(
77
-                $oCallerInfo,  // subject array
77
+                $oCallerInfo, // subject array
78 78
                 array( 2 + $iTrace, 'class' ), // key
79 79
                 ''      // default
80 80
             );
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
          */
90 90
         static private function ___getLogFilePath( $bsFilePathOrName, $sCallerClass ) {
91 91
 
92
-            $_sWPContentDir  = WP_CONTENT_DIR . DIRECTORY_SEPARATOR;
92
+            $_sWPContentDir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR;
93 93
 
94 94
             // It is a partial file name
95
-            if ( is_string( $bsFilePathOrName ) && ! self::hasSlash( $bsFilePathOrName ) ) {
96
-                return $_sWPContentDir . $bsFilePathOrName . '_' . date( "Ymd" ) . '.log';
95
+            if ( is_string( $bsFilePathOrName ) && !self::hasSlash( $bsFilePathOrName ) ) {
96
+                return $_sWPContentDir.$bsFilePathOrName.'_'.date( "Ymd" ).'.log';
97 97
             }
98 98
 
99 99
             // Try creating a file.
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
             // Return a generated default log path.
108 108
             $_sClassBaseName = $sCallerClass ? basename( $sCallerClass ) : basename( get_class() );
109
-            return $_sWPContentDir . $_sClassBaseName . '_' . date( "Ymd" ) . '.log';
109
+            return $_sWPContentDir.$_sClassBaseName.'_'.date( "Ymd" ).'.log';
110 110
 
111 111
         }
112 112
             /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
              * @internal
116 116
              */
117 117
             static private function ___createFile( $sFilePath ) {
118
-                if ( ! $sFilePath || true === $sFilePath ) {
118
+                if ( !$sFilePath || true === $sFilePath ) {
119 119
                     return false;
120 120
                 }
121 121
                 if ( file_exists( $sFilePath ) ) {
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
             $_nNow              = $fCurrentTimeStamp + ( self::___getSiteGMTOffset() * 60 * 60 );
138 138
             $_nMicroseconds     = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' );
139 139
             $_aOutput           = array(
140
-                date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds,
140
+                date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds,
141 141
                 self::___getFormattedElapsedTime( $nElapsed ),
142 142
                 self::___getPageLoadID(),
143 143
                 self::getFrameworkVersion(),
144
-                $sCallerClass . '::' . $sCallerFunction,
144
+                $sCallerClass.'::'.$sCallerFunction,
145 145
                 current_filter(),
146 146
                 self::getCurrentURL(),
147 147
             );
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
              */
157 157
             static private function ___getSiteGMTOffset() {
158 158
                 static $_nGMTOffset;
159
-                $_nGMTOffset        = isset( $_nGMTOffset )
159
+                $_nGMTOffset = isset( $_nGMTOffset )
160 160
                     ? $_nGMTOffset
161 161
                     : get_option( 'gmt_offset' );
162 162
                 return $_nGMTOffset;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
              */
168 168
             static private function ___getPageLoadID() {
169 169
                 static $_sPageLoadID;
170
-                $_sPageLoadID       = $_sPageLoadID
170
+                $_sPageLoadID = $_sPageLoadID
171 171
                     ? $_sPageLoadID
172 172
                     : uniqid();
173 173
                 return $_sPageLoadID;
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
                     3,
192 192
                     '0'
193 193
                 );
194
-                $_sElapsed          = self::getElement(
195
-                    $_aElapsedParts,  // subject array
196
-                    0,  // key
194
+                $_sElapsed = self::getElement(
195
+                    $_aElapsedParts, // subject array
196
+                    0, // key
197 197
                     0   // default
198 198
                 );
199
-                $_sElapsed          = strlen( $_sElapsed ) > 1
200
-                    ? '+' . substr( $_sElapsed, -1, 2 )
201
-                    : ' ' . $_sElapsed;
202
-                return $_sElapsed . '.' . $_sElapsedFloat;
199
+                $_sElapsed = strlen( $_sElapsed ) > 1
200
+                    ? '+'.substr( $_sElapsed, -1, 2 )
201
+                    : ' '.$_sElapsed;
202
+                return $_sElapsed.'.'.$_sElapsedFloat;
203 203
 
204 204
             }
205 205
 
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param       integer         $iArrayDepthLimit
36 36
      * @return      void
37 37
      */
38
-    static public function dump( $asArray, $sFilePath=null, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
38
+    static public function dump( $asArray, $sFilePath = null, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
39 39
         echo self::get( $asArray, $sFilePath, true, $bStackTrace, $iStringLengthLimit, $iArrayDepthLimit );
40 40
     }
41 41
 
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
      * @since       3.8.9
45 45
      * @return      string
46 46
      */
47
-    static public function getDetails( $mValue, $bEscape=true, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
47
+    static public function getDetails( $mValue, $bEscape = true, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
48 48
         $_sValueWithDetails = self::_getArrayRepresentationSanitized(
49 49
             self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit )
50 50
         );
51 51
         $_sValueWithDetails = $bStackTrace
52
-            ? $_sValueWithDetails . PHP_EOL . self::getStackTrace()
52
+            ? $_sValueWithDetails.PHP_EOL.self::getStackTrace()
53 53
             : $_sValueWithDetails;
54 54
         return $bEscape
55 55
             ? "<pre class='dump-array'>"
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param       integer         $iArrayDepthLimit
76 76
      * @return      string
77 77
      */
78
-    static public function get( $asArray, $sFilePath=null, $bEscape=true, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
78
+    static public function get( $asArray, $sFilePath = null, $bEscape = true, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
79 79
 
80 80
         if ( $sFilePath ) {
81 81
             self::log( $asArray, $sFilePath );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @param       integer     $iArrayDepthLimit   The depth limit for arrays.*
118 118
      * @return      void
119 119
      **/
120
-    static public function log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) {
120
+    static public function log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) {
121 121
         self::_log( $mValue, $sFilePath, $bStackTrace, $iTrace, $iStringLengthLimit, $iArrayDepthLimit );
122 122
     }
123 123
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
      * @since unknown
132 132
      * @deprecated      3.2.0
133 133
      */
134
-    static public function dumpArray( $asArray, $sFilePath=null ) {
135
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::dump()' );
134
+    static public function dumpArray( $asArray, $sFilePath = null ) {
135
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::dump()' );
136 136
         AdminPageFramework_Debug::dump( $asArray, $sFilePath );
137 137
     }
138 138
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
      * @since       3.0.0 Changed the $bEncloseInTag parameter to bEscape.
146 146
      * @deprecated  3.2.0
147 147
      */
148
-    static public function getArray( $asArray, $sFilePath=null, $bEscape=true ) {
149
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::get()' );
148
+    static public function getArray( $asArray, $sFilePath = null, $bEscape = true ) {
149
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::get()' );
150 150
         return AdminPageFramework_Debug::get( $asArray, $sFilePath, $bEscape );
151 151
     }
152 152
 
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
      * @since       3.0.3   Changed the default log location and file name.
158 158
      * @deprecated  3.1.0   Use the `log()` method instead.
159 159
      */
160
-    static public function logArray( $asArray, $sFilePath=null ) {
161
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::log()' );
160
+    static public function logArray( $asArray, $sFilePath = null ) {
161
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::log()' );
162 162
         AdminPageFramework_Debug::log( $asArray, $sFilePath );
163 163
     }
164 164
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @deprecated  3.8.9
172 172
      */
173 173
     static public function getAsString( $mValue ) {
174
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__ );
174
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__ );
175 175
         return self::_getLegible( $mValue );
176 176
     }
177 177
 
Please login to merge, or discard this patch.