Completed
Branch master (5cc763)
by
unknown
24:25 queued 19:39
created
_abstract/utility/base_utility/AdminPageFramework_Utility_VariableType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
      * @since       3.6.3
49 49
      * @return      boolean     If the passed value is not null, true; otherwise, false.
50 50
      */ 
51
-    static public function isNotNull( $mValue=null ) {
52
-        return ! is_null( $mValue );
51
+    static public function isNotNull( $mValue = null ) {
52
+        return !is_null( $mValue );
53 53
     }    
54 54
  
55 55
     /**
Please login to merge, or discard this patch.
factory/_abstract/utility/wp_utility/AdminPageFramework_WPUtility_File.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @since   3.6.2       Supported a text content to be passed to the first parameter.
29 29
      * @access  public
30 30
      */ 
31
-    static public function getScriptData( $sPathOrContent, $sType='plugin', $aDefaultHeaderKeys=array() ) {
31
+    static public function getScriptData( $sPathOrContent, $sType = 'plugin', $aDefaultHeaderKeys = array() ) {
32 32
         
33 33
         $_aHeaderKeys = $aDefaultHeaderKeys + array(
34 34
             // storing array key =>    the comment entry header label
@@ -66,19 +66,19 @@  discard block
 block discarded – undo
66 66
 
67 67
         switch ( trim( $sType ) ) {
68 68
             case 'theme':    
69
-                $aData['sName'] = $aData['sThemeName'];
70
-                $aData['sURI'] = $aData['sThemeURI'];
69
+                $aData[ 'sName' ] = $aData[ 'sThemeName' ];
70
+                $aData[ 'sURI' ] = $aData[ 'sThemeURI' ];
71 71
                 break;
72 72
             case 'library':    
73
-                $aData['sName'] = $aData['sLibraryName'];
74
-                $aData['sURI'] = $aData['sLibraryURI'];
73
+                $aData[ 'sName' ] = $aData[ 'sLibraryName' ];
74
+                $aData[ 'sURI' ] = $aData[ 'sLibraryURI' ];
75 75
                 break;
76 76
             case 'script':    
77
-                $aData['sName'] = $aData['sScriptName'];
77
+                $aData[ 'sName' ] = $aData[ 'sScriptName' ];
78 78
                 break;     
79 79
             case 'plugin':    
80
-                $aData['sName'] = $aData['sPluginName'];
81
-                $aData['sURI'] = $aData['sPluginURI'];
80
+                $aData[ 'sName' ] = $aData[ 'sPluginName' ];
81
+                $aData[ 'sURI' ] = $aData[ 'sPluginURI' ];
82 82
                 break;
83 83
             default:    
84 84
                 break;     
@@ -93,22 +93,22 @@  discard block
 block discarded – undo
93 93
      * @since       3.6.2
94 94
      * @return      array       The script data
95 95
      */
96
-    static public function getScriptDataFromContents( $sContent, $sType='plugin', $aDefaultHeaderKeys=array() ) {
96
+    static public function getScriptDataFromContents( $sContent, $sType = 'plugin', $aDefaultHeaderKeys = array() ) {
97 97
         
98 98
         // Make sure we catch CR-only line endings.
99 99
         $sContent = str_replace( "\r", "\n", $sContent );
100 100
         
101
-        $_aHeaders      = $aDefaultHeaderKeys;
101
+        $_aHeaders = $aDefaultHeaderKeys;
102 102
         if ( $sType ) {
103 103
             $_aExtraHeaders = apply_filters( "extra_{$sType}_headers", array() );
104
-            if ( ! empty( $_aExtraHeaders ) ) {
104
+            if ( !empty( $_aExtraHeaders ) ) {
105 105
                 $_aExtraHeaders = array_combine( $_aExtraHeaders, $_aExtraHeaders ); // keys equal values
106 106
                 $_aHeaders      = array_merge( $_aExtraHeaders, ( array ) $aDefaultHeaderKeys );
107 107
             }
108 108
         } 
109 109
 
110 110
         foreach ( $_aHeaders as $_sHeaderKey => $_sRegex ) {
111
-            $_bFound = preg_match( '/^[ \t\/*#@]*' . preg_quote( $_sRegex, '/' ) . ':(.*)$/mi', $sContent, $_aMatch );
111
+            $_bFound = preg_match( '/^[ \t\/*#@]*'.preg_quote( $_sRegex, '/' ).':(.*)$/mi', $sContent, $_aMatch );
112 112
             $_aHeaders[ $_sHeaderKey ] = $_bFound && $_aMatch[ 1 ]
113 113
                 ? _cleanup_header_comment( $_aMatch[ 1 ] )
114 114
                 : '';        
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
      * @since       3.4.2
126 126
      * @see         download_url() in file.php in core.
127 127
      */
128
-    static public function download( $sURL, $iTimeOut=300 ) {
128
+    static public function download( $sURL, $iTimeOut = 300 ) {
129 129
         
130 130
         if ( false === filter_var( $sURL, FILTER_VALIDATE_URL ) ) {
131 131
             return false;
132 132
         }
133 133
 
134 134
         $_sTmpFileName = self::setTempPath( self::getBaseNameOfURL( $sURL ) );
135
-        if ( ! $_sTmpFileName ) {
135
+        if ( !$_sTmpFileName ) {
136 136
             return false;
137 137
         }
138 138
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return false;
151 151
         }
152 152
 
153
-        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ){
153
+        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ) {
154 154
             unlink( $_sTmpFileName );
155 155
             return false;
156 156
         }
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
      * @since       3.4.2
176 176
      * @return      string      The set file path.
177 177
      */
178
-    static public function setTempPath( $sFilePath='' ) {
178
+    static public function setTempPath( $sFilePath = '' ) {
179 179
         
180 180
         $_sDir = get_temp_dir();
181 181
         
182 182
         $sFilePath = basename( $sFilePath );
183 183
         if ( empty( $sFilePath ) ) {            
184
-            $sFilePath = time() . '.tmp';
184
+            $sFilePath = time().'.tmp';
185 185
         }
186 186
 
187
-        $sFilePath = $_sDir . wp_unique_filename( $_sDir, $sFilePath );
187
+        $sFilePath = $_sDir.wp_unique_filename( $_sDir, $sFilePath );
188 188
         touch( $sFilePath );
189 189
         return $sFilePath;
190 190
         
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      */
198 198
     static public function getBaseNameOfURL( $sURL ) {
199 199
         
200
-        $_sPath         = parse_url( $sURL, PHP_URL_PATH) ; 
200
+        $_sPath         = parse_url( $sURL, PHP_URL_PATH ); 
201 201
         $_sFileBaseName = basename( $_sPath );
202 202
         return $_sFileBaseName;
203 203
         
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return false;
151 151
         }
152 152
 
153
-        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ){
153
+        if ( 200 != wp_remote_retrieve_response_code( $_aoResponse ) ) {
154 154
             unlink( $_sTmpFileName );
155 155
             return false;
156 156
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $_sDir = get_temp_dir();
181 181
         
182 182
         $sFilePath = basename( $sFilePath );
183
-        if ( empty( $sFilePath ) ) {            
183
+        if ( empty( $sFilePath ) ) {
184 184
             $sFilePath = time() . '.tmp';
185 185
         }
186 186
 
Please login to merge, or discard this patch.
factory/_abstract/utility/wp_utility/AdminPageFramework_WPUtility_HTML.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
      
39 39
         $_sQuoteCharactor   = "'";
40 40
         $_aOutput           = array();
41
-        foreach( $aAttributes as $_sAttribute => $_mProperty ) {
41
+        foreach ( $aAttributes as $_sAttribute => $_mProperty ) {
42 42
             if ( is_scalar( $_mProperty ) ) {
43
-                $_aOutput[] = "{$_sAttribute}={$_sQuoteCharactor}" . esc_attr( $_mProperty ) . "{$_sQuoteCharactor}";
43
+                $_aOutput[ ] = "{$_sAttribute}={$_sQuoteCharactor}".esc_attr( $_mProperty )."{$_sQuoteCharactor}";
44 44
             }            
45 45
         }     
46 46
         return implode( ' ', $_aOutput );
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
      * @since       3.6.0
80 80
      * @return      string
81 81
      */
82
-    static public function getHTMLTag( $sTagName, array $aAttributes, $sValue=null ) {
82
+    static public function getHTMLTag( $sTagName, array $aAttributes, $sValue = null ) {
83 83
         $_sTag = tag_escape( $sTagName );
84 84
         return null === $sValue
85
-            ? "<" . $_sTag . " " . self::getAttributes( $aAttributes ) . " />"
86
-            : "<" . $_sTag . " " . self::getAttributes( $aAttributes ) . ">"
85
+            ? "<".$_sTag." ".self::getAttributes( $aAttributes )." />"
86
+            : "<".$_sTag." ".self::getAttributes( $aAttributes ).">"
87 87
                     . $sValue
88 88
                 . "</{$_sTag}>";        
89 89
     }    
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
          * @return      string
94 94
          * @deprecated  3.6.0       Use `getHTMLTag()` instead.
95 95
          */
96
-        static public function generateHTMLTag( $sTagName, array $aAttributes, $sValue=null ) {
96
+        static public function generateHTMLTag( $sTagName, array $aAttributes, $sValue = null ) {
97 97
             return self::getHTMLTag( $sTagName, $aAttributes, $sValue );
98 98
         }
99 99
     
Please login to merge, or discard this patch.
factory/_abstract/utility/wp_utility/AdminPageFramework_WPUtility_Hook.php 3 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      * 
147 147
      * @since       2.0.0
148 148
      */    
149
-    static public function addAndApplyFilters( /* $oCallerObject, $aFilters, $vInput, $vArgs... */ ) { 
149
+    static public function addAndApplyFilters( /* $oCallerObject, $aFilters, $vInput, $vArgs... */ ) {
150 150
             
151 151
         $_aArgs         = func_get_args();    
152 152
         // $oCallerObject  = $_aArgs[ 0 ];
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
      * @param       mixed       $vData              The filtering data
184 184
      * @param       mixed       $vArgs              The arguments.
185 185
      */
186
-    static public function addAndApplyFilter( /* $oCallerObject, $sFilter, $vData, $vArgs... */ ) { 
186
+    static public function addAndApplyFilter( /* $oCallerObject, $sFilter, $vData, $vArgs... */ ) {
187 187
         
188 188
         // Parameters
189 189
         $_iArgs          = func_num_args();
190 190
         $_aArgs          = func_get_args();
191 191
         $_oCallerObject  = $_aArgs[ 0 ];
192 192
         $_sFilter        = $_aArgs[ 1 ];
193
-        if ( ! $_sFilter ) { 
193
+        if ( ! $_sFilter ) {
194 194
             return $_aArgs[ 2 ]; 
195 195
         }
196 196
         
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@  discard block
 block discarded – undo
25 25
      * 
26 26
      * @since       3.4.2
27 27
      * @todo        Create a similar function for filters.
28
+     * @param string $sActionHook
28 29
      */
29 30
     static public function registerAction( $sActionHook, $oCallable ) {
30 31
       
@@ -111,6 +112,8 @@  discard block
 block discarded – undo
111 112
      * @access      public
112 113
      * @since       2.0.0
113 114
      * @remark      Accepts variadic parameters.
115
+     * @param AdminPageFramework_Factory_Router $oCallerObject
116
+     * @param AdminPageFramework_Factory_Router $vArgs1
114 117
      * @return      void
115 118
      */ 
116 119
     static public function addAndDoAction( $oCallerObject, $sActionHook, $vArgs1=null, $vArgs2=null, $_and_more=null ) {
@@ -174,10 +177,6 @@  discard block
 block discarded – undo
174 177
      * `
175 178
      * 
176 179
      * @since       2.0.0
177
-     * @param       object      $oCallerObject
178
-     * @param       string      $sFilter            The filter hook name.
179
-     * @param       mixed       $vData              The filtering data
180
-     * @param       mixed       $vArgs              The arguments.
181 180
      */
182 181
     static public function addAndApplyFilter( /* $oCallerObject, $sFilter, $vData, $vArgs... */ ) { 
183 182
         
@@ -208,6 +207,7 @@  discard block
 block discarded – undo
208 207
      * 
209 208
      * @since       2.0.0
210 209
      * @access      public
210
+     * @param string $sPrefix
211 211
      * @return      array       Returns an array consisting of the filters.
212 212
      */ 
213 213
     static public function getFilterArrayByPrefix( $sPrefix, $sClassName, $sPageSlug, $sTabSlug, $bReverse=false ) {
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
      * @param       mixed       $_and_more      add as many arguments as necessary to the next parameters.
60 60
      * @return      void        does not return a value.
61 61
      */     
62
-    static public function doActions( $aActionHooks, $vArgs1=null, $vArgs2=null, $_and_more=null ) {
62
+    static public function doActions( $aActionHooks, $vArgs1 = null, $vArgs2 = null, $_and_more = null ) {
63 63
         
64 64
         $aArgs          = func_get_args();     
65 65
         $aActionHooks   = $aArgs[ 0 ];
66
-        foreach( ( array ) $aActionHooks as $sActionHook  ) {
66
+        foreach ( ( array ) $aActionHooks as $sActionHook ) {
67 67
             $aArgs[ 0 ] = $sActionHook;
68
-            call_user_func_array( 'do_action' , $aArgs );
68
+            call_user_func_array( 'do_action', $aArgs );
69 69
         }
70 70
 
71 71
     }
@@ -92,15 +92,15 @@  discard block
 block discarded – undo
92 92
      * @param       mixed       $_and_more          add as many arguments as necessary to the next parameters.
93 93
      * @return      void
94 94
      */ 
95
-    static public function addAndDoActions( $oCallerObject, $aActionHooks, $vArgs1=null, $vArgs2=null, $_and_more=null ) {
95
+    static public function addAndDoActions( $oCallerObject, $aActionHooks, $vArgs1 = null, $vArgs2 = null, $_and_more = null ) {
96 96
     
97 97
         $aArgs          = func_get_args();    
98 98
         $oCallerObject  = $aArgs[ 0 ];
99 99
         $aActionHooks   = $aArgs[ 1 ];
100
-        foreach( ( array ) $aActionHooks as $sActionHook ) {
101
-            if ( ! $sActionHook ) { continue; }
100
+        foreach ( ( array ) $aActionHooks as $sActionHook ) {
101
+            if ( !$sActionHook ) { continue; }
102 102
             $aArgs[ 1 ] = $sActionHook;    
103
-            call_user_func_array( array( get_class(), 'addAndDoAction' ) , $aArgs );     
103
+            call_user_func_array( array( get_class(), 'addAndDoAction' ), $aArgs );     
104 104
         }
105 105
         
106 106
     }
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
      * @remark      Accepts variadic parameters.
114 114
      * @return      void
115 115
      */ 
116
-    static public function addAndDoAction( $oCallerObject, $sActionHook, $vArgs1=null, $vArgs2=null, $_and_more=null ) {
116
+    static public function addAndDoAction( $oCallerObject, $sActionHook, $vArgs1 = null, $vArgs2 = null, $_and_more = null ) {
117 117
         
118 118
         $_iArgs          = func_num_args();
119 119
         $_aArgs          = func_get_args();
120 120
         $_oCallerObject  = $_aArgs[ 0 ];
121 121
         $_sActionHook    = $_aArgs[ 1 ];
122
-        if ( ! $_sActionHook ) { return; }
122
+        if ( !$_sActionHook ) { return; }
123 123
         add_action( $_sActionHook, array( $_oCallerObject, $_sActionHook ), 10, $_iArgs - 2 );
124 124
         array_shift( $_aArgs ); // remove the first element, the caller object
125
-        call_user_func_array( 'do_action' , $_aArgs );
125
+        call_user_func_array( 'do_action', $_aArgs );
126 126
         
127 127
     }
128 128
     /**
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
         $_aFilters      = $_aArgs[ 1 ];
150 150
         $_vInput        = $_aArgs[ 2 ];
151 151
 
152
-        foreach( ( array ) $_aFilters as $_sFilter ) {
153
-            if ( ! $_sFilter ) { continue; }
152
+        foreach ( ( array ) $_aFilters as $_sFilter ) {
153
+            if ( !$_sFilter ) { continue; }
154 154
             $_aArgs[ 1 ] = $_sFilter;
155
-            $_aArgs[ 2 ] = $_vInput;    // assigns the updated value as it is filtered in previous iterations
155
+            $_aArgs[ 2 ] = $_vInput; // assigns the updated value as it is filtered in previous iterations
156 156
             $_vInput = call_user_func_array( 
157 157
                 array( get_class(), 'addAndApplyFilter' ), 
158 158
                 $_aArgs 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $_aArgs          = func_get_args();
187 187
         $_oCallerObject  = $_aArgs[ 0 ];
188 188
         $_sFilter        = $_aArgs[ 1 ];
189
-        if ( ! $_sFilter ) { 
189
+        if ( !$_sFilter ) { 
190 190
             return $_aArgs[ 2 ]; 
191 191
         }
192 192
         
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         add_filter( $_sFilter, array( $_oCallerObject, $_sFilter ), 10, $_iArgs - 2 ); 
195 195
         
196 196
         // Remove the first element, the caller object 
197
-        array_shift( $_aArgs );     // removes the caller object     
197
+        array_shift( $_aArgs ); // removes the caller object     
198 198
         
199 199
         // Trigger the magic method __call().
200 200
         return call_user_func_array( 'apply_filters', $_aArgs ); // $_aArgs: $vData, $vArgs...
@@ -210,17 +210,17 @@  discard block
 block discarded – undo
210 210
      * @access      public
211 211
      * @return      array       Returns an array consisting of the filters.
212 212
      */ 
213
-    static public function getFilterArrayByPrefix( $sPrefix, $sClassName, $sPageSlug, $sTabSlug, $bReverse=false ) {
213
+    static public function getFilterArrayByPrefix( $sPrefix, $sClassName, $sPageSlug, $sTabSlug, $bReverse = false ) {
214 214
                 
215 215
         $_aFilters = array();
216 216
         if ( $sTabSlug && $sPageSlug ) {
217
-            $_aFilters[] = "{$sPrefix}{$sPageSlug}_{$sTabSlug}";
217
+            $_aFilters[ ] = "{$sPrefix}{$sPageSlug}_{$sTabSlug}";
218 218
         }
219 219
         if ( $sPageSlug ) {
220
-            $_aFilters[] = "{$sPrefix}{$sPageSlug}";     
220
+            $_aFilters[ ] = "{$sPrefix}{$sPageSlug}";     
221 221
         }
222 222
         if ( $sClassName ) {
223
-            $_aFilters[] = "{$sPrefix}{$sClassName}";
223
+            $_aFilters[ ] = "{$sPrefix}{$sClassName}";
224 224
         }
225 225
         return $bReverse 
226 226
             ? array_reverse( $_aFilters ) 
Please login to merge, or discard this patch.
_abstract/utility/wp_utility/AdminPageFramework_WPUtility_Option.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @since   3.1.3
64 64
      * @since   3.1.5   Added the $vDefault parameter.
65 65
      */    
66
-    static public function getTransient( $sTransientKey, $vDefault=null ) {
66
+    static public function getTransient( $sTransientKey, $vDefault = null ) {
67 67
 
68 68
         // temporarily disable $_wp_using_ext_object_cache
69 69
         global $_wp_using_ext_object_cache;  
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @since       3.1.3
104 104
      * @return      boolean     True if set; otherwise, false.
105 105
      */
106
-    static public function setTransient( $sTransientKey, $vValue, $iExpiration=0 ) {
106
+    static public function setTransient( $sTransientKey, $vValue, $iExpiration = 0 ) {
107 107
 
108 108
         // temporarily disable $_wp_using_ext_object_cache
109 109
         global $_wp_using_ext_object_cache;  
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
          * The method will replace last ending 33 characters if the given string in the first parameter exceeds the limit. So this number must be greater than 33.
142 142
          * @return      string
143 143
          */
144
-        static public function _getCompatibleTransientKey( $sSubject, $iAllowedCharacterLength=45 ) {
144
+        static public function _getCompatibleTransientKey( $sSubject, $iAllowedCharacterLength = 45 ) {
145 145
             
146 146
             // Check if the given string eceees the length limit.
147 147
             if ( strlen( $sSubject ) <= $iAllowedCharacterLength ) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                 0, // start position
156 156
                 $_iPrefixLengthToKeep - 1 // how many characters to extract
157 157
             );
158
-            return $_sPrefixToKeep . '_' . md5( $sSubject );
158
+            return $_sPrefixToKeep.'_'.md5( $sSubject );
159 159
          
160 160
         }    
161 161
     
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * @param   mixed           $vDefault     the default value that will be returned if nothing is stored.
170 170
      * @param   array           $aAdditionalOptions     an additional options array to merge with the options array. 
171 171
      */
172
-    static public function getOption( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array() ) {
172
+    static public function getOption( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array() ) {
173 173
         return self::_getOptionByFunctionName( $sOptionKey, $asKey, $vDefault, $aAdditionalOptions );
174 174
     }
175 175
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @remark  Used in the network admin area.
185 185
      * @return  mixed
186 186
      */
187
-    static public function getSiteOption( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array() ) {
187
+    static public function getSiteOption( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array() ) {
188 188
         return self::_getOptionByFunctionName( $sOptionKey, $asKey, $vDefault, $aAdditionalOptions, 'get_site_option' );        
189 189
     }  
190 190
         /**
@@ -193,16 +193,16 @@  discard block
 block discarded – undo
193 193
          * @since       3.5.3
194 194
          * @return      mixed
195 195
          */
196
-        static private function _getOptionByFunctionName( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array(), $sFunctionName='get_option' ) {
196
+        static private function _getOptionByFunctionName( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array(), $sFunctionName = 'get_option' ) {
197 197
 
198 198
             // Entire options
199
-            if ( ! isset( $asKey ) ) {
199
+            if ( !isset( $asKey ) ) {
200 200
                 $_aOptions = $sFunctionName( 
201 201
                     $sOptionKey,
202 202
                     isset( $vDefault ) 
203 203
                         ? $vDefault 
204 204
                         : array()
205
-                );;
205
+                ); ;
206 206
                 return empty( $aAdditionalOptions ) 
207 207
                     ? $_aOptions
208 208
                     : self::uniteArrays(
Please login to merge, or discard this patch.
utility/wp_utility/AdminPageFramework_WPUtility_SiteInformation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      * @since       3.5.3
53 53
      * @return      string      The site language.
54 54
      */
55
-    static public function getSiteLanguage( $sDefault='en_US' ) {
55
+    static public function getSiteLanguage( $sDefault = 'en_US' ) {
56 56
         return defined( 'WPLANG' ) && WPLANG ? WPLANG : $sDefault;
57 57
     }
58 58
         
Please login to merge, or discard this patch.
utility/wp_utility/AdminPageFramework_WPUtility_SystemInformation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
             
47 47
             $_aItem     = array_values( $_aItem );
48 48
             $_sKey      = array_shift( $_aItem );
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
     static public function getMySQLErrorLogPath() {
64 64
         
65 65
         $_aMySQLInfo = self::getMySQLInfo();
66
-        return isset( $_aMySQLInfo['log_error'] )
67
-            ? $_aMySQLInfo['log_error']
66
+        return isset( $_aMySQLInfo[ 'log_error' ] )
67
+            ? $_aMySQLInfo[ 'log_error' ]
68 68
             : '';
69 69
         
70 70
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * Returns a PHP error log.
74 74
      * @since       3.4.6
75 75
      */
76
-    static public function getMySQLErrorLog( $iLines=1 ) {
76
+    static public function getMySQLErrorLog( $iLines = 1 ) {
77 77
         
78 78
         $_sLog = self::getFileTailContents( self::getMySQLErrorLogPath(), $iLines );
79 79
         
Please login to merge, or discard this patch.
factory/_abstract/utility/wp_utility/AdminPageFramework_WPUtility_URL.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
      * @since       3.6.0       Changed the name from `resolveSRC()`.
114 114
      * @return      string|null
115 115
      */    
116
-    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist=false ) {    
116
+    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist=false ) {
117 117
 
118 118
         if ( ! self::isResourcePath( $sSRC ) ) {
119 119
             return $bReturnNullIfNotExist 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
      */
26 26
     static public function getCurrentAdminURL() {
27 27
         
28
-        $sRequestURI    = $GLOBALS['is_IIS'] ? $_SERVER['PATH_INFO'] : $_SERVER["REQUEST_URI"];
29
-        $sPageURL       = 'on' == @$_SERVER["HTTPS"] ? "https://" : "http://";
28
+        $sRequestURI    = $GLOBALS[ 'is_IIS' ] ? $_SERVER[ 'PATH_INFO' ] : $_SERVER[ "REQUEST_URI" ];
29
+        $sPageURL       = 'on' == @$_SERVER[ "HTTPS" ] ? "https://" : "http://";
30 30
         
31
-        if ( "80" != $_SERVER["SERVER_PORT"] ) {
32
-            $sPageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $sRequestURI;
31
+        if ( "80" != $_SERVER[ "SERVER_PORT" ] ) {
32
+            $sPageURL .= $_SERVER[ "SERVER_NAME" ].":".$_SERVER[ "SERVER_PORT" ].$sRequestURI;
33 33
         } else {
34
-            $sPageURL .= $_SERVER["SERVER_NAME"] . $sRequestURI;
34
+            $sPageURL .= $_SERVER[ "SERVER_NAME" ].$sRequestURI;
35 35
         }
36 36
         return $sPageURL;
37 37
         
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param string $sSubjectURL ( optional ) The subject url to modify
49 49
      * @return string The modified url.
50 50
      */
51
-    static public function getQueryAdminURL( $aAddingQueries=array(), $aRemovingQueryKeys=array(), $sSubjectURL='' ) {
51
+    static public function getQueryAdminURL( $aAddingQueries = array(), $aRemovingQueryKeys = array(), $sSubjectURL = '' ) {
52 52
         
53 53
         $_sAdminURL = is_network_admin()
54 54
             ? network_admin_url( AdminPageFramework_WPUtility_Page::getPageNow() )
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $oWPStyles      = new WP_Styles(); // It doesn't matter whether the file is a style or not. Just use the built-in WordPress class to calculate the SRC URL.
98 98
         $sRelativePath  = AdminPageFramework_Utility::getRelativePath( ABSPATH, $sFilePath );     
99 99
         $sRelativePath  = preg_replace( "/^\.[\/\\\]/", '', $sRelativePath, 1 ); // removes the heading ./ or .\ 
100
-        $sHref          = trailingslashit( $oWPStyles->base_url ) . $sRelativePath;
100
+        $sHref          = trailingslashit( $oWPStyles->base_url ).$sRelativePath;
101 101
         unset( $oWPStyles ); // for PHP 5.2.x or below
102 102
         return esc_url( $sHref );     
103 103
         
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
      * @since       3.6.0       Changed the name from `resolveSRC()`.
114 114
      * @return      string
115 115
      */    
116
-    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist=false ) {    
116
+    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist = false ) {    
117 117
 
118
-        if ( ! $sSRC ) {
118
+        if ( !$sSRC ) {
119 119
             return $bReturnNullIfNotExist 
120 120
                 ? null 
121 121
                 : $sSRC;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         // If the file exists, it means it is an absolute path. If so, calculate the URL from the path.
130 130
         if ( file_exists( realpath( $sSRC ) ) ) {
131
-            return self::getSRCFromPath( $sSRC );   // url escaping is done in the method
131
+            return self::getSRCFromPath( $sSRC ); // url escaping is done in the method
132 132
         }
133 133
         
134 134
         if ( $bReturnNullIfNotExist ) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         /**
143 143
          * @deprecated      3.6.0       Use `getResolvedSRC()` instead.
144 144
          */
145
-        static public function resolveSRC( $sSRC, $bReturnNullIfNotExist=false ) {
145
+        static public function resolveSRC( $sSRC, $bReturnNullIfNotExist = false ) {
146 146
             return self::getResolvedSRC( $sSRC, $bReturnNullIfNotExist );
147 147
         }    
148 148
     
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Model_Page.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
      */         
38 38
     public function _replyToFinalizeInPageTabs() {
39 39
 
40
-        if ( ! $this->oProp->isPageAdded() ) { 
40
+        if ( !$this->oProp->isPageAdded() ) { 
41 41
             return; 
42 42
         }
43 43
 
44
-        foreach( $this->oProp->aPages as $_sPageSlug => $_aPage ) {
44
+        foreach ( $this->oProp->aPages as $_sPageSlug => $_aPage ) {
45 45
             
46
-            if ( ! isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) { 
46
+            if ( !isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) { 
47 47
                 continue; 
48 48
             }
49 49
             
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
          * @since       3.6.0
81 81
          */
82 82
         private function _getDefaultInPageTab( $sPageSlug, $aInPageTabs ) {
83
-            foreach( $aInPageTabs as $_aInPageTab ) {                 
84
-                if ( ! isset( $_aInPageTab[ 'tab_slug' ] ) ) { 
83
+            foreach ( $aInPageTabs as $_aInPageTab ) {                 
84
+                if ( !isset( $_aInPageTab[ 'tab_slug' ] ) ) { 
85 85
                     continue; 
86 86
                 }                
87 87
                 // Regardless of whether it's a hidden tab, it is stored as the default in-page tab.
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
      */         
38 38
     public function _replyToFinalizeInPageTabs() {
39 39
 
40
-        if ( ! $this->oProp->isPageAdded() ) { 
40
+        if ( ! $this->oProp->isPageAdded() ) {
41 41
             return; 
42 42
         }
43 43
 
44 44
         foreach( $this->oProp->aPages as $_sPageSlug => $_aPage ) {
45 45
             
46
-            if ( ! isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) { 
46
+            if ( ! isset( $this->oProp->aInPageTabs[ $_sPageSlug ] ) ) {
47 47
                 continue; 
48 48
             }
49 49
             
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
          * @since       3.6.0
81 81
          */
82 82
         private function _getDefaultInPageTab( $sPageSlug, $aInPageTabs ) {
83
-            foreach( $aInPageTabs as $_aInPageTab ) {                 
84
-                if ( ! isset( $_aInPageTab[ 'tab_slug' ] ) ) { 
83
+            foreach( $aInPageTabs as $_aInPageTab ) {
84
+                if ( ! isset( $_aInPageTab[ 'tab_slug' ] ) ) {
85 85
                     continue; 
86 86
                 }                
87 87
                 // Regardless of whether it's a hidden tab, it is stored as the default in-page tab.
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+         * Admin Page Framework
4
+         * 
5
+         * http://en.michaeluno.jp/admin-page-framework/
6
+         * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+         * 
8
+         */
9 9
 
10 10
 /**
11 11
  * Provides methods to handle importing options.
Please login to merge, or discard this patch.