Completed
Branch dev (d064b2)
by
unknown
24:08 queued 04:45
created
_abstract/form/field_type/AdminPageFramework_WalkerTaxonomyChecklist.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
      *  - use_desc_for_title    (boolean|int) default is 1 - Whether to use the category description as the title attribute. side note: the framework enables this by default.
64 64
      * @param       integer     $iCurrentObjectID
65 65
      */
66
-    function start_el( &$sOutput, $oTerm, $iDepth=0, $aArgs=array(), $iCurrentObjectID=0 ) {
66
+    function start_el( &$sOutput, $oTerm, $iDepth = 0, $aArgs = array(), $iCurrentObjectID = 0 ) {
67 67
        
68 68
         $aArgs = $aArgs + array(
69 69
             '_name_prefix'      => null,
70 70
             '_input_id_prefix'  => null,
71 71
             '_attributes'       => array(),
72 72
             '_selected_items'   => array(),
73
-            'taxonomy'          => null,    // parsed by the core function to perform the database query.
74
-            'disabled'          => null,    // not sure what this was for
73
+            'taxonomy'          => null, // parsed by the core function to perform the database query.
74
+            'disabled'          => null, // not sure what this was for
75 75
         );
76 76
         
77 77
         // Local variables
@@ -79,22 +79,22 @@  discard block
 block discarded – undo
79 79
         $_sTaxonomySlug  = empty( $aArgs[ 'taxonomy' ] ) 
80 80
             ? 'category' 
81 81
             : $aArgs[ 'taxonomy' ];
82
-        $_sID            = "{$aArgs['_input_id_prefix']}_{$_sTaxonomySlug}_{$_iID}";
82
+        $_sID            = "{$aArgs[ '_input_id_prefix' ]}_{$_sTaxonomySlug}_{$_iID}";
83 83
 
84 84
         // Post count
85
-        $_sPostCount     = $aArgs['show_post_count'] 
86
-            ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" 
85
+        $_sPostCount     = $aArgs[ 'show_post_count' ] 
86
+            ? " <span class='font-lighter'>(".$oTerm->count.")</span>" 
87 87
             : '';
88 88
         
89 89
         // Attributes
90 90
         $_aInputAttributes = isset( $_aInputAttributes[ $_iID ] ) 
91
-            ? $_aInputAttributes[ $_iID ] + $aArgs['_attributes']
92
-            : $aArgs['_attributes'];
91
+            ? $_aInputAttributes[ $_iID ] + $aArgs[ '_attributes' ]
92
+            : $aArgs[ '_attributes' ];
93 93
         $_aInputAttributes = array(
94 94
             'id'        => $_sID,
95 95
             'value'     => 1, // must be 1 because the index of zero exists so the index value cannot be assigned here.
96 96
             'type'      => 'checkbox',
97
-            'name'      => "{$aArgs['_name_prefix']}[{$_iID}]",
97
+            'name'      => "{$aArgs[ '_name_prefix' ]}[{$_iID}]",
98 98
             'checked'   => in_array( $_iID, ( array ) $aArgs[ '_selected_items' ] )
99 99
                 ? 'checked' 
100 100
                 : null,
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
           + array(
103 103
             'class'     => null,
104 104
         );
105
-        $_aInputAttributes['class'] .= ' apf_checkbox';
105
+        $_aInputAttributes[ 'class' ] .= ' apf_checkbox';
106 106
         
107 107
         $_aLiTagAttributes = array(
108 108
             'id'        => "list-{$_sID}",
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
         
113 113
         // Output - the variable is by reference so the modification takes effect
114 114
         $sOutput .= "\n"
115
-            . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" 
115
+            . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" 
116 116
                 . "<label for='{$_sID}' class='taxonomy-checklist-label'>"
117
-                    . "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />"
118
-                    . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />"
117
+                    . "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />"
118
+                    . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />"
119 119
                     . esc_html( apply_filters( 'the_category', $oTerm->name ) ) 
120 120
                     . $_sPostCount
121 121
                 . "</label>";    
Please login to merge, or discard this patch.
factory/_abstract/form/notice/AdminPageFramework_Form___SubmitNotice.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
      * @param       string      $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type.
33 33
      * @return      boolean     True if a setting notice is set; otherwise, false.
34 34
      */
35
-    public function hasNotice( $sType='' ) {
35
+    public function hasNotice( $sType = '' ) {
36 36
                 
37
-        if ( ! $sType ) {
37
+        if ( !$sType ) {
38 38
             return ( bool ) count( self::$_aNotices );
39 39
         }
40 40
         
41 41
         // Check if there is a message of the type.
42
-        foreach( self::$_aNotices as $_aNotice ) {
42
+        foreach ( self::$_aNotices as $_aNotice ) {
43 43
             $_sClassAttribute = $this->getElement( 
44 44
                 $_aNotice, 
45 45
                 array( 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
79 79
      * @return       void
80 80
      */
81
-    public function set( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
81
+    public function set( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) {
82 82
         
83 83
         // If the array is empty, shecule the task of saving the array at shutdown.
84 84
         if ( empty( self::$_aNotices ) ) {
@@ -88,19 +88,19 @@  discard block
 block discarded – undo
88 88
         $_sID = md5( trim( $sMessage ) );
89 89
             
90 90
         // If the override is false and a message is already set, do not add.
91
-        if ( ! $bOverride && isset( self::$_aNotices[ $_sID ] ) ) {
91
+        if ( !$bOverride && isset( self::$_aNotices[ $_sID ] ) ) {
92 92
             return;
93 93
         }
94 94
 
95 95
         $_aAttributes = $this->getAsArray( $asAttributes );
96
-        if ( is_string( $asAttributes ) && ! empty( $asAttributes ) ) {
96
+        if ( is_string( $asAttributes ) && !empty( $asAttributes ) ) {
97 97
             $_aAttributes[ 'id' ] = $asAttributes;
98 98
         }
99 99
         self::$_aNotices[ $_sID ] = array(
100 100
             'sMessage'      => $sMessage,
101 101
             'aAttributes'   => $_aAttributes + array(
102 102
                 'class'     => $sType,
103
-                'id'        => 'form_submit_notice_' . $_sID,
103
+                'id'        => 'form_submit_notice_'.$_sID,
104 104
             ),
105 105
         );
106 106
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 return; 
121 121
             }
122 122
             $this->setTransient( 
123
-                'apf_notices_' . get_current_user_id(), 
123
+                'apf_notices_'.get_current_user_id(), 
124 124
                 self::$_aNotices
125 125
             );
126 126
         }        
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $this->deleteTransient( "apf_notices_{$_iUserID}" );
143 143
     
144 144
         // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework.
145
-        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { 
145
+        if ( isset( $_GET[ 'settings-notice' ] ) && !$_GET[ 'settings-notice' ] ) { 
146 146
             return; 
147 147
         }
148 148
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
          * @return      void
117 117
          */
118 118
         public function _replyToSaveNotices() {
119
-            if ( empty( self::$_aNotices ) ) { 
119
+            if ( empty( self::$_aNotices ) ) {
120 120
                 return; 
121 121
             }
122 122
             $this->setTransient( 
@@ -136,13 +136,13 @@  discard block
 block discarded – undo
136 136
         
137 137
         $_iUserID  = get_current_user_id();
138 138
         $_aNotices = $this->getTransient( "apf_notices_{$_iUserID}" );
139
-        if ( false === $_aNotices ) { 
139
+        if ( false === $_aNotices ) {
140 140
             return; 
141 141
         }
142 142
         $this->deleteTransient( "apf_notices_{$_iUserID}" );
143 143
     
144 144
         // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework.
145
-        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { 
145
+        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) {
146 146
             return; 
147 147
         }
148 148
         
Please login to merge, or discard this patch.
development/factory/_abstract/utility/AdminPageFramework_ArrayHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
      * 
22 22
      * @since       3.6.0
23 23
      */
24
-    public $aData            = array();
24
+    public $aData = array();
25 25
     
26 26
     /**
27 27
      * Stores the defaulte values.
28 28
      */
29
-    public $aDefault         = array();
29
+    public $aDefault = array();
30 30
     
31 31
     /**
32 32
      * Sets up properties.
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $_aKeys     = func_get_args() + array( null );
55 55
         
56 56
         // If no key is specified, return the whole array.
57
-        if ( ! isset( $_aKeys[ 0 ] ) ) {
57
+        if ( !isset( $_aKeys[ 0 ] ) ) {
58 58
             return $this->uniteArrays(
59 59
                 $this->aData,
60 60
                 $this->aDefault
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
         
70 70
         // Now either the section ID or field ID is given. 
71 71
         return $this->getArrayValueByArrayKeys( 
72
-            $this->aData,   // subject array
73
-            $_aKeys,        // dimensional keys
72
+            $this->aData, // subject array
73
+            $_aKeys, // dimensional keys
74 74
             $this->getDefaultValue( // default value
75 75
                 $_mDefault, 
76 76
                 $_aKeys 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function set( /* $asKeys, $mValue */ ) {
100 100
         
101
-        $_aParameters   = func_get_args();
102
-        if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
101
+        $_aParameters = func_get_args();
102
+        if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
103 103
             return;
104 104
         }
105 105
         $_asKeys        = $_aParameters[ 0 ];
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function delete( /* $sKey1, $sKey2, $sKey3 ... OR $aKeys */ ) {
125 125
         
126
-        $_aParameters   = func_get_args();
127
-        if ( ! isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
126
+        $_aParameters = func_get_args();
127
+        if ( !isset( $_aParameters[ 0 ], $_aParameters[ 1 ] ) ) {
128 128
             return;
129 129
         }
130 130
         $_asKeys        = $_aParameters[ 0 ];
Please login to merge, or discard this patch.
development/factory/_abstract/utility/AdminPageFramework_Debug.php 3 patches
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @remark      An alias of the dumpArray() method.
27 27
      * @since       3.2.0
28 28
      */
29
-    static public function dump( $asArray, $sFilePath=null ) {
29
+    static public function dump( $asArray, $sFilePath = null ) {
30 30
         echo self::get( $asArray, $sFilePath );
31 31
     }    
32 32
         /**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
          * @since unknown
38 38
          * @deprecated      3.2.0
39 39
          */
40
-        static public function dumpArray( $asArray, $sFilePath=null ) {
40
+        static public function dumpArray( $asArray, $sFilePath = null ) {
41 41
             self::dump( $asArray, $sFilePath );
42 42
         }    
43 43
         
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
      * @remark      An alias of getArray() method.
50 50
      * @since       3.2.0
51 51
      */
52
-    static public function get( $asArray, $sFilePath=null, $bEscape=true ) {
52
+    static public function get( $asArray, $sFilePath = null, $bEscape = true ) {
53 53
 
54 54
         if ( $sFilePath ) self::log( $asArray, $sFilePath );     
55 55
         
56 56
         return $bEscape
57
-            ? "<pre class='dump-array'>" . htmlspecialchars( self::getAsString( $asArray ) ) . "</pre>" // esc_html() has a bug that breaks with complex HTML code.
57
+            ? "<pre class='dump-array'>".htmlspecialchars( self::getAsString( $asArray ) )."</pre>" // esc_html() has a bug that breaks with complex HTML code.
58 58
             : self::getAsString( $asArray ); // non-escape is used for exporting data into file.    
59 59
         
60 60
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
          * @since       3.0.0 Changed the $bEncloseInTag parameter to bEscape.
68 68
          * @deprecated` 3.2.0
69 69
          */
70
-        static public function getArray( $asArray, $sFilePath=null, $bEscape=true ) {
70
+        static public function getArray( $asArray, $sFilePath = null, $bEscape = true ) {
71 71
             return self::get( $asArray, $sFilePath, $bEscape );
72 72
         }      
73 73
             
@@ -83,18 +83,18 @@  discard block
 block discarded – undo
83 83
      * @param       string      $sFilePath      The log file path.
84 84
      * @return      void
85 85
      **/
86
-    static public function log( $mValue, $sFilePath=null ) {
86
+    static public function log( $mValue, $sFilePath = null ) {
87 87
                 
88 88
         static $_fPreviousTimeStamp = 0;
89 89
         
90 90
         $_oCallerInfo       = debug_backtrace();
91 91
         $_sCallerFunction   = self::getElement(
92
-            $_oCallerInfo,  // subject array
92
+            $_oCallerInfo, // subject array
93 93
             array( 1, 'function' ), // key
94 94
             ''      // default
95 95
         );                        
96
-        $_sCallerClass      = self::getElement(
97
-            $_oCallerInfo,  // subject array
96
+        $_sCallerClass = self::getElement(
97
+            $_oCallerInfo, // subject array
98 98
             array( 1, 'class' ), // key
99 99
             ''      // default
100 100
         );           
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
             self::_getLogFilePath( $sFilePath, $_sCallerClass ), 
105 105
             self::_getLogHeadingLine( 
106 106
                 $_fCurrentTimeStamp,
107
-                round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ),     // elapsed time
107
+                round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time
108 108
                 $_sCallerClass,
109 109
                 $_sCallerFunction
110
-            ) . PHP_EOL
110
+            ).PHP_EOL
111 111
             . self::_getLogContents( $mValue ),
112 112
             FILE_APPEND 
113 113
         );     
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
                 return $sFilePath;
128 128
             }
129 129
             if ( true === $sFilePath ) {
130
-                return WP_CONTENT_DIR . DIRECTORY_SEPARATOR . get_class() . '_' . date( "Ymd" ) . '.log';
130
+                return WP_CONTENT_DIR.DIRECTORY_SEPARATOR.get_class().'_'.date( "Ymd" ).'.log';
131 131
             }
132
-            return WP_CONTENT_DIR . DIRECTORY_SEPARATOR . get_class() . '_' . $sCallerClass . '_' . date( "Ymd" ) . '.log';
132
+            return WP_CONTENT_DIR.DIRECTORY_SEPARATOR.get_class().'_'.$sCallerClass.'_'.date( "Ymd" ).'.log';
133 133
             
134 134
         }
135 135
         /**
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
             $_iLengths  = self::_getValueLength( $mValue, $_sType );
145 145
             return '(' 
146 146
                 . $_sType
147
-                . ( null !== $_iLengths ? ', length: ' . $_iLengths : '' )
147
+                . ( null !== $_iLengths ? ', length: '.$_iLengths : '' )
148 148
             . ') '
149 149
             . self::getAsString( $mValue ) 
150
-            . PHP_EOL . PHP_EOL;
150
+            . PHP_EOL.PHP_EOL;
151 151
         
152 152
         }      
153 153
             /**
@@ -188,11 +188,11 @@  discard block
 block discarded – undo
188 188
             $_nMicroseconds     = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' );
189 189
             
190 190
             $_aOutput           = array(
191
-                date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds,
191
+                date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds,
192 192
                 self::_getFormattedElapsedTime( $nElapsed ),
193 193
                 $_iPageLoadID,
194 194
                 AdminPageFramework_Registry::getVersion(),
195
-                $sCallerClass . '::' . $sCallerFunction,
195
+                $sCallerClass.'::'.$sCallerFunction,
196 196
                 current_filter(),
197 197
                 self::getCurrentURL(),
198 198
             );
@@ -210,22 +210,22 @@  discard block
 block discarded – undo
210 210
                 $_aElapsedParts     = explode( ".", ( string ) $nElapsed );
211 211
                 $_sElapsedFloat     = str_pad(
212 212
                     self::getElement(
213
-                        $_aElapsedParts,  // subject array
213
+                        $_aElapsedParts, // subject array
214 214
                         1, // key
215 215
                         0      // default
216 216
                     ),      
217 217
                     3, 
218 218
                     '0'
219 219
                 );
220
-                $_sElapsed          = self::getElement(
221
-                    $_aElapsedParts,  // subject array
222
-                    0,  // key
220
+                $_sElapsed = self::getElement(
221
+                    $_aElapsedParts, // subject array
222
+                    0, // key
223 223
                     0   // default
224 224
                 );                                   
225
-                $_sElapsed          = strlen( $_sElapsed ) > 1 
226
-                    ? '+' . substr( $_sElapsed, -1, 2 ) 
227
-                    : ' ' . $_sElapsed;
228
-                return $_sElapsed . '.' . $_sElapsedFloat;
225
+                $_sElapsed = strlen( $_sElapsed ) > 1 
226
+                    ? '+'.substr( $_sElapsed, -1, 2 ) 
227
+                    : ' '.$_sElapsed;
228
+                return $_sElapsed.'.'.$_sElapsedFloat;
229 229
             
230 230
             }
231 231
         /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
          * @since       3.0.3 Changed the default log location and file name.
236 236
          * @deprecated  3.1.0 Use the `log()` method instead.
237 237
          */
238
-        static public function logArray( $asArray, $sFilePath=null ) {
238
+        static public function logArray( $asArray, $sFilePath = null ) {
239 239
             self::log( $asArray, $sFilePath );     
240 240
         }      
241 241
         
@@ -265,13 +265,13 @@  discard block
 block discarded – undo
265 265
      * 
266 266
      * @since       3.4.4
267 267
      */
268
-    static public function getSliceByDepth( array $aSubject, $iDepth=0 ) {
268
+    static public function getSliceByDepth( array $aSubject, $iDepth = 0 ) {
269 269
 
270 270
         foreach ( $aSubject as $_sKey => $_vValue ) {
271 271
             if ( is_object( $_vValue ) ) {
272 272
                 $aSubject[ $_sKey ] = method_exists( $_vValue, '__toString' ) 
273 273
                     ? ( string ) $_vValue           // cast string
274
-                    : get_object_vars( $_vValue );  // convert it to array.
274
+                    : get_object_vars( $_vValue ); // convert it to array.
275 275
             }
276 276
             if ( is_array( $_vValue ) ) {
277 277
                 $_iDepth = $iDepth;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@
 block discarded – undo
51 51
      */
52 52
     static public function get( $asArray, $sFilePath=null, $bEscape=true ) {
53 53
 
54
-        if ( $sFilePath ) self::log( $asArray, $sFilePath );     
54
+        if ( $sFilePath ) {
55
+            self::log( $asArray, $sFilePath );
56
+        }
55 57
         
56 58
         return $bEscape
57 59
             ? "<pre class='dump-array'>" . htmlspecialchars( self::getAsString( $asArray ) ) . "</pre>" // esc_html() has a bug that breaks with complex HTML code.
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.
development/factory/_abstract/utility/AdminPageFramework_ErrorReporting.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     private $_iLevel;
40 40
 
41
-    public function __construct( $iLevel=null ) {
41
+    public function __construct( $iLevel = null ) {
42 42
         $this->_iLevel = null !== $iLevel 
43 43
             ? $iLeevl
44 44
             : error_reporting();
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
         private function _getIncluded() {
58 58
             
59 59
             $_aIncluded = array();
60
-            foreach( $this->_aLevels as $_iLevel => $iLevelText ) {
60
+            foreach ( $this->_aLevels as $_iLevel => $iLevelText ) {
61 61
                 
62 62
                 // This is where we check if a level was used or not
63 63
                 if ( $this->_iLevel & $_iLevel ) {
64
-                    $_aIncluded[] = $_iLevel;
64
+                    $_aIncluded[ ] = $_iLevel;
65 65
                 }
66 66
                 
67 67
             }
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
             $_aValues       = array();
76 76
             
77 77
             if ( count( $aIncluded ) > $_iAll / 2 ) {
78
-                $_aValues[] = 'E_ALL';
79
-                foreach( $this->_aLevels as $_iLevel => $iLevelText ) {
80
-                    if ( ! in_array( $_iLevel, $aIncluded ) ) {
81
-                        $_aValues[] = $iLevelText;
78
+                $_aValues[ ] = 'E_ALL';
79
+                foreach ( $this->_aLevels as $_iLevel => $iLevelText ) {
80
+                    if ( !in_array( $_iLevel, $aIncluded ) ) {
81
+                        $_aValues[ ] = $iLevelText;
82 82
                     }
83 83
                 }
84 84
                 return implode( ' & ~', $_aValues );
85 85
             } 
86
-            foreach( $aIncluded as $_iLevel ) {
87
-                $_aValues[] = $this->_aLevels[ $_iLevel ];
86
+            foreach ( $aIncluded as $_iLevel ) {
87
+                $_aValues[ ] = $this->_aLevels[ $_iLevel ];
88 88
             }
89 89
             return implode( ' | ', $_aValues );
90 90
 
Please login to merge, or discard this patch.
_abstract/utility/base_utility/AdminPageFramework_Utility_Deprecated.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
      * @since       3.5.3           Moved from `AdminPageFramework_Utility_Array`.
33 33
      * @deprecated  3.5.3           Use `getElement()`. 
34 34
      */
35
-    public static function getCorrespondingArrayValue( $vSubject, $sKey, $sDefault='', $bBlankToDefault=false ) {    
35
+    public static function getCorrespondingArrayValue( $vSubject, $sKey, $sDefault = '', $bBlankToDefault = false ) {    
36 36
                 
37 37
         // If $vSubject is null,
38
-        if ( ! isset( $vSubject ) ) { return $sDefault; }
38
+        if ( !isset( $vSubject ) ) { return $sDefault; }
39 39
             
40 40
         // If the $bBlankToDefault flag is set and the subject value is a blank string, return the default value.
41 41
         if ( $bBlankToDefault && $vSubject == '' ) { return  $sDefault; }
42 42
             
43 43
         // If $vSubject is not an array, 
44
-        if ( ! is_array( $vSubject ) ) { return ( string ) $vSubject; } // consider it as string.
44
+        if ( !is_array( $vSubject ) ) { return ( string ) $vSubject; } // consider it as string.
45 45
         
46 46
         // Consider $vSubject as array.
47 47
         if ( isset( $vSubject[ $sKey ] ) ) { return $vSubject[ $sKey ]; }
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      * @since       3.5.3       Moved from `AdminPageFramework_FieldType_Base`.
87 87
      * @deprecated  3.5.3       Use the `getElement()` method.
88 88
      */
89
-    protected function getFieldElementByKey( $asElement, $sKey, $asDefault='' ) {
89
+    protected function getFieldElementByKey( $asElement, $sKey, $asDefault = '' ) {
90 90
                     
91
-        if ( ! is_array( $asElement ) || ! isset( $sKey ) ) { return $asElement; }
91
+        if ( !is_array( $asElement ) || !isset( $sKey ) ) { return $asElement; }
92 92
                 
93 93
         $aElements = &$asElement; // it is an array
94 94
         return isset( $aElements[ $sKey ] )
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     static public function shiftTillTrue( array $aArray ) {
109 109
         
110
-        foreach( $aArray as &$vElem ) {
110
+        foreach ( $aArray as &$vElem ) {
111 111
             
112 112
             if ( $vElem ) { break; }
113 113
             unset( $vElem );
@@ -139,15 +139,15 @@  discard block
 block discarded – undo
139 139
      */
140 140
     static public function getAttributes( array $aAttributes ) {
141 141
         
142
-        $_sQuoteCharactor   ="'";
142
+        $_sQuoteCharactor   = "'";
143 143
         $_aOutput           = array();
144
-        foreach( $aAttributes as $sAttribute => $sProperty ) {
144
+        foreach ( $aAttributes as $sAttribute => $sProperty ) {
145 145
        
146 146
             // Must be resolved as a string.
147 147
             if ( in_array( gettype( $sProperty ), array( 'array', 'object' ) ) ) {
148 148
                 continue;
149 149
             }
150
-            $_aOutput[] = "{$sAttribute}={$_sQuoteCharactor}{$sProperty}{$_sQuoteCharactor}";
150
+            $_aOutput[ ] = "{$sAttribute}={$_sQuoteCharactor}{$sProperty}{$_sQuoteCharactor}";
151 151
             
152 152
         }
153 153
         return implode( ' ', $_aOutput );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      * @since       3.5.3           Moved from `AdminPageFramework_Utility_Array`.
33 33
      * @deprecated  3.5.3           Use `getElement()`. 
34 34
      */
35
-    public static function getCorrespondingArrayValue( $vSubject, $sKey, $sDefault='', $bBlankToDefault=false ) {    
35
+    public static function getCorrespondingArrayValue( $vSubject, $sKey, $sDefault='', $bBlankToDefault=false ) {
36 36
                 
37 37
         // If $vSubject is null,
38 38
         if ( ! isset( $vSubject ) ) { return $sDefault; }
Please login to merge, or discard this patch.
factory/_abstract/utility/base_utility/AdminPageFramework_Utility_File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
      * @param       integer             $iLines         The number of lines to read.
29 29
      * @return      string
30 30
      */
31
-    static public function getFileTailContents( $asPath=array(), $iLines=1 ) {
31
+    static public function getFileTailContents( $asPath = array(), $iLines = 1 ) {
32 32
         
33
-        $_sPath  = self::_getFirstItem( $asPath );
34
-        if ( ! @is_readable( $_sPath ) ) {
33
+        $_sPath = self::_getFirstItem( $asPath );
34
+        if ( !@is_readable( $_sPath ) ) {
35 35
             return '';
36 36
         }
37 37
         return trim( 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @since       3.4.6
62 62
      * @return      string
63 63
      */
64
-    static public function sanitizeFileName( $sFileName, $sReplacement='_' ) {
64
+    static public function sanitizeFileName( $sFileName, $sReplacement = '_' ) {
65 65
         
66 66
         // Remove anything which isn't a word, white space, number
67 67
         // or any of the following characters -_~,;:[]().        
Please login to merge, or discard this patch.
factory/_abstract/utility/base_utility/AdminPageFramework_Utility_Path.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     static public function getRelativePath( $from, $to ) {
32 32
         
33 33
         // some compatibility fixes for Windows paths
34
-        $from = is_dir( $from ) ? rtrim( $from, '\/') . '/' : $from;
35
-        $to   = is_dir( $to )   ? rtrim( $to, '\/') . '/'   : $to;
34
+        $from = is_dir( $from ) ? rtrim( $from, '\/' ).'/' : $from;
35
+        $to   = is_dir( $to ) ? rtrim( $to, '\/' ).'/' : $to;
36 36
         $from = str_replace( '\\', '/', $from );
37 37
         $to   = str_replace( '\\', '/', $to );
38 38
 
@@ -40,21 +40,21 @@  discard block
 block discarded – undo
40 40
         $to       = explode( '/', $to );
41 41
         $relPath  = $to;
42 42
 
43
-        foreach( $from as $depth => $dir ) {
43
+        foreach ( $from as $depth => $dir ) {
44 44
             // find first non-matching dir
45
-            if( $dir === $to[ $depth ] ) {
45
+            if ( $dir === $to[ $depth ] ) {
46 46
                 // ignore this directory
47 47
                 array_shift( $relPath );
48 48
             } else {
49 49
                 // get number of remaining dirs to $from
50 50
                 $remaining = count( $from ) - $depth;
51
-                if( $remaining > 1 ) {
51
+                if ( $remaining > 1 ) {
52 52
                     // add traversals up to first matching dir
53 53
                     $padLength = ( count( $relPath ) + $remaining - 1 ) * -1;
54 54
                     $relPath = array_pad( $relPath, $padLength, '..' );
55 55
                     break;
56 56
                 } else {
57
-                    $relPath[ 0 ] = './' . $relPath[ 0 ];
57
+                    $relPath[ 0 ] = './'.$relPath[ 0 ];
58 58
                 }
59 59
             }
60 60
         }
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
      * @since 3.0.0
69 69
      * @return string
70 70
      */
71
-    static public function getCallerScriptPath( $asRedirectedFiles=array( __FILE__ ) ) {
71
+    static public function getCallerScriptPath( $asRedirectedFiles = array( __FILE__ ) ) {
72 72
 
73 73
         $aRedirectedFiles = ( array ) $asRedirectedFiles;
74
-        $aRedirectedFiles[] = __FILE__;
74
+        $aRedirectedFiles[ ] = __FILE__;
75 75
         $_sCallerFilePath = '';
76
-        foreach( debug_backtrace() as $aDebugInfo )  {     
77
-            $_sCallerFilePath = $aDebugInfo['file'];
76
+        foreach ( debug_backtrace() as $aDebugInfo ) {     
77
+            $_sCallerFilePath = $aDebugInfo[ 'file' ];
78 78
             if ( in_array( $_sCallerFilePath, $aRedirectedFiles ) ) { continue; }
79 79
             break; // catch the first found item.
80 80
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         $aRedirectedFiles = ( array ) $asRedirectedFiles;
74 74
         $aRedirectedFiles[] = __FILE__;
75 75
         $_sCallerFilePath = '';
76
-        foreach( debug_backtrace() as $aDebugInfo )  {     
76
+        foreach( debug_backtrace() as $aDebugInfo ) {
77 77
             $_sCallerFilePath = $aDebugInfo['file'];
78 78
             if ( in_array( $_sCallerFilePath, $aRedirectedFiles ) ) { continue; }
79 79
             break; // catch the first found item.
Please login to merge, or discard this patch.
_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.