Completed
Branch master (478c6b)
by
unknown
02:10
created
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_File.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @since   3.6.2       Supported a text content to be passed to the first parameter.
28 28
      * @access  public
29 29
      */
30
-    static public function getScriptData( $sPathOrContent, $sType='plugin', $aDefaultHeaderKeys=array() ) {
30
+    static public function getScriptData( $sPathOrContent, $sType = 'plugin', $aDefaultHeaderKeys = array() ) {
31 31
 
32 32
         $_aHeaderKeys = $aDefaultHeaderKeys + array(
33 33
             // storing array key =>    the comment entry header label
@@ -65,19 +65,19 @@  discard block
 block discarded – undo
65 65
 
66 66
         switch ( trim( $sType ) ) {
67 67
             case 'theme':
68
-                $aData['sName'] = $aData['sThemeName'];
69
-                $aData['sURI'] = $aData['sThemeURI'];
68
+                $aData[ 'sName' ] = $aData[ 'sThemeName' ];
69
+                $aData[ 'sURI' ] = $aData[ 'sThemeURI' ];
70 70
                 break;
71 71
             case 'library':
72
-                $aData['sName'] = $aData['sLibraryName'];
73
-                $aData['sURI'] = $aData['sLibraryURI'];
72
+                $aData[ 'sName' ] = $aData[ 'sLibraryName' ];
73
+                $aData[ 'sURI' ] = $aData[ 'sLibraryURI' ];
74 74
                 break;
75 75
             case 'script':
76
-                $aData['sName'] = $aData['sScriptName'];
76
+                $aData[ 'sName' ] = $aData[ 'sScriptName' ];
77 77
                 break;
78 78
             case 'plugin':
79
-                $aData['sName'] = $aData['sPluginName'];
80
-                $aData['sURI'] = $aData['sPluginURI'];
79
+                $aData[ 'sName' ] = $aData[ 'sPluginName' ];
80
+                $aData[ 'sURI' ] = $aData[ 'sPluginURI' ];
81 81
                 break;
82 82
             default:
83 83
                 break;
@@ -92,22 +92,22 @@  discard block
 block discarded – undo
92 92
      * @since       3.6.2
93 93
      * @return      array       The script data
94 94
      */
95
-    static public function getScriptDataFromContents( $sContent, $sType='plugin', $aDefaultHeaderKeys=array() ) {
95
+    static public function getScriptDataFromContents( $sContent, $sType = 'plugin', $aDefaultHeaderKeys = array() ) {
96 96
 
97 97
         // Make sure we catch CR-only line endings.
98 98
         $sContent = str_replace( "\r", "\n", $sContent );
99 99
 
100
-        $_aHeaders      = $aDefaultHeaderKeys;
100
+        $_aHeaders = $aDefaultHeaderKeys;
101 101
         if ( $sType ) {
102 102
             $_aExtraHeaders = apply_filters( "extra_{$sType}_headers", array() );
103
-            if ( ! empty( $_aExtraHeaders ) ) {
103
+            if ( !empty( $_aExtraHeaders ) ) {
104 104
                 $_aExtraHeaders = array_combine( $_aExtraHeaders, $_aExtraHeaders ); // keys equal values
105 105
                 $_aHeaders      = array_merge( $_aExtraHeaders, ( array ) $aDefaultHeaderKeys );
106 106
             }
107 107
         }
108 108
 
109 109
         foreach ( $_aHeaders as $_sHeaderKey => $_sRegex ) {
110
-            $_bFound = preg_match( '/^[ \t\/*#@]*' . preg_quote( $_sRegex, '/' ) . ':(.*)$/mi', $sContent, $_aMatch );
110
+            $_bFound = preg_match( '/^[ \t\/*#@]*'.preg_quote( $_sRegex, '/' ).':(.*)$/mi', $sContent, $_aMatch );
111 111
             $_aHeaders[ $_sHeaderKey ] = $_bFound && $_aMatch[ 1 ]
112 112
                 ? _cleanup_header_comment( $_aMatch[ 1 ] )
113 113
                 : '';
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
      * @since       3.4.2
125 125
      * @see         download_url() in file.php in core.
126 126
      */
127
-    static public function download( $sURL, $iTimeOut=300 ) {
127
+    static public function download( $sURL, $iTimeOut = 300 ) {
128 128
 
129 129
         if ( false === filter_var( $sURL, FILTER_VALIDATE_URL ) ) {
130 130
             return false;
131 131
         }
132 132
 
133 133
         $_sTmpFileName = self::setTempPath( self::getBaseNameOfURL( $sURL ) );
134
-        if ( ! $_sTmpFileName ) {
134
+        if ( !$_sTmpFileName ) {
135 135
             return false;
136 136
         }
137 137
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             return false;
150 150
         }
151 151
 
152
-        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ){
152
+        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ) {
153 153
             unlink( $_sTmpFileName );
154 154
             return false;
155 155
         }
@@ -174,16 +174,16 @@  discard block
 block discarded – undo
174 174
      * @since       3.4.2
175 175
      * @return      string      The set file path.
176 176
      */
177
-    static public function setTempPath( $sFilePath='' ) {
177
+    static public function setTempPath( $sFilePath = '' ) {
178 178
 
179 179
         $_sDir = get_temp_dir();
180 180
 
181 181
         $sFilePath = basename( $sFilePath );
182 182
         if ( empty( $sFilePath ) ) {
183
-            $sFilePath = time() . '.tmp';
183
+            $sFilePath = time().'.tmp';
184 184
         }
185 185
 
186
-        $sFilePath = $_sDir . wp_unique_filename( $_sDir, $sFilePath );
186
+        $sFilePath = $_sDir.wp_unique_filename( $_sDir, $sFilePath );
187 187
         touch( $sFilePath );
188 188
         return $sFilePath;
189 189
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
             return false;
150 150
         }
151 151
 
152
-        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ){
152
+        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ) {
153 153
             unlink( $_sTmpFileName );
154 154
             return false;
155 155
         }
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         if ( is_string( $_sCustomMenuSlug ) ) {
28 28
             return $_sCustomMenuSlug;
29 29
         }
30
-        return 'edit.php?post_type=' . $sPostTypeSlug;
30
+        return 'edit.php?post_type='.$sPostTypeSlug;
31 31
     }
32 32
 
33 33
     /**
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     static public function getWPAdminDirPath() {
61 61
 
62 62
         $_sWPAdminPath = str_replace(
63
-            get_bloginfo( 'url' ) . '/', // search
64
-            ABSPATH,    // replace
63
+            get_bloginfo( 'url' ).'/', // search
64
+            ABSPATH, // replace
65 65
             get_admin_url() // subject - works even in the network admin
66 66
         );
67 67
         return rtrim( $_sWPAdminPath, '/' );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      * @since       3.7.0
78 78
      * @return      void
79 79
      */
80
-    static public function goToLocalURL( $sURL, $oCallbackOnError=null ) {
80
+    static public function goToLocalURL( $sURL, $oCallbackOnError = null ) {
81 81
         self::redirectByType( $sURL, 1, $oCallbackOnError );
82 82
     }
83 83
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @since       3.7.0      Added the second callback parameter.
89 89
      * @return      void
90 90
      */
91
-    static public function goToURL( $sURL, $oCallbackOnError=null ) {
91
+    static public function goToURL( $sURL, $oCallbackOnError = null ) {
92 92
         self::redirectByType( $sURL, 0, $oCallbackOnError );
93 93
     }
94 94
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param       integer     $iType              0: external site, 1: local site (within the same domain).
99 99
      * @param       callable    $oCallbackOnError
100 100
      */
101
-    static public function redirectByType( $sURL, $iType=0, $oCallbackOnError=null ) {
101
+    static public function redirectByType( $sURL, $iType = 0, $oCallbackOnError = null ) {
102 102
 
103 103
         $_iRedirectError = self::getRedirectPreError( $sURL, $iType );
104 104
         if ( $_iRedirectError && is_callable( $oCallbackOnError ) ) {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     static public function getRedirectPreError( $sURL, $iType ) {
130 130
 
131 131
         // check only externnal urls as local ones can be a relative url and always fails the below check.
132
-        if ( ! $iType && filter_var( $sURL, FILTER_VALIDATE_URL) === false ) {
132
+        if ( !$iType && filter_var( $sURL, FILTER_VALIDATE_URL ) === false ) {
133 133
             return 1;
134 134
         }
135 135
         // If HTTP headers are already sent, redirect cannot be done.
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Log.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @since       3.8.9
25 25
      * @return      void
26 26
      **/
27
-    static protected function _log( $mValue, $sFilePath=null ) {
27
+    static protected function _log( $mValue, $sFilePath = null ) {
28 28
 
29 29
         static $_fPreviousTimeStamp = 0;
30 30
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
                     round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time
53 53
                     $_sCallerClass,
54 54
                     $_sCallerFunction
55
-                ) . PHP_EOL
56
-                . self::_getLegibleDetails( $mValue ) . PHP_EOL . PHP_EOL;
55
+                ).PHP_EOL
56
+                . self::_getLegibleDetails( $mValue ).PHP_EOL.PHP_EOL;
57 57
         }
58 58
         /**
59 59
          * @since       3.8.9
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
          */
62 62
         static private function ___getCallerFunctionName( $oCallerInfo ) {
63 63
             return self::getElement(
64
-                $oCallerInfo,  // subject array
64
+                $oCallerInfo, // subject array
65 65
                 array( 2, 'function' ), // key
66 66
                 ''      // default
67 67
             );
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
          */
73 73
         static private function ___getCallerClassName( $oCallerInfo ) {
74 74
             return self::getElement(
75
-                $oCallerInfo,  // subject array
75
+                $oCallerInfo, // subject array
76 76
                 array( 2, 'class' ), // key
77 77
                 ''      // default
78 78
             );
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
                 return $bsFilePath;
93 93
             }
94 94
             // Return a generated default log path.
95
-            $_sWPContentDir  = WP_CONTENT_DIR . DIRECTORY_SEPARATOR;
95
+            $_sWPContentDir  = WP_CONTENT_DIR.DIRECTORY_SEPARATOR;
96 96
             $_sClassBaseName = $sCallerClass
97 97
                 ? basename( $sCallerClass )
98 98
                 : basename( get_class() );
99
-            return $_sWPContentDir . $_sClassBaseName . '_' . date( "Ymd" ) . '.log';
99
+            return $_sWPContentDir.$_sClassBaseName.'_'.date( "Ymd" ).'.log';
100 100
 
101 101
         }
102 102
             /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
              * @internal
106 106
              */
107 107
             static private function ___createFile( $sFilePath ) {
108
-                if ( ! $sFilePath || true === $sFilePath ) {
108
+                if ( !$sFilePath || true === $sFilePath ) {
109 109
                     return false;
110 110
                 }
111 111
                 if ( file_exists( $sFilePath ) ) {
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
             $_nNow              = $fCurrentTimeStamp + ( self::___getSiteGMTOffset() * 60 * 60 );
128 128
             $_nMicroseconds     = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' );
129 129
             $_aOutput           = array(
130
-                date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds,
130
+                date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds,
131 131
                 self::___getFormattedElapsedTime( $nElapsed ),
132 132
                 self::___getPageLoadID(),
133 133
                 self::getFrameworkVersion(),
134
-                $sCallerClass . '::' . $sCallerFunction,
134
+                $sCallerClass.'::'.$sCallerFunction,
135 135
                 current_filter(),
136 136
                 self::getCurrentURL(),
137 137
             );
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
              */
147 147
             static private function ___getSiteGMTOffset() {
148 148
                 static $_nGMTOffset;
149
-                $_nGMTOffset        = isset( $_nGMTOffset )
149
+                $_nGMTOffset = isset( $_nGMTOffset )
150 150
                     ? $_nGMTOffset
151 151
                     : get_option( 'gmt_offset' );
152 152
                 return $_nGMTOffset;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
              */
158 158
             static private function ___getPageLoadID() {
159 159
                 static $_sPageLoadID;
160
-                $_sPageLoadID       = $_sPageLoadID
160
+                $_sPageLoadID = $_sPageLoadID
161 161
                     ? $_sPageLoadID
162 162
                     : uniqid();
163 163
                 return $_sPageLoadID;
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
                     3,
182 182
                     '0'
183 183
                 );
184
-                $_sElapsed          = self::getElement(
185
-                    $_aElapsedParts,  // subject array
186
-                    0,  // key
184
+                $_sElapsed = self::getElement(
185
+                    $_aElapsedParts, // subject array
186
+                    0, // key
187 187
                     0   // default
188 188
                 );
189
-                $_sElapsed          = strlen( $_sElapsed ) > 1
190
-                    ? '+' . substr( $_sElapsed, -1, 2 )
191
-                    : ' ' . $_sElapsed;
192
-                return $_sElapsed . '.' . $_sElapsedFloat;
189
+                $_sElapsed = strlen( $_sElapsed ) > 1
190
+                    ? '+'.substr( $_sElapsed, -1, 2 )
191
+                    : ' '.$_sElapsed;
192
+                return $_sElapsed.'.'.$_sElapsedFloat;
193 193
 
194 194
             }
195 195
 
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Base.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
      */
38 38
     static protected function _getLegibleDetails( $mValue ) {
39 39
         if ( is_array( $mValue ) ) {
40
-            return '(array, length: ' . count( $mValue ).') '
41
-                . print_r( self::_getLegibleArray( $mValue ) , true );
40
+            return '(array, length: '.count( $mValue ).') '
41
+                . print_r( self::_getLegibleArray( $mValue ), true );
42 42
         }
43 43
         return print_r( self::_getLegibleValue( $mValue ), true );
44 44
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
          */
75 75
         static private function _getObjectName( $mItem ) {
76 76
             if ( is_object( $mItem ) ) {
77
-                return '(object) ' . get_class( $mItem );
77
+                return '(object) '.get_class( $mItem );
78 78
             }
79 79
             return $mItem;
80 80
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
          * @return      string
86 86
          */
87 87
         static private function _getLegibleCallable( $asoCallable ) {
88
-            return '(callable) ' . self::_getCallableName( $asoCallable );
88
+            return '(callable) '.self::_getCallableName( $asoCallable );
89 89
         }
90 90
             /**
91 91
              * @since       3.8.9
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                     ? get_class( $asoCallable[ 0 ] )
105 105
                     : ( string ) $asoCallable[ 0 ];
106 106
 
107
-                return $_sSubject . '::' . ( string ) $asoCallable[ 1 ];
107
+                return $_sSubject.'::'.( string ) $asoCallable[ 1 ];
108 108
 
109 109
             }
110 110
 
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
             if ( method_exists( $oObject, '__toString' ) ) {
119 119
                 return ( string ) $oObject;
120 120
             }
121
-            return '(object) ' . get_class( $oObject ) . ' '
122
-                . count( get_object_vars( $oObject ) ) . ' properties.';
121
+            return '(object) '.get_class( $oObject ).' '
122
+                . count( get_object_vars( $oObject ) ).' properties.';
123 123
 
124 124
         }
125 125
         /**
@@ -157,12 +157,12 @@  discard block
 block discarded – undo
157 157
                         return '(null)';
158 158
                     }
159 159
                     if ( is_object( $mNonScalar ) ) {
160
-                        return '(' . $_sType . ') ' . get_class( $mNonScalar );
160
+                        return '('.$_sType.') '.get_class( $mNonScalar );
161 161
                     }
162 162
                     if ( is_array( $mNonScalar ) ) {
163
-                        return '(' . $_sType . ') ' . count( $mNonScalar ) . ' elements';
163
+                        return '('.$_sType.') '.count( $mNonScalar ).' elements';
164 164
                     }
165
-                    return '(' . $_sType . ') ' . ( string ) $mNonScalar;
165
+                    return '('.$_sType.') '.( string ) $mNonScalar;
166 166
 
167 167
                 }
168 168
                 /**
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
                  */
173 173
                 static private function _getLegibleScalar( $sScalar ) {
174 174
                     if ( is_bool( $sScalar ) ) {
175
-                        return '(boolean) ' . ( $sScalar ? 'true' : 'false' );
175
+                        return '(boolean) '.( $sScalar ? 'true' : 'false' );
176 176
                     }
177 177
                     return is_string( $sScalar )
178 178
                         ? self::_getLegibleString( $sScalar )
179
-                        : '(' . gettype( $sScalar ) . ', length: ' . self::_getValueLength( $sScalar ) .  ') ' . $sScalar;
179
+                        : '('.gettype( $sScalar ).', length: '.self::_getValueLength( $sScalar ).') '.$sScalar;
180 180
                 }
181 181
                     /**
182 182
                      * Returns a length of a value.
@@ -209,8 +209,8 @@  discard block
 block discarded – undo
209 209
                         $iCharLimit     = self::$iLegibleStringCharacterLimit;
210 210
                         $_iCharLength   = call_user_func_array( $_aStrLenMethod[ $_iMBSupport ], array( $sString ) );
211 211
                         return $_iCharLength <= $iCharLimit
212
-                            ? '(string, length: ' . $_iCharLength . ') ' . $sString
213
-                            : '(string, length: ' . $_iCharLength . ') ' . call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) )
212
+                            ? '(string, length: '.$_iCharLength.') '.$sString
213
+                            : '(string, length: '.$_iCharLength.') '.call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) )
214 214
                                 . '...';
215 215
 
216 216
                     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * @return      array
249 249
      * @internal
250 250
      */
251
-    static private function _getSlicedByDepth( array $aSubject, $iDepth=0 ) {
251
+    static private function _getSlicedByDepth( array $aSubject, $iDepth = 0 ) {
252 252
 
253 253
         foreach ( $aSubject as $_sKey => $_vValue ) {
254 254
             if ( is_array( $_vValue ) ) {
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @param       string          $sFilePath      The file path for a log file.
33 33
      * @return      void
34 34
      */
35
-    static public function dump( $asArray, $sFilePath=null ) {
35
+    static public function dump( $asArray, $sFilePath = null ) {
36 36
         echo self::get( $asArray, $sFilePath );
37 37
     }
38 38
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @since       3.8.9
42 42
      * @return      string
43 43
      */
44
-    static public function getDetails( $mValue, $bEscape=true ) {
44
+    static public function getDetails( $mValue, $bEscape = true ) {
45 45
         $_sValueWithDetails = self::_getArrayRepresentationSanitized(
46 46
             self::_getLegibleDetails( $mValue )
47 47
         );
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @param       string          $sFilePath      The file path for a log file.
64 64
      * @param       boolean         $bEscape        Whether to escape characters.
65 65
      */
66
-    static public function get( $asArray, $sFilePath=null, $bEscape=true ) {
66
+    static public function get( $asArray, $sFilePath = null, $bEscape = true ) {
67 67
 
68 68
         if ( $sFilePath ) {
69 69
             self::log( $asArray, $sFilePath );
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @param       string      $sFilePath      The log file path.
96 96
      * @return      void
97 97
      **/
98
-    static public function log( $mValue, $sFilePath=null ) {
98
+    static public function log( $mValue, $sFilePath = null ) {
99 99
         self::_log( $mValue, $sFilePath );
100 100
     }
101 101
 
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
      * @since unknown
110 110
      * @deprecated      3.2.0
111 111
      */
112
-    static public function dumpArray( $asArray, $sFilePath=null ) {
113
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::dump()' );
112
+    static public function dumpArray( $asArray, $sFilePath = null ) {
113
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::dump()' );
114 114
         AdminPageFramework_Debug::dump( $asArray, $sFilePath );
115 115
     }
116 116
 
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
      * @since       3.0.0 Changed the $bEncloseInTag parameter to bEscape.
124 124
      * @deprecated  3.2.0
125 125
      */
126
-    static public function getArray( $asArray, $sFilePath=null, $bEscape=true ) {
127
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::get()' );
126
+    static public function getArray( $asArray, $sFilePath = null, $bEscape = true ) {
127
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::get()' );
128 128
         return AdminPageFramework_Debug::get( $asArray, $sFilePath, $bEscape );
129 129
     }
130 130
 
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
      * @since       3.0.3   Changed the default log location and file name.
136 136
      * @deprecated  3.1.0   Use the `log()` method instead.
137 137
      */
138
-    static public function logArray( $asArray, $sFilePath=null ) {
139
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::log()' );
138
+    static public function logArray( $asArray, $sFilePath = null ) {
139
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::log()' );
140 140
         AdminPageFramework_Debug::log( $asArray, $sFilePath );
141 141
     }
142 142
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @deprecated  3.8.9
150 150
      */
151 151
     static public function getAsString( $mValue ) {
152
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__ );
152
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__ );
153 153
         return self::_getLegible( $mValue );
154 154
     }
155 155
 
Please login to merge, or discard this patch.
development/factory/_common/utility/AdminPageFramework_FrameworkUtility.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @since       3.8.8
23 23
      * @return      void
24 24
      */
25
-    static public function showDeprecationNotice( $sDeprecated, $sAlternative='', $sProgramName='' ) {
25
+    static public function showDeprecationNotice( $sDeprecated, $sAlternative = '', $sProgramName = '' ) {
26 26
         $sProgramName = $sProgramName ? $sProgramName : self::getFrameworkName();
27 27
         parent::showDeprecationNotice( $sDeprecated, $sAlternative, $sProgramName );
28 28
     }
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
             return;
42 42
         }
43 43
 
44
-        foreach( ( array ) $GLOBALS[ '_apf_sub_menus_to_sort' ] as $_sIndex => $_sMenuSlug ) {
45
-            if ( ! isset( $GLOBALS[ 'submenu' ][ $_sMenuSlug ] ) ) {
44
+        foreach ( ( array ) $GLOBALS[ '_apf_sub_menus_to_sort' ] as $_sIndex => $_sMenuSlug ) {
45
+            if ( !isset( $GLOBALS[ 'submenu' ][ $_sMenuSlug ] ) ) {
46 46
                 continue;
47 47
             }
48 48
             ksort( $GLOBALS[ 'submenu' ][ $_sMenuSlug ] );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @param       boolean     $bTrimDevVer           Whether the `.dev` suffix should be removed or not.
68 68
      * @return      string
69 69
      */
70
-    static public function getFrameworkVersion( $bTrimDevVer=false ) {
70
+    static public function getFrameworkVersion( $bTrimDevVer = false ) {
71 71
         $_sVersion = AdminPageFramework_Registry::getVersion();
72 72
         return $bTrimDevVer
73 73
             ? self::getSuffixRemoved( $_sVersion, '.dev' )
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @return      string
96 96
      */
97 97
     static public function getFrameworkNameVersion() {
98
-        return self::getFrameworkName() . ' ' . self::getFrameworkVersion();
98
+        return self::getFrameworkName().' '.self::getFrameworkVersion();
99 99
     }
100 100
 
101 101
 }
Please login to merge, or discard this patch.
factory/_common/utility/admin_notice/AdminPageFramework_AdminNotice.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public $sNotice     = '';
46 46
     public $aAttributes = array();
47 47
     public $aCallbacks  = array(
48
-        'should_show'   => null,    // determines whether the admin notice should be displayed.
48
+        'should_show'   => null, // determines whether the admin notice should be displayed.
49 49
     );
50 50
     /**#@-*/
51 51
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * </ul>
62 62
      * @since       3.5.0
63 63
      */
64
-    public function __construct( $sNotice, array $aAttributes=array( 'class' => 'error' ), array $aCallbacks=array() ) {
64
+    public function __construct( $sNotice, array $aAttributes = array( 'class' => 'error' ), array $aCallbacks = array() ) {
65 65
 
66 66
         $this->aAttributes            = $aAttributes + array(
67 67
             'class' => 'error', // 'updated' etc.
@@ -69,17 +69,17 @@  discard block
 block discarded – undo
69 69
         $this->aAttributes[ 'class' ] = $this->getClassAttribute(
70 70
             $this->aAttributes[ 'class' ],
71 71
             'admin-page-framework-settings-notice-message',
72
-            'admin-page-framework-settings-notice-container',   // Moved from `AdminPageFramework_Factory_View`.
72
+            'admin-page-framework-settings-notice-container', // Moved from `AdminPageFramework_Factory_View`.
73 73
             'notice',
74 74
             'is-dismissible'    // 3.5.12+
75 75
         );
76
-        $this->aCallbacks             = $aCallbacks + $this->aCallbacks;
76
+        $this->aCallbacks = $aCallbacks + $this->aCallbacks;
77 77
 
78 78
         // Load resources.
79 79
         new AdminPageFramework_AdminNotice___Script;
80 80
 
81 81
         // An empty value may be set in oreder only to laode the fade-in script.
82
-        if ( ! $sNotice ) {
82
+        if ( !$sNotice ) {
83 83
             return;
84 84
         }
85 85
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
          */
108 108
         public function _replyToDisplayAdminNotice() {
109 109
 
110
-            if ( ! $this->_shouldProceed() ) {
110
+            if ( !$this->_shouldProceed() ) {
111 111
                 return;
112 112
             }
113 113
 
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
                 'display: none'
119 119
             );
120 120
 
121
-            echo "<div " . $this->getAttributes( $_aAttributes ) . ">"
121
+            echo "<div ".$this->getAttributes( $_aAttributes ).">"
122 122
                     . "<p>"
123 123
                         . self::$_aNotices[ $this->sNotice ]
124 124
                     . "</p>"
125 125
                 . "</div>"
126 126
                 // Insert the same message except it is not hidden.
127 127
                 . "<noscript>"
128
-                    . "<div " . $this->getAttributes( $this->aAttributes ) . ">"
128
+                    . "<div ".$this->getAttributes( $this->aAttributes ).">"
129 129
                         . "<p>"
130 130
                             . self::$_aNotices[ $this->sNotice ]
131 131
                         . "</p>"
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
              */
144 144
             private function _shouldProceed() {
145 145
 
146
-                if ( ! is_callable( $this->aCallbacks[ 'should_show' ] ) ) {
146
+                if ( !is_callable( $this->aCallbacks[ 'should_show' ] ) ) {
147 147
                     return true;
148 148
                 }
149 149
                 return call_user_func_array(
Please login to merge, or discard this patch.
development/factory/_common/utility/AdminPageFramework_ErrorReporting.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     private $_iLevel;
39 39
 
40
-    public function __construct( $iLevel=null ) {
40
+    public function __construct( $iLevel = null ) {
41 41
         $this->_iLevel = null !== $iLevel
42 42
             ? $iLeevl
43 43
             : error_reporting();
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
         private function _getIncluded() {
57 57
 
58 58
             $_aIncluded = array();
59
-            foreach( $this->_aLevels as $_iLevel => $iLevelText ) {
59
+            foreach ( $this->_aLevels as $_iLevel => $iLevelText ) {
60 60
 
61 61
                 // This is where we check if a level was used or not
62 62
                 if ( $this->_iLevel & $_iLevel ) {
63
-                    $_aIncluded[] = $_iLevel;
63
+                    $_aIncluded[ ] = $_iLevel;
64 64
                 }
65 65
 
66 66
             }
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
             $_aValues       = array();
75 75
 
76 76
             if ( count( $aIncluded ) > $_iAll / 2 ) {
77
-                $_aValues[] = 'E_ALL';
78
-                foreach( $this->_aLevels as $_iLevel => $iLevelText ) {
79
-                    if ( ! in_array( $_iLevel, $aIncluded ) ) {
80
-                        $_aValues[] = $iLevelText;
77
+                $_aValues[ ] = 'E_ALL';
78
+                foreach ( $this->_aLevels as $_iLevel => $iLevelText ) {
79
+                    if ( !in_array( $_iLevel, $aIncluded ) ) {
80
+                        $_aValues[ ] = $iLevelText;
81 81
                     }
82 82
                 }
83 83
                 return implode( ' & ~', $_aValues );
84 84
             }
85
-            foreach( $aIncluded as $_iLevel ) {
86
-                $_aValues[] = $this->_aLevels[ $_iLevel ];
85
+            foreach ( $aIncluded as $_iLevel ) {
86
+                $_aValues[ ] = $this->_aLevels[ $_iLevel ];
87 87
             }
88 88
             return implode( ' | ', $_aValues );
89 89
 
Please login to merge, or discard this patch.
development/factory/_common/form/AdminPageFramework_Form_View.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.