Completed
Branch dev (69a0d4)
by
unknown
33:44
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_Meta.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
      * Retrieves meta data by given keys and type (user or post).
39 39
      * @return      array
40 40
      */
41
-    static public function getMetaDataByKeys( $iObjectID, $aKeys, $sMetaType='post' ) {
41
+    static public function getMetaDataByKeys( $iObjectID, $aKeys, $sMetaType = 'post' ) {
42 42
                
43 43
         $_aSavedMeta = array();
44 44
                     
45
-        if ( ! $iObjectID ) {
45
+        if ( !$iObjectID ) {
46 46
             return $_aSavedMeta;
47 47
         }
48 48
         
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
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|null
115 115
      */    
116
-    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist=false ) {    
116
+    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist = false ) {    
117 117
 
118
-        if ( ! self::isResourcePath( $sSRC ) ) {
118
+        if ( !self::isResourcePath( $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.
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.
development/factory/admin_page/AdminPageFramework_Model_Form.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
      * @since       3.3.0
71 71
      * @since       3.3.1       Moved from `AdminPageFramework_Setting_Base`.
72 72
      */
73
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
73
+    public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
74 74
 
75 75
         parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain );
76 76
         
77 77
         if ( $this->oProp->bIsAdminAjax ) {
78 78
             return;
79 79
         }
80
-        if ( ! $this->oProp->bIsAdmin ) {
80
+        if ( !$this->oProp->bIsAdmin ) {
81 81
             return;
82 82
         }
83 83
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             'section_title' => null,
128 128
             'section_id'    => null,
129 129
         );
130
-        if ( ! $aFieldset[ 'help' ] ) {
130
+        if ( !$aFieldset[ 'help' ] ) {
131 131
             return;
132 132
         }
133 133
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                 'help_tab_id'               => $_sRootSectionID,
146 146
                 'help_tab_content'          => "<span class='contextual-help-tab-title'>" 
147 147
                         . $aFieldset[ 'title' ] 
148
-                    . "</span> - " . PHP_EOL
148
+                    . "</span> - ".PHP_EOL
149 149
                     . $aFieldset[ 'help' ],
150 150
                 'help_tab_sidebar_content'  => $aFieldset[ 'help_aside' ] 
151 151
                     ? $aFieldset[ 'help_aside' ] 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) {            
180 180
 // @todo Test if help pane item gets displayed        
181 181
 
182
-            foreach( $aSectionsets as $_aSectionset ) {
182
+            foreach ( $aSectionsets as $_aSectionset ) {
183 183
 // @todo check capability and conditions                
184 184
                 $_aSectionset = $_aSectionset + array(
185 185
                     'help'          => null,
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function _replyToDetermineSectionsetVisibility( $bVisible, $aSectionset ) {
215 215
 
216
-        if ( ! current_user_can( $aSectionset[ 'capability' ] ) ) {
216
+        if ( !current_user_can( $aSectionset[ 'capability' ] ) ) {
217 217
             return false;
218 218
         }
219
-        if ( ! $aSectionset[ 'if' ] ) { 
219
+        if ( !$aSectionset[ 'if' ] ) { 
220 220
             return false;
221 221
         }
222
-        if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) { 
222
+        if ( !$this->_isSectionOfCurrentPage( $aSectionset ) ) { 
223 223
             return false;
224 224
         }
225 225
         return $bVisible;
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
         private function _isSectionOfCurrentPage( array $aSectionset ) {
238 238
         
239 239
             // Make sure the value type is string so that when the page_slug is not set, it won't match.
240
-            $_sCurrentPageSlug  = ( string ) $this->oProp->getCurrentPageSlug();
240
+            $_sCurrentPageSlug = ( string ) $this->oProp->getCurrentPageSlug();
241 241
             
242 242
             // Make sure if it's in the loading page.
243
-            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug  ) { 
243
+            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug ) { 
244 244
                 return false; 
245 245
             }
246 246
 
247 247
             // If no tag is specified, the user wants to display the section regardless of the tab.
248
-            if ( ! $aSectionset[ 'tab_slug' ] ) {
248
+            if ( !$aSectionset[ 'tab_slug' ] ) {
249 249
                 return true;
250 250
             }
251 251
                 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     public function _replyToDetermineFieldsetVisibility( $bVisible, $aFieldset ) {
263 263
         
264
-        $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
264
+        $_sCurrentPageSlug = $this->oProp->getCurrentPageSlug();
265 265
         
266 266
         // If the specified field does not exist, do nothing.
267 267
         if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) { 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             array( $_sSectionPath, 'page_slug' ), 
292 292
             null 
293 293
         );        
294
-        $aFieldset[ 'tab_slug' ]        = $this->oUtil->getElement( 
294
+        $aFieldset[ 'tab_slug' ] = $this->oUtil->getElement( 
295 295
             $aSectionsets, 
296 296
             array( $_sSectionPath, 'tab_slug' ), 
297 297
             null 
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
             $aSectionsets,
303 303
             $_sSectionPath
304 304
         );
305
-        $aFieldset[ 'section_title' ]   = $this->oUtil->getElement( 
305
+        $aFieldset[ 'section_title' ] = $this->oUtil->getElement( 
306 306
             $_aSectionset, 
307 307
             'title'
308 308
         );
309
-        $aFieldset[ 'capability' ]   = $aFieldset[ 'capability' ]
309
+        $aFieldset[ 'capability' ] = $aFieldset[ 'capability' ]
310 310
             ? $aFieldset[ 'capability' ]
311 311
             : $this->_replyToGetCapabilityForForm( 
312 312
                 $this->oUtil->getElement( $_aSectionset, 'capability' ),
@@ -355,13 +355,13 @@  discard block
 block discarded – undo
355 355
             
356 356
             // Find the capability of the parent section if nested.
357 357
             if ( 0 < $aSectionset[ '_nested_depth' ] ) {
358
-                $_aSectionPath         = $aSectionset[ '_section_path_array' ];
358
+                $_aSectionPath = $aSectionset[ '_section_path_array' ];
359 359
                 array_pop( $_aSectionPath ); // remove the last element
360 360
                 $_sParentCapability = $this->oUtil->getElement(
361 361
                     $this->oForm->aSectionsets,
362 362
                     array_merge( $_aSectionPath, array( 'capability' ) )
363 363
                 );
364
-                if( $_sParentCapability ) {
364
+                if ( $_sParentCapability ) {
365 365
                     return $_sParentCapability;
366 366
                 }
367 367
             }
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
          * @return      void
177 177
          * @since       DEVVER
178 178
          */
179
-        public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) {            
179
+        public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) {
180 180
 // @todo Test if help pane item gets displayed        
181 181
 
182 182
             foreach( $aSectionsets as $_aSectionset ) {
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
         if ( ! current_user_can( $aSectionset[ 'capability' ] ) ) {
217 217
             return false;
218 218
         }
219
-        if ( ! $aSectionset[ 'if' ] ) { 
219
+        if ( ! $aSectionset[ 'if' ] ) {
220 220
             return false;
221 221
         }
222
-        if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) { 
222
+        if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) {
223 223
             return false;
224 224
         }
225 225
         return $bVisible;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $_sCurrentPageSlug  = ( string ) $this->oProp->getCurrentPageSlug();
241 241
             
242 242
             // Make sure if it's in the loading page.
243
-            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug  ) { 
243
+            if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug  ) {
244 244
                 return false; 
245 245
             }
246 246
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         $_sCurrentPageSlug  = $this->oProp->getCurrentPageSlug();
265 265
         
266 266
         // If the specified field does not exist, do nothing.
267
-        if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) { 
267
+        if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) {
268 268
             return false; 
269 269
         }        
270 270
         return parent::_replyToDetermineFieldsetVisibility( $bVisible, $aFieldset );
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
      */
278 278
     public function _replyToFormatFieldsetDefinition( $aFieldset, $aSectionsets ) {
279 279
         
280
-        if ( empty( $aFieldset ) ) { 
280
+        if ( empty( $aFieldset ) ) {
281 281
             return $aFieldset; 
282 282
         }
283 283
         
Please login to merge, or discard this patch.