Completed
Branch dev (2df6d2)
by
unknown
34s
created
development/factory/term_meta/AdminPageFramework_TermMeta.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param       string          The text domain. Default: `admin-page-framework`.
46 46
      * @return      void
47 47
      */
48
-    public function __construct( $asTaxonomySlug, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
48
+    public function __construct( $asTaxonomySlug, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
49 49
 
50 50
         if ( empty( $asTaxonomySlug ) ) {
51 51
             return;
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
         // Properties
55 55
         $_sPropertyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
56 56
             ? $this->aSubClassNames[ 'oProp' ]
57
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;
58
-        $this->oProp        = new $_sPropertyClassName(
57
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;
58
+        $this->oProp = new $_sPropertyClassName(
59 59
             $this,
60 60
             get_class( $this ),
61 61
             $sCapability,
62 62
             $sTextDomain,
63 63
             $this->_sStructureType
64 64
         );
65
-        $this->oProp->aTaxonomySlugs    = ( array ) $asTaxonomySlug;
65
+        $this->oProp->aTaxonomySlugs = ( array ) $asTaxonomySlug;
66 66
 
67 67
         parent::__construct( $this->oProp );
68 68
 
Please login to merge, or discard this patch.
factory/_common/utility/base_utility/AdminPageFramework_Utility_URL.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             0 => '',
53 53
             1 => 's',
54 54
         );
55
-        $_sProtocol         = substr( $_sServerProtocol, 0, strpos( $_sServerProtocol, '/' ) )
55
+        $_sProtocol = substr( $_sServerProtocol, 0, strpos( $_sServerProtocol, '/' ) )
56 56
             . $_aProtocolSuffix[ ( int ) $_bSSL ];
57 57
 
58 58
         // Port: e.g. :80
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
                 ? $_SERVER[ 'HTTP_HOST' ]
66 66
                 : $_SERVER[ 'SERVER_NAME' ]
67 67
             );
68
-        $_sHost             = preg_replace( '/:.+/', '', $_sHost ); // remove the port part in case it is added.
69
-        return $_sProtocol . '://' . $_sHost . $_sPort . $_SERVER[ 'REQUEST_URI' ];
68
+        $_sHost = preg_replace( '/:.+/', '', $_sHost ); // remove the port part in case it is added.
69
+        return $_sProtocol.'://'.$_sHost.$_sPort.$_SERVER[ 'REQUEST_URI' ];
70 70
 
71 71
     }
72 72
         /**
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
                 ? ( string ) $_SERVER[ 'SERVER_PORT' ]
81 81
                 : '';
82 82
             $_aPort     = array(
83
-                0 => ':' . $_sPort,
83
+                0 => ':'.$_sPort,
84 84
                 1 => '',
85 85
             );
86
-            $_bPortSet  = ( ! $bSSL && '80' === $_sPort ) || ( $bSSL && '443' === $_sPort );
86
+            $_bPortSet = ( !$bSSL && '80' === $_sPort ) || ( $bSSL && '443' === $_sPort );
87 87
             return $_aPort[ ( int ) $_bPortSet ];
88 88
         }
89 89
 
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         if ( is_string( $_sCustomMenuSlug ) ) {
30 30
             return $_sCustomMenuSlug;
31 31
         }
32
-        return 'edit.php?post_type=' . $sPostTypeSlug;
32
+        return 'edit.php?post_type='.$sPostTypeSlug;
33 33
     }
34 34
 
35 35
     /**
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
     static public function getWPAdminDirPath() {
64 64
 
65 65
         $_sWPAdminPath = str_replace(
66
-            get_bloginfo( 'url' ) . '/', // search
67
-            ABSPATH,    // replace
66
+            get_bloginfo( 'url' ).'/', // search
67
+            ABSPATH, // replace
68 68
             get_admin_url() // subject - works even in the network admin
69 69
         );
70 70
         return rtrim( $_sWPAdminPath, '/' );
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @since       3.7.0
83 83
      * @return      void
84 84
      */
85
-    static public function goToLocalURL( $sURL, $oCallbackOnError=null ) {
85
+    static public function goToLocalURL( $sURL, $oCallbackOnError = null ) {
86 86
         self::redirectByType( $sURL, 1, $oCallbackOnError );
87 87
     }
88 88
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @since       3.6.3
96 96
      * @since       3.7.0      Added the second callback parameter.
97 97
      */
98
-    static public function goToURL( $sURL, $oCallbackOnError=null ) {
98
+    static public function goToURL( $sURL, $oCallbackOnError = null ) {
99 99
         self::redirectByType( $sURL, 0, $oCallbackOnError );
100 100
     }
101 101
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      * @param       integer     $iType              0: external site, 1: local site (within the same domain).
106 106
      * @param       callable    $oCallbackOnError
107 107
      */
108
-    static public function redirectByType( $sURL, $iType=0, $oCallbackOnError=null ) {
108
+    static public function redirectByType( $sURL, $iType = 0, $oCallbackOnError = null ) {
109 109
 
110 110
         $_iRedirectError = self::getRedirectPreError( $sURL, $iType );
111 111
         if ( $_iRedirectError && is_callable( $oCallbackOnError ) ) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     static public function getRedirectPreError( $sURL, $iType ) {
137 137
 
138 138
         // check only external urls as local ones can be a relative url and always fails the below check.
139
-        if ( ! $iType && filter_var( $sURL, FILTER_VALIDATE_URL) === false ) {
139
+        if ( !$iType && filter_var( $sURL, FILTER_VALIDATE_URL ) === false ) {
140 140
             return 1;
141 141
         }
142 142
         // If HTTP headers are already sent, redirect cannot be done.
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_URL.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
         $sPageURL       = 'on' == @$_SERVER[ "HTTPS" ] ? "https://" : "http://";
30 30
 
31 31
         if ( "80" != $_SERVER[ "SERVER_PORT" ] ) {
32
-            $sPageURL .= $_SERVER[ "SERVER_NAME" ] . ":" . $_SERVER[ "SERVER_PORT" ] . $sRequestURI;
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() )
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $_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.
100 100
         $_sRelativePath  = AdminPageFramework_Utility::getRelativePath( preg_replace( '/[\/\\\\]wp-content$/', '', rtrim( WP_CONTENT_DIR, '/\\' ) ), $sFilePath );
101 101
         $_sRelativePath  = preg_replace( "/^\.[\/\\\]/", '', $_sRelativePath, 1 ); // removes the heading ./ or .\
102
-        $_sHref          = trailingslashit( $_oWPStyles->base_url ) . $_sRelativePath;
102
+        $_sHref          = trailingslashit( $_oWPStyles->base_url ).$_sRelativePath;
103 103
         unset( $_oWPStyles ); // for PHP 5.2.x or below
104 104
         return $_sHref;
105 105
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
      * @param       string      $sSRC
119 119
      * @param       boolean     $bReturnNullIfNotExist
120 120
      */
121
-    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist=false ) {
121
+    static public function getResolvedSRC( $sSRC, $bReturnNullIfNotExist = false ) {
122 122
 
123
-        if ( ! self::isResourcePath( $sSRC ) ) {
123
+        if ( !self::isResourcePath( $sSRC ) ) {
124 124
             return $bReturnNullIfNotExist
125 125
                 ? null
126 126
                 : $sSRC;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         // If the file exists, it means it is an absolute path. If so, calculate the URL from the path.
135 135
         if ( file_exists( realpath( $sSRC ) ) ) {
136
-            return self::getSRCFromPath( $sSRC );   // url escaping is done in the method
136
+            return self::getSRCFromPath( $sSRC ); // url escaping is done in the method
137 137
         }
138 138
 
139 139
         if ( $bReturnNullIfNotExist ) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
          * @param boolean $bReturnNullIfNotExist
151 151
          * @return string
152 152
          */
153
-        static public function resolveSRC( $sSRC, $bReturnNullIfNotExist=false ) {
153
+        static public function resolveSRC( $sSRC, $bReturnNullIfNotExist = false ) {
154 154
             return self::getResolvedSRC( $sSRC, $bReturnNullIfNotExist );
155 155
         }
156 156
 
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_Option.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param   array|string    $asPrefixes
37 37
      * @retuen  void
38 38
      */
39
-    public static function cleanTransients( $asPrefixes=array( 'apf' ) ) {
39
+    public static function cleanTransients( $asPrefixes = array( 'apf' ) ) {
40 40
 
41 41
         $_aPrefixes = self::getAsArray( $asPrefixes );
42 42
         if ( self::isNetworkAdmin() ) {
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
         /**
47 47
          * @var wpdb
48 48
          */
49
-        $_oWPDB     = $GLOBALS[ 'wpdb' ];
50
-        foreach( $_aPrefixes as $_sPrefix ) {
49
+        $_oWPDB = $GLOBALS[ 'wpdb' ];
50
+        foreach ( $_aPrefixes as $_sPrefix ) {
51 51
             $_sSQLQuery = "DELETE FROM `{$_oWPDB->options}` "
52 52
                 . "WHERE `option_name` "
53
-                . "LIKE ( '_transient_%{$_sPrefix}%' )";    // this also matches _transient_timeout_{prefix}
53
+                . "LIKE ( '_transient_%{$_sPrefix}%' )"; // this also matches _transient_timeout_{prefix}
54 54
             $_oWPDB->query( $_sSQLQuery );
55 55
         }
56 56
 
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
         /**
67 67
          * @var wpdb
68 68
          */
69
-        $_oWPDB     = $GLOBALS[ 'wpdb' ];
70
-        foreach( $_aPrefixes as $_sPrefix ) {
69
+        $_oWPDB = $GLOBALS[ 'wpdb' ];
70
+        foreach ( $_aPrefixes as $_sPrefix ) {
71 71
             $_sSQLQuery = "DELETE FROM `{$_oWPDB->sitemeta}` "
72 72
                 . "WHERE "
73 73
                 // this matches _site_transient_timeout_{...} as well
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @return array
83 83
      * @since  3.8.23
84 84
      */
85
-    static public function getTransientAsArray( $sTransientKey, $mDefault=null ) {
85
+    static public function getTransientAsArray( $sTransientKey, $mDefault = null ) {
86 86
         return self::getAsArray(
87 87
             self::getTransient( $sTransientKey, $mDefault )
88 88
         );
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @return array
95 95
      * @since  3.8.23
96 96
      */
97
-    static public function getTransientWithoutCacheAsArray( $sTransientKey, $mDefault=null ) {
97
+    static public function getTransientWithoutCacheAsArray( $sTransientKey, $mDefault = null ) {
98 98
         return self::getAsArray(
99 99
             self::getTransientWithoutCache( $sTransientKey, $mDefault )
100 100
         );
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
      * @sicne   3.8.23
112 112
      * @return  mixed|false `false` on failing to retrieve the transient value.
113 113
      */
114
-    static public function getTransientWithoutCache( $sTransientKey, $mDefault=null ) {
114
+    static public function getTransientWithoutCache( $sTransientKey, $mDefault = null ) {
115 115
 
116
-        $sTransientKey  = self::_getCompatibleTransientKey( $sTransientKey );
116
+        $sTransientKey = self::_getCompatibleTransientKey( $sTransientKey );
117 117
         if ( self::isNetworkAdmin() ) {
118 118
             return self::getTransientWithoutCacheForNetwork( $sTransientKey, $mDefault );
119 119
         }
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
         $_mData = $_oWPDB->get_var(
132 132
             $_oWPDB->prepare(
133 133
                 $_sSQLQuery,
134
-                '_transient_' . $sTransientKey,
135
-                '_transient_timeout_' . $sTransientKey
134
+                '_transient_'.$sTransientKey,
135
+                '_transient_timeout_'.$sTransientKey
136 136
             )
137 137
         );
138 138
         return is_null( $_mData ) ? $mDefault : maybe_unserialize( $_mData );
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @since   3.8.23
146 146
      * @return  mixed
147 147
      */
148
-    static public function getTransientWithoutCacheForNetwork($sTransientKey, $mDefault ) {
148
+    static public function getTransientWithoutCacheForNetwork( $sTransientKey, $mDefault ) {
149 149
 
150 150
         /**
151 151
          * @var wpdb $_oWPDB
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
         $_mData = $_oWPDB->get_var(
162 162
             $_oWPDB->prepare(
163 163
                 $_sSQLQuery,
164
-                '_site_transient_' . $sTransientKey,
165
-                '_site_transient_timeout_' . $sTransientKey,
164
+                '_site_transient_'.$sTransientKey,
165
+                '_site_transient_timeout_'.$sTransientKey,
166 166
                 get_current_network_id()
167 167
             )
168 168
         );
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             0 => 'delete_transient',
196 196
             1 => 'delete_site_transient',
197 197
         );
198
-        $_vTransient     = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
198
+        $_vTransient = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
199 199
 
200 200
         // reset prior value of $_wp_using_ext_object_cache
201 201
         $_wp_using_ext_object_cache = $_bWpUsingExtObjectCacheTemp;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * @param   mixed   $vDefault
212 212
      * @return  mixed
213 213
      */
214
-    static public function getTransient( $sTransientKey, $vDefault=null ) {
214
+    static public function getTransient( $sTransientKey, $vDefault = null ) {
215 215
 
216 216
         // Temporarily disable $_wp_using_ext_object_cache
217 217
         global $_wp_using_ext_object_cache;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             0 => 'get_transient',
224 224
             1 => 'get_site_transient',
225 225
         );
226
-        $_vTransient     = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
226
+        $_vTransient = $_aFunctionNames[ ( integer ) self::isNetworkAdmin() ]( $sTransientKey );
227 227
 
228 228
         // Restore the prior value of `$_wp_using_ext_object_cache`.
229 229
         $_wp_using_ext_object_cache = $_bWpUsingExtObjectCacheTemp;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      * @param       mixed       $vValue
246 246
      * @param       integer     $iExpiration
247 247
      */
248
-    static public function setTransient( $sTransientKey, $vValue, $iExpiration=0 ) {
248
+    static public function setTransient( $sTransientKey, $vValue, $iExpiration = 0 ) {
249 249
 
250 250
         // Temporarily disable `$_wp_using_ext_object_cache`.
251 251
         global $_wp_using_ext_object_cache;
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
          * @return      string
277 277
          * @todo it is said as of WordPress 4.3, it will be 255 since the database table column type becomes VARCHAR(255).
278 278
          */
279
-        static public function _getCompatibleTransientKey( $sSubject, $iDeprecated=null ) {
279
+        static public function _getCompatibleTransientKey( $sSubject, $iDeprecated = null ) {
280 280
 
281 281
             $_iAllowedCharacterLength = isset( $iDeprecated )
282 282
                 ? $iDeprecated
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                 0, // start position
295 295
                 $_iPrefixLengthToKeep - 1 // how many characters to extract
296 296
             );
297
-            return $_sPrefixToKeep . '_' . md5( $sSubject );
297
+            return $_sPrefixToKeep.'_'.md5( $sSubject );
298 298
 
299 299
         }
300 300
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      * @param   array           $aAdditionalOptions     an additional options array to merge with the options array.
310 310
      * @return  mixed
311 311
      */
312
-    static public function getOption( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array() ) {
312
+    static public function getOption( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array() ) {
313 313
         return self::_getOptionByFunctionName( $sOptionKey, $asKey, $vDefault, $aAdditionalOptions );
314 314
     }
315 315
     /**
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
      * @remark  Used in the network admin area.
325 325
      * @return  mixed
326 326
      */
327
-    static public function getSiteOption( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array() ) {
327
+    static public function getSiteOption( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array() ) {
328 328
         return self::_getOptionByFunctionName( $sOptionKey, $asKey, $vDefault, $aAdditionalOptions, 'get_site_option' );
329 329
     }
330 330
 
@@ -340,16 +340,16 @@  discard block
 block discarded – undo
340 340
          * @return      mixed
341 341
          * @since       3.5.3
342 342
          */
343
-        static private function _getOptionByFunctionName( $sOptionKey, $asKey=null, $vDefault=null, array $aAdditionalOptions=array(), $sFunctionName='get_option' ) {
343
+        static private function _getOptionByFunctionName( $sOptionKey, $asKey = null, $vDefault = null, array $aAdditionalOptions = array(), $sFunctionName = 'get_option' ) {
344 344
 
345 345
             // Entire options
346
-            if ( ! isset( $asKey ) ) {
346
+            if ( !isset( $asKey ) ) {
347 347
                 $_aOptions = $sFunctionName(
348 348
                     $sOptionKey,
349 349
                     isset( $vDefault )
350 350
                         ? $vDefault
351 351
                         : array()
352
-                );;
352
+                ); ;
353 353
                 return empty( $aAdditionalOptions )
354 354
                     ? $_aOptions
355 355
                     : self::uniteArrays(
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug_Log.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @since       3.8.9
29 29
      * @return      void
30 30
      **/
31
-    static protected function _log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) {
31
+    static protected function _log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) {
32 32
 
33 33
         static $_fPreviousTimeStamp = 0;
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $_sCallerClass      = self::___getCallerClassName( $_oCallerInfo, $iTrace );
38 38
         $_fCurrentTimeStamp = microtime( true );
39 39
         $_sLogContent       = self::___getLogContents( $mValue, $_fCurrentTimeStamp, $_fPreviousTimeStamp, $_sCallerClass, $_sCallerFunction, $iStringLengthLimit, $iArrayDepthLimit )
40
-            . ( $bStackTrace ? self::getStackTrace($iTrace + 1 ) : '' )
40
+            . ( $bStackTrace ? self::getStackTrace( $iTrace + 1 ) : '' )
41 41
             . PHP_EOL;
42 42
 
43 43
         file_put_contents( self::___getLogFilePath( $sFilePath, $_sCallerClass ), $_sLogContent, FILE_APPEND );
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
                     round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time
55 55
                     $_sCallerClass,
56 56
                     $_sCallerFunction
57
-                ) . PHP_EOL
58
-                . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) . PHP_EOL;
57
+                ).PHP_EOL
58
+                . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ).PHP_EOL;
59 59
         }
60 60
         /**
61 61
          * @since       3.8.9
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          */
64 64
         static private function ___getCallerFunctionName( $oCallerInfo, $iTrace ) {
65 65
             return self::getElement(
66
-                $oCallerInfo,  // subject array
66
+                $oCallerInfo, // subject array
67 67
                 array( 2 + $iTrace, 'function' ), // key
68 68
                 ''      // default
69 69
             );
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
          */
75 75
         static private function ___getCallerClassName( $oCallerInfo, $iTrace ) {
76 76
             return self::getElement(
77
-                $oCallerInfo,  // subject array
77
+                $oCallerInfo, // subject array
78 78
                 array( 2 + $iTrace, 'class' ), // key
79 79
                 ''      // default
80 80
             );
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
          */
90 90
         static private function ___getLogFilePath( $bsFilePathOrName, $sCallerClass ) {
91 91
 
92
-            $_sWPContentDir  = WP_CONTENT_DIR . DIRECTORY_SEPARATOR;
92
+            $_sWPContentDir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR;
93 93
 
94 94
             // It is a partial file name
95
-            if ( is_string( $bsFilePathOrName ) && ! self::hasSlash( $bsFilePathOrName ) ) {
96
-                return $_sWPContentDir . $bsFilePathOrName . '_' . date( "Ymd" ) . '.log';
95
+            if ( is_string( $bsFilePathOrName ) && !self::hasSlash( $bsFilePathOrName ) ) {
96
+                return $_sWPContentDir.$bsFilePathOrName.'_'.date( "Ymd" ).'.log';
97 97
             }
98 98
 
99 99
             // Try creating a file.
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
             // Return a generated default log path.
108 108
             $_sClassBaseName = $sCallerClass ? basename( $sCallerClass ) : basename( get_class() );
109
-            return $_sWPContentDir . $_sClassBaseName . '_' . date( "Ymd" ) . '.log';
109
+            return $_sWPContentDir.$_sClassBaseName.'_'.date( "Ymd" ).'.log';
110 110
 
111 111
         }
112 112
             /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
              * @internal
116 116
              */
117 117
             static private function ___createFile( $sFilePath ) {
118
-                if ( ! $sFilePath || true === $sFilePath ) {
118
+                if ( !$sFilePath || true === $sFilePath ) {
119 119
                     return false;
120 120
                 }
121 121
                 if ( file_exists( $sFilePath ) ) {
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
             $_nNow              = $fCurrentTimeStamp + ( self::___getSiteGMTOffset() * 60 * 60 );
138 138
             $_nMicroseconds     = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' );
139 139
             $_aOutput           = array(
140
-                date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds,
140
+                date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds,
141 141
                 self::___getFormattedElapsedTime( $nElapsed ),
142 142
                 self::___getPageLoadID(),
143 143
                 self::getFrameworkVersion(),
144
-                $sCallerClass . '::' . $sCallerFunction,
144
+                $sCallerClass.'::'.$sCallerFunction,
145 145
                 current_filter(),
146 146
                 self::getCurrentURL(),
147 147
             );
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
              */
157 157
             static private function ___getSiteGMTOffset() {
158 158
                 static $_nGMTOffset;
159
-                $_nGMTOffset        = isset( $_nGMTOffset )
159
+                $_nGMTOffset = isset( $_nGMTOffset )
160 160
                     ? $_nGMTOffset
161 161
                     : get_option( 'gmt_offset' );
162 162
                 return $_nGMTOffset;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
              */
168 168
             static private function ___getPageLoadID() {
169 169
                 static $_sPageLoadID;
170
-                $_sPageLoadID       = $_sPageLoadID
170
+                $_sPageLoadID = $_sPageLoadID
171 171
                     ? $_sPageLoadID
172 172
                     : uniqid();
173 173
                 return $_sPageLoadID;
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
                     3,
192 192
                     '0'
193 193
                 );
194
-                $_sElapsed          = self::getElement(
195
-                    $_aElapsedParts,  // subject array
196
-                    0,  // key
194
+                $_sElapsed = self::getElement(
195
+                    $_aElapsedParts, // subject array
196
+                    0, // key
197 197
                     0   // default
198 198
                 );
199
-                $_sElapsed          = strlen( $_sElapsed ) > 1
200
-                    ? '+' . substr( $_sElapsed, -1, 2 )
201
-                    : ' ' . $_sElapsed;
202
-                return $_sElapsed . '.' . $_sElapsedFloat;
199
+                $_sElapsed = strlen( $_sElapsed ) > 1
200
+                    ? '+'.substr( $_sElapsed, -1, 2 )
201
+                    : ' '.$_sElapsed;
202
+                return $_sElapsed.'.'.$_sElapsedFloat;
203 203
 
204 204
             }
205 205
 
Please login to merge, or discard this patch.
development/factory/_common/utility/debug/AdminPageFramework_Debug.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param       integer         $iArrayDepthLimit
36 36
      * @return      void
37 37
      */
38
-    static public function dump( $asArray, $sFilePath=null, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
38
+    static public function dump( $asArray, $sFilePath = null, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
39 39
         echo self::get( $asArray, $sFilePath, true, $bStackTrace, $iStringLengthLimit, $iArrayDepthLimit );
40 40
     }
41 41
 
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
      * @since       3.8.9
45 45
      * @return      string
46 46
      */
47
-    static public function getDetails( $mValue, $bEscape=true, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
47
+    static public function getDetails( $mValue, $bEscape = true, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
48 48
         $_sValueWithDetails = self::_getArrayRepresentationSanitized(
49 49
             self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit )
50 50
         );
51 51
         $_sValueWithDetails = $bStackTrace
52
-            ? $_sValueWithDetails . PHP_EOL . self::getStackTrace()
52
+            ? $_sValueWithDetails.PHP_EOL.self::getStackTrace()
53 53
             : $_sValueWithDetails;
54 54
         return $bEscape
55 55
             ? "<pre class='dump-array'>"
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param       integer         $iArrayDepthLimit
76 76
      * @return      string
77 77
      */
78
-    static public function get( $asArray, $sFilePath=null, $bEscape=true, $bStackTrace=false, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) {
78
+    static public function get( $asArray, $sFilePath = null, $bEscape = true, $bStackTrace = false, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) {
79 79
 
80 80
         if ( $sFilePath ) {
81 81
             self::log( $asArray, $sFilePath );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @param       integer     $iArrayDepthLimit   The depth limit for arrays.*
118 118
      * @return      void
119 119
      **/
120
-    static public function log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) {
120
+    static public function log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) {
121 121
         self::_log( $mValue, $sFilePath, $bStackTrace, $iTrace, $iStringLengthLimit, $iArrayDepthLimit );
122 122
     }
123 123
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
      * @since unknown
132 132
      * @deprecated      3.2.0
133 133
      */
134
-    static public function dumpArray( $asArray, $sFilePath=null ) {
135
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::dump()' );
134
+    static public function dumpArray( $asArray, $sFilePath = null ) {
135
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::dump()' );
136 136
         AdminPageFramework_Debug::dump( $asArray, $sFilePath );
137 137
     }
138 138
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
      * @since       3.0.0 Changed the $bEncloseInTag parameter to bEscape.
146 146
      * @deprecated  3.2.0
147 147
      */
148
-    static public function getArray( $asArray, $sFilePath=null, $bEscape=true ) {
149
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::get()' );
148
+    static public function getArray( $asArray, $sFilePath = null, $bEscape = true ) {
149
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::get()' );
150 150
         return AdminPageFramework_Debug::get( $asArray, $sFilePath, $bEscape );
151 151
     }
152 152
 
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
      * @since       3.0.3   Changed the default log location and file name.
158 158
      * @deprecated  3.1.0   Use the `log()` method instead.
159 159
      */
160
-    static public function logArray( $asArray, $sFilePath=null ) {
161
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::log()' );
160
+    static public function logArray( $asArray, $sFilePath = null ) {
161
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::log()' );
162 162
         AdminPageFramework_Debug::log( $asArray, $sFilePath );
163 163
     }
164 164
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @deprecated  3.8.9
172 172
      */
173 173
     static public function getAsString( $mValue ) {
174
-        self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__ );
174
+        self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__ );
175 175
         return self::_getLegible( $mValue );
176 176
     }
177 177
 
Please login to merge, or discard this patch.
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 order only to load 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.
factory/_common/form/field_type/AdminPageFramework_FieldType_submit.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -337,8 +337,8 @@
 block discarded – undo
337 337
                 ) + $_aAttributes
338 338
             );
339 339
             return "<p class='submit-confirm-container'><label>"
340
-                   . $_sInput
341
-                   . "<span>{$_aConfirm[ 'label' ]}</span>"
340
+                    . $_sInput
341
+                    . "<span>{$_aConfirm[ 'label' ]}</span>"
342 342
                 . "</label></p>";
343 343
         }
344 344
 
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * Defines the field type slugs used for this field type.
193 193
      */
194
-    public $aFieldTypeSlugs = array( 'submit', );
194
+    public $aFieldTypeSlugs = array( 'submit',);
195 195
     
196 196
     /**
197 197
      * Defines the default key-values of this field type. 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         'redirect_url'  => null,
203 203
         'href'          => null,
204 204
         'reset'         => null, 
205
-        'email'         => null,    // [3.3.0+] string of an email address to send to or it can be an array with the following keys.
205
+        'email'         => null, // [3.3.0+] string of an email address to send to or it can be an array with the following keys.
206 206
         'confirm'       => '',
207 207
         /* 
208 208
             array(
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                 'attachments'   => null,    // string|array     The file path(s) or an array representing the key structure of the submitted form data holding the value. The first key should be the section ID and the second key is the the field ID.
214 214
             )
215 215
         */
216
-        'skip_confirmation' => false,   // 3.7.6+ For emails.
216
+        'skip_confirmation' => false, // 3.7.6+ For emails.
217 217
         'attributes'    => array(
218 218
             'class' => 'button button-primary',
219 219
         ),    
@@ -294,17 +294,17 @@  discard block
 block discarded – undo
294 294
 
295 295
         return 
296 296
             $aField[ 'before_label' ]
297
-            . "<div " . $this->getAttributes( $_aLabelContainerAttributes ) . ">"
297
+            . "<div ".$this->getAttributes( $_aLabelContainerAttributes ).">"
298 298
                 . $this->_getExtraFieldsBeforeLabel( $aField ) // this is for the import field type that cannot place file input tag inside the label tag.
299
-                . "<label " . $this->getAttributes( $_aLabelAttributes ) . ">"
299
+                . "<label ".$this->getAttributes( $_aLabelAttributes ).">"
300 300
                     . $aField[ 'before_input' ]
301 301
                     . $this->_getExtraInputFields( $aField )
302
-                    . "<input " . $this->getAttributes( $_aInputAttributes ) . " />" // this method is defined in the base class
302
+                    . "<input ".$this->getAttributes( $_aInputAttributes )." />" // this method is defined in the base class
303 303
                     . $aField[ 'after_input' ]
304 304
                 . "</label>"
305 305
                 . $this->___getConfirmationCheckbox( $aField )
306 306
             . "</div>"
307
-            . $aField['after_label'];
307
+            . $aField[ 'after_label' ];
308 308
         
309 309
     }
310 310
         /**
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
             if ( empty( $aField[ 'confirm' ] ) ) {
317 317
                 return '';
318 318
             }
319
-            $_aConfirm    = is_string( $aField[ 'confirm' ] )
319
+            $_aConfirm = is_string( $aField[ 'confirm' ] )
320 320
                 ? array(
321 321
                     'label' => $aField[ 'confirm' ]
322 322
                 )
323 323
                 : $this->getAsArray( $aField[ 'confirm' ] );
324
-            $_aConfirm    = $_aConfirm + array(
324
+            $_aConfirm = $_aConfirm + array(
325 325
                 'label' => $this->oMsg->get( 'submit_confirmation_label' ),
326 326
                 'error' => $this->oMsg->get( 'submit_confirmation_error' ),
327 327
             );
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         private function _getLabelAttributes( array $aField, array $aInputAttributes ) {
373 373
             return array(
374 374
                 'style' => $aField[ 'label_min_width' ] 
375
-                    ? "min-width:" . $this->getLengthSanitized( $aField[ 'label_min_width' ] ) . ";" 
375
+                    ? "min-width:".$this->getLengthSanitized( $aField[ 'label_min_width' ] ).";" 
376 376
                     : null,
377 377
                 'for'   => $aInputAttributes[ 'id' ],
378 378
                 'class' => $aInputAttributes[ 'disabled' ] 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         private function _getLabelContainerAttributes( array $aField ) {           
392 392
             return array(
393 393
                 'style' => $aField[ 'label_min_width' ] || '0' === ( string ) $aField[ 'label_min_width' ]
394
-                    ? "min-width:" . $this->getLengthSanitized( $aField[ 'label_min_width' ] ) . ";" 
394
+                    ? "min-width:".$this->getLengthSanitized( $aField[ 'label_min_width' ] ).";" 
395 395
                     : null,
396 396
                 'class' => 'admin-page-framework-input-label-container'
397 397
                     . ' admin-page-framework-input-button-container'
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     protected function _getExtraInputFields( &$aField ) {
446 446
         
447 447
         $_aOutput   = array();
448
-        $_aOutput[] = $this->getHTMLTag( 
448
+        $_aOutput[ ] = $this->getHTMLTag( 
449 449
             'input',
450 450
             array(
451 451
                 'type'  => 'hidden',
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 'value' => $aField[ 'input_id' ],
454 454
             )
455 455
         );
456
-        $_aOutput[] = $this->getHTMLTag( 
456
+        $_aOutput[ ] = $this->getHTMLTag( 
457 457
             'input',
458 458
             array(
459 459
                 'type'  => 'hidden',
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
                 'value' => $aField[ 'field_id' ],
462 462
             ) 
463 463
         );            
464
-        $_aOutput[] = $this->getHTMLTag( 
464
+        $_aOutput[ ] = $this->getHTMLTag( 
465 465
             'input',
466 466
             array(
467 467
                 'type'  => 'hidden',
@@ -469,11 +469,11 @@  discard block
 block discarded – undo
469 469
                 'value' => $aField[ '_input_name_flat' ],
470 470
             ) 
471 471
         );         
472
-        $_aOutput[] = $this->_getHiddenInput_SectionID( $aField );
473
-        $_aOutput[] = $this->_getHiddenInputByKey( $aField, 'redirect_url' );       
474
-        $_aOutput[] = $this->_getHiddenInputByKey( $aField, 'href' );       
475
-        $_aOutput[] = $this->_getHiddenInput_Reset( $aField );
476
-        $_aOutput[] = $this->_getHiddenInput_Email( $aField );
472
+        $_aOutput[ ] = $this->_getHiddenInput_SectionID( $aField );
473
+        $_aOutput[ ] = $this->_getHiddenInputByKey( $aField, 'redirect_url' );       
474
+        $_aOutput[ ] = $this->_getHiddenInputByKey( $aField, 'href' );       
475
+        $_aOutput[ ] = $this->_getHiddenInput_Reset( $aField );
476
+        $_aOutput[ ] = $this->_getHiddenInput_Email( $aField );
477 477
         return implode( PHP_EOL, array_filter( $_aOutput ) );  
478 478
         
479 479
     }
@@ -490,9 +490,9 @@  discard block
 block discarded – undo
490 490
                 'input',
491 491
                 array(
492 492
                     'type'  => 'hidden',
493
-                    'name'  => "__submit[{$aField['input_id']}][section_id]",
494
-                    'value' => isset( $aField['section_id'] ) && '_default' !== $aField['section_id'] 
495
-                        ? $aField['section_id'] 
493
+                    'name'  => "__submit[{$aField[ 'input_id' ]}][section_id]",
494
+                    'value' => isset( $aField[ 'section_id' ] ) && '_default' !== $aField[ 'section_id' ] 
495
+                        ? $aField[ 'section_id' ] 
496 496
                         : '',
497 497
                 ) 
498 498
             );                  
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
                     'input',
513 513
                     array(
514 514
                         'type'  => 'hidden',
515
-                        'name'  => "__submit[{$aField['input_id']}][{$sKey}]",
515
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][{$sKey}]",
516 516
                         'value' => $aField[ $sKey ],
517 517
                     ) 
518 518
                 )
@@ -527,15 +527,15 @@  discard block
 block discarded – undo
527 527
          * @return      string      the HTML input tag output for the 'reset' argument.
528 528
          */        
529 529
         private function _getHiddenInput_Reset( array $aField ) {
530
-            if ( ! $aField[ 'reset' ] ) {
530
+            if ( !$aField[ 'reset' ] ) {
531 531
                 return '';
532 532
             }
533
-            return ! $this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'reset' )
533
+            return !$this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'reset' )
534 534
                 ? $this->getHTMLTag( 
535 535
                     'input',
536 536
                     array(
537 537
                         'type'  => 'hidden',
538
-                        'name'  => "__submit[{$aField['input_id']}][is_reset]",
538
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][is_reset]",
539 539
                         'value' => '1',
540 540
                     ) 
541 541
                 )
@@ -564,10 +564,10 @@  discard block
 block discarded – undo
564 564
                 return '';
565 565
             }
566 566
             $this->setTransient( 
567
-                'apf_em_' . md5( $aField[ '_input_name_flat' ] . get_current_user_id() ), 
567
+                'apf_em_'.md5( $aField[ '_input_name_flat' ].get_current_user_id() ), 
568 568
                 $aField[ 'email' ] 
569 569
             );
570
-            return ! $this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'email' )
570
+            return !$this->_checkConfirmationDisplayed( $aField, $aField[ '_input_name_flat' ], 'email' )
571 571
                 ? $this->getHTMLTag( 
572 572
                     'input',
573 573
                     array(
@@ -595,19 +595,19 @@  discard block
 block discarded – undo
595 595
          * @return      boolean
596 596
          * @internal
597 597
          */
598
-        private function _checkConfirmationDisplayed( $aField, $sFlatFieldName, $sType='reset' ) {
598
+        private function _checkConfirmationDisplayed( $aField, $sFlatFieldName, $sType = 'reset' ) {
599 599
                             
600
-            switch( $sType ) {
600
+            switch ( $sType ) {
601 601
                 default:
602 602
                 case 'reset':       // admin page framework _ reset confirmation
603
-                    $_sTransientKey = 'apf_rc_' . md5( $sFlatFieldName . get_current_user_id() );
603
+                    $_sTransientKey = 'apf_rc_'.md5( $sFlatFieldName.get_current_user_id() );
604 604
                     break;
605 605
                 case 'email':       // admin page framework _ email confirmation
606
-                    $_sTransientKey = 'apf_ec_' . md5( $sFlatFieldName . get_current_user_id() );   
606
+                    $_sTransientKey = 'apf_ec_'.md5( $sFlatFieldName.get_current_user_id() );   
607 607
                     break;
608 608
             }
609 609
             
610
-            $_bConfirmed = false === $this->getTransient( $_sTransientKey ) && ! $aField[ 'skip_confirmation' ]
610
+            $_bConfirmed = false === $this->getTransient( $_sTransientKey ) && !$aField[ 'skip_confirmation' ]
611 611
                 ? false
612 612
                 : true;
613 613
             
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
          * @return      array   The label container attribute array.
389 389
          * @internal
390 390
          */        
391
-        private function _getLabelContainerAttributes( array $aField ) {           
391
+        private function _getLabelContainerAttributes( array $aField ) {
392 392
             return array(
393 393
                 'style' => $aField[ 'label_min_width' ] || '0' === ( string ) $aField[ 'label_min_width' ]
394 394
                     ? "min-width:" . $this->getLengthSanitized( $aField[ 'label_min_width' ] ) . ";" 
@@ -636,19 +636,19 @@  discard block
 block discarded – undo
636 636
      * @internal
637 637
      * @param       array   $aField
638 638
      */ 
639
-    protected function _getInputFieldValueFromLabel( $aField ) {    
639
+    protected function _getInputFieldValueFromLabel( $aField ) {
640 640
         
641 641
         // If the value key is explicitly set, use it. But the empty string will be ignored.
642
-        if ( isset( $aField[ 'value' ] ) && $aField[ 'value' ] != '' ) { 
642
+        if ( isset( $aField[ 'value' ] ) && $aField[ 'value' ] != '' ) {
643 643
             return $aField[ 'value' ]; 
644 644
         }
645 645
         
646
-        if ( isset( $aField[ 'label' ] ) ) { 
646
+        if ( isset( $aField[ 'label' ] ) ) {
647 647
             return $aField[ 'label' ]; 
648 648
         }
649 649
         
650 650
         // If the default value is set,
651
-        if ( isset( $aField[ 'default' ] ) ) { 
651
+        if ( isset( $aField[ 'default' ] ) ) {
652 652
             return $aField[ 'default' ]; 
653 653
         }
654 654
         
Please login to merge, or discard this patch.