@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | : @mysql_get_server_info(), |
43 | 43 | ); |
44 | 44 | |
45 | - foreach( ( array ) $wpdb->get_results( "SHOW VARIABLES", ARRAY_A ) as $_iIndex => $_aItem ) { |
|
45 | + foreach ( ( array ) $wpdb->get_results( "SHOW VARIABLES", ARRAY_A ) as $_iIndex => $_aItem ) { |
|
46 | 46 | $_aItem = array_values( $_aItem ); |
47 | 47 | $_sKey = array_shift( $_aItem ); |
48 | 48 | $_sValue = array_shift( $_aItem ); |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | * @since 3.4.6 |
72 | 72 | * @return string |
73 | 73 | */ |
74 | - static public function getMySQLErrorLog( $iLines=1 ) { |
|
74 | + static public function getMySQLErrorLog( $iLines = 1 ) { |
|
75 | 75 | $_sLog = self::getFileTailContents( self::getMySQLErrorLogPath(), $iLines ); |
76 | - return $_sLog ? $_sLog : ''; // @todo If empty, return an alternative. |
|
76 | + return $_sLog ? $_sLog : ''; // @todo If empty, return an alternative. |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | } |
80 | 80 | \ No newline at end of file |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @param string $sSetUpHook The action hook name for the setUp callback. Default 'plugins_loaded'. |
128 | 128 | * @param integer|float $iPriority The priority. Set a lower number to get loader earlier. Default: `10`. |
129 | 129 | */ |
130 | - public function __construct( $sPluginFilePath, $sPluginHookPrefix='', $sSetUpHook='plugins_loaded', $iPriority=10 ) { |
|
130 | + public function __construct( $sPluginFilePath, $sPluginHookPrefix = '', $sSetUpHook = 'plugins_loaded', $iPriority = 10 ) { |
|
131 | 131 | |
132 | 132 | // Check if it has been loaded. |
133 | 133 | if ( $this->_hasLoaded() ) { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | register_deactivation_hook( $this->sFilePath, array( $this, 'replyToPluginDeactivation' ) ); |
164 | 164 | |
165 | 165 | // Schedule to load plugin specific components. |
166 | - if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
166 | + if ( !$this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
167 | 167 | $this->_replyToLoadPluginComponents(); |
168 | 168 | } else { |
169 | 169 | add_action( $this->sSetUpHook, array( $this, '_replyToLoadPluginComponents' ), $this->iPriority ); |
@@ -204,14 +204,14 @@ discard block |
||
204 | 204 | protected function _registerClasses() { |
205 | 205 | |
206 | 206 | // This class should be used in the framework bootstrap so disabling the auto-load option for performance. |
207 | - if ( ! class_exists( 'AdminPageFramework_RegisterClasses', false ) ) { |
|
207 | + if ( !class_exists( 'AdminPageFramework_RegisterClasses', false ) ) { |
|
208 | 208 | return; |
209 | 209 | } |
210 | 210 | |
211 | 211 | // Register classes |
212 | 212 | new AdminPageFramework_RegisterClasses( |
213 | - $this->getScanningDirs(), // scanning directory paths |
|
214 | - array(), // autoloader options |
|
213 | + $this->getScanningDirs(), // scanning directory paths |
|
214 | + array(), // autoloader options |
|
215 | 215 | $this->getClasses() // pre-generated class list |
216 | 216 | ); |
217 | 217 |
@@ -163,7 +163,7 @@ |
||
163 | 163 | register_deactivation_hook( $this->sFilePath, array( $this, 'replyToPluginDeactivation' ) ); |
164 | 164 | |
165 | 165 | // Schedule to load plugin specific components. |
166 | - if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
166 | + if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
167 | 167 | $this->_replyToLoadPluginComponents(); |
168 | 168 | } else { |
169 | 169 | add_action( $this->sSetUpHook, array( $this, '_replyToLoadPluginComponents' ), $this->iPriority ); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * If accessed from a console, include the registry class to load 'AdminPageFramework_Registry_Base'. |
12 | 12 | */ |
13 | 13 | if ( php_sapi_name() === 'cli' ) { |
14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
16 | 16 | include_once( $_sFrameworkFilePath ); |
17 | 17 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @package AdminPageFramework |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
13 | +if ( !class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
14 | 14 | /** |
15 | 15 | * Facilitates WordPress plugin and theme development. |
16 | 16 | * |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
62 | 62 | |
63 | 63 | const TEXT_DOMAIN = 'admin-page-framework'; |
64 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
64 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | /** |
109 | 109 | * Sets up static properties. |
110 | 110 | */ |
111 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
111 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
112 | 112 | self::$sFilePath = $sFilePath; |
113 | 113 | self::$sDirPath = dirname( self::$sFilePath ); |
114 | - self::$sClassMapPath = self::$sDirPath . '/admin-page-framework-class-map.php'; |
|
114 | + self::$sClassMapPath = self::$sDirPath.'/admin-page-framework-class-map.php'; |
|
115 | 115 | self::$aClassFiles = include( self::$sClassMapPath ); |
116 | 116 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
117 | 117 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | */ |
129 | 129 | static public function getVersion() { |
130 | 130 | |
131 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
132 | - trigger_error( self::NAME . ': ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
131 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
132 | + trigger_error( self::NAME.': '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
133 | 133 | return self::VERSION; |
134 | 134 | } |
135 | - $_aMinifiedVersionSuffix = array( |
|
135 | + $_aMinifiedVersionSuffix = array( |
|
136 | 136 | 0 => '', |
137 | 137 | 1 => '.min', |
138 | 138 | ); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | endif; |
163 | 163 | |
164 | -if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
164 | +if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
165 | 165 | /** |
166 | 166 | * Loads the Admin Page Framework library. |
167 | 167 | * |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function __construct( $sLibraryPath ) { |
183 | 183 | |
184 | 184 | // Singleton |
185 | - if ( ! $this->___isLoadable() ) { |
|
185 | + if ( !$this->___isLoadable() ) { |
|
186 | 186 | return; |
187 | 187 | } |
188 | 188 |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |