Completed
Branch master (163d15)
by
unknown
18:50 queued 09:36
created
_common/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/_common/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.
_common/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.
_common/utility/base_utility/AdminPageFramework_Utility_ArrayGetter.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @since       DVVER       Moved from `AdminPageFramework_Utility_Array`.
27 27
      */
28 28
     static public function getFirstElement( array $aArray ) {
29
-        foreach( $aArray as $_mElement ) {
29
+        foreach ( $aArray as $_mElement ) {
30 30
             return $_mElement;
31 31
         }
32 32
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param       string|array                $asToDefault    When the returning value matches oen of the set values here, the value(s) will be discarded and the default value will be applied.
46 46
      * @return      mixed       The set value or the default value.
47 47
      */
48
-    static public function getElement( $aSubject, $aisKey, $mDefault=null, $asToDefault=array( null ) ) {
48
+    static public function getElement( $aSubject, $aisKey, $mDefault = null, $asToDefault = array( null ) ) {
49 49
         
50 50
         $_aToDefault = is_null( $asToDefault )
51 51
             ? array( null )
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @since       DVVER       Moved from `AdminPageFramework_Utility_Array`.
73 73
      * @return      array       The cast retrieved element value.
74 74
      */
75
-    static public function getElementAsArray( $aSubject, $aisKey, $mDefault=null, $asToDefault=array( null ) ) {
75
+    static public function getElementAsArray( $aSubject, $aisKey, $mDefault = null, $asToDefault = array( null ) ) {
76 76
         return self::getAsArray( 
77 77
             self::getElement( $aSubject, $aisKey, $mDefault, $asToDefault ),
78 78
             true       // preserve an empty value
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         
92 92
         foreach ( $aParse as $_isKey => $_v ) {
93 93
             
94
-            if ( ! is_numeric( $_isKey ) ) {
94
+            if ( !is_numeric( $_isKey ) ) {
95 95
                 unset( $aParse[ $_isKey ] );
96 96
                 continue;
97 97
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             // Convert string numeric value to integer or float.
100 100
             $_isKey = $_isKey + 0; 
101 101
             
102
-            if ( ! is_int( $_isKey ) ) {
102
+            if ( !is_int( $_isKey ) ) {
103 103
                 unset( $aParse[ $_isKey ] );
104 104
             }
105 105
                 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     static public function getNonIntegerKeyElements( array $aParse ) {
119 119
         
120 120
         foreach ( $aParse as $_isKey => $_v ) {
121
-            if ( is_numeric( $_isKey ) && is_int( $_isKey+ 0 ) ) {
121
+            if ( is_numeric( $_isKey ) && is_int( $_isKey + 0 ) ) {
122 122
                 unset( $aParse[ $_isKey ] );     
123 123
             }
124 124
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      * @since       DVVER       Moved from `AdminPageFramework_Utility_Array`.
152 152
      * @return      mixed
153 153
      */
154
-    static public function getArrayValueByArrayKeys( $aArray, $aKeys, $vDefault=null ) {
154
+    static public function getArrayValueByArrayKeys( $aArray, $aKeys, $vDefault = null ) {
155 155
         
156 156
         $_sKey = array_shift( $aKeys );
157 157
  
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      * @param       boolean     bPreserveEmpty      If `false` is given, a value that yields `false` such as `false`, an empty sttring `''`, or `0` will not create an element such as `array( false )`. It will be just `array()`.
191 191
      * @return      array       The cast array.
192 192
      */
193
-    static public function getAsArray( $mValue, $bPreserveEmpty=false ) {
193
+    static public function getAsArray( $mValue, $bPreserveEmpty = false ) {
194 194
         
195 195
         if ( is_array( $mValue ) ) {
196 196
             return $mValue; 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,8 @@
 block discarded – undo
158 158
         // array_key_exists( $_sKey, $aArray ) caused warnings in some occasions
159 159
         if ( isset( $aArray[ $_sKey ] ) ) {
160 160
             
161
-            if ( empty( $aKeys ) ) { // no more keys 
161
+            if ( empty( $aKeys ) ) {
162
+// no more keys 
162 163
                 return $aArray[ $_sKey ];
163 164
             }
164 165
             
Please login to merge, or discard this patch.
_common/utility/base_utility/AdminPageFramework_Utility_HTMLAttribute.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     static public function getInlineCSS( array $aCSSRules ) {
38 38
         $_aOutput = array();
39
-        foreach( $aCSSRules as $_sProperty => $_sValue ) {
40
-            $_aOutput[] = $_sProperty . ': ' . $_sValue;
39
+        foreach ( $aCSSRules as $_sProperty => $_sValue ) {
40
+            $_aOutput[ ] = $_sProperty.': '.$_sValue;
41 41
         }
42 42
         return implode( '; ', $_aOutput );
43 43
     }    
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     static public function getStyleAttribute( $asInlineCSSes ) {
69 69
         
70 70
         $_aCSSRules = array();
71
-        foreach( array_reverse( func_get_args() ) as $_asCSSRules ) {
71
+        foreach ( array_reverse( func_get_args() ) as $_asCSSRules ) {
72 72
             
73 73
             // For array, store in the container.
74 74
             if ( is_array( $_asCSSRules ) ) {
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
             
79 79
             // At this point, it is a string. Break them down to array elements.
80 80
             $__aCSSRules = explode( ';', $_asCSSRules );
81
-            foreach( $__aCSSRules as $_sPair ) {
81
+            foreach ( $__aCSSRules as $_sPair ) {
82 82
                 $_aCSSPair = explode( ':', $_sPair );
83
-                if ( ! isset( $_aCSSPair[ 0 ], $_aCSSPair[ 1 ] ) ) {
83
+                if ( !isset( $_aCSSPair[ 0 ], $_aCSSPair[ 1 ] ) ) {
84 84
                     continue;
85 85
                 }
86 86
                 $_aCSSRules[ $_aCSSPair[ 0 ] ] = $_aCSSPair[ 1 ];
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
      */
118 118
     static public function getClassAttribute( /* $asClassSelectors1, $asClassSelectors12, ... */ ) {
119 119
         
120
-        $_aClasses  = array();
121
-        foreach( func_get_args() as $_asClasses ) {
122
-            if ( ! in_array( gettype( $_asClasses ), array( 'array', 'string' ) ) ) {
120
+        $_aClasses = array();
121
+        foreach ( func_get_args() as $_asClasses ) {
122
+            if ( !in_array( gettype( $_asClasses ), array( 'array', 'string' ) ) ) {
123 123
                 continue;
124 124
             }            
125 125
             $_aClasses = array_merge( 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                     : explode( ' ', $_asClasses )
130 130
             );
131 131
         }
132
-        $_aClasses  = array_unique( array_filter( $_aClasses ) );
132
+        $_aClasses = array_unique( array_filter( $_aClasses ) );
133 133
         
134 134
         // @todo examine if it is okay to remove the trim() function below.
135 135
         return trim( implode( ' ', $_aClasses ) );
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         static public function generateClassAttribute( /* $asClassSelectors1, $asClassSelectors12 ... */ ) {
146 146
             $_aParams = func_get_args();
147 147
             return call_user_func_array(
148
-                array( __CLASS__ , 'getClassAttribute' ), 
148
+                array( __CLASS__, 'getClassAttribute' ), 
149 149
                 $_aParams
150 150
             );        
151 151
         }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     static public function getDataAttributeArray( array $aArray ) {
160 160
         
161 161
         $_aNewArray = array();
162
-        foreach( $aArray as $sKey => $v ) {
162
+        foreach ( $aArray as $sKey => $v ) {
163 163
             if ( in_array( gettype( $v ), array( 'array', 'object' ) ) ) {
164 164
                 continue;
165 165
             }            
Please login to merge, or discard this patch.
factory/_common/utility/base_utility/AdminPageFramework_Utility_Path.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     static public function getRelativePath( $from, $to ) {
30 30
         
31 31
         // some compatibility fixes for Windows paths
32
-        $from = is_dir( $from ) ? rtrim( $from, '\/') . '/' : $from;
33
-        $to   = is_dir( $to )   ? rtrim( $to, '\/') . '/'   : $to;
32
+        $from = is_dir( $from ) ? rtrim( $from, '\/' ).'/' : $from;
33
+        $to   = is_dir( $to ) ? rtrim( $to, '\/' ).'/' : $to;
34 34
         $from = str_replace( '\\', '/', $from );
35 35
         $to   = str_replace( '\\', '/', $to );
36 36
 
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         $to       = explode( '/', $to );
39 39
         $relPath  = $to;
40 40
 
41
-        foreach( $from as $depth => $dir ) {
41
+        foreach ( $from as $depth => $dir ) {
42 42
             // find first non-matching dir
43
-            if( $dir === $to[ $depth ] ) {
43
+            if ( $dir === $to[ $depth ] ) {
44 44
                 // ignore this directory
45 45
                 array_shift( $relPath );
46 46
             } else {
47 47
                 // get number of remaining dirs to $from
48 48
                 $remaining = count( $from ) - $depth;
49
-                if( $remaining > 1 ) {
49
+                if ( $remaining > 1 ) {
50 50
                     // add traversals up to first matching dir
51 51
                     $padLength = ( count( $relPath ) + $remaining - 1 ) * -1;
52 52
                     $relPath = array_pad( $relPath, $padLength, '..' );
53 53
                     break;
54 54
                 } else {
55
-                    $relPath[ 0 ] = './' . $relPath[ 0 ];
55
+                    $relPath[ 0 ] = './'.$relPath[ 0 ];
56 56
                 }
57 57
             }
58 58
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         
76 76
         $_aRedirectedFiles = array( $sRedirectedFile, __FILE__ );
77 77
         $_sCallerFilePath  = '';
78
-        foreach( debug_backtrace() as $aDebugInfo )  {     
78
+        foreach ( debug_backtrace() as $aDebugInfo ) {     
79 79
             $_sCallerFilePath = $aDebugInfo[ 'file' ];
80 80
             if ( in_array( $_sCallerFilePath, $_aRedirectedFiles ) ) { 
81 81
                 continue; 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@
 block discarded – undo
75 75
         
76 76
         $_aRedirectedFiles = array( $sRedirectedFile, __FILE__ );
77 77
         $_sCallerFilePath  = '';
78
-        foreach( debug_backtrace() as $aDebugInfo )  {     
78
+        foreach( debug_backtrace() as $aDebugInfo ) {
79 79
             $_sCallerFilePath = $aDebugInfo[ 'file' ];
80
-            if ( in_array( $_sCallerFilePath, $_aRedirectedFiles ) ) { 
80
+            if ( in_array( $_sCallerFilePath, $_aRedirectedFiles ) ) {
81 81
                 continue; 
82 82
             }
83 83
             break; // catch the first found item.
Please login to merge, or discard this patch.
factory/_common/utility/base_utility/AdminPageFramework_Utility_Array.php 2 patches
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
      * @return      numeric
26 26
      * @since       3.7.4
27 27
      */
28
-    static public function getUnusedNumericIndex( $aArray, $nIndex, $iOffset=1 ) {
28
+    static public function getUnusedNumericIndex( $aArray, $nIndex, $iOffset = 1 ) {
29 29
         
30 30
         // Check if the order value is not used.
31
-        if ( ! isset( $aArray[ $nIndex ] ) ) {
31
+        if ( !isset( $aArray[ $nIndex ] ) ) {
32 32
             return $nIndex;
33 33
         }
34 34
         
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * @return      boolean
44 44
      */
45 45
     static public function isAssociative( array $aArray ) {
46
-        return array_keys ( $aArray ) !== range( 0, count( $aArray ) - 1 );
46
+        return array_keys( $aArray ) !== range( 0, count( $aArray ) - 1 );
47 47
     }      
48 48
                
49 49
     /**
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
      */
77 77
     static public function getReadableListOfArray( array $aArray ) {
78 78
         
79
-        $_aOutput   = array();
80
-        foreach( $aArray as $_sKey => $_vValue ) {        
81
-            $_aOutput[] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ) . PHP_EOL;
79
+        $_aOutput = array();
80
+        foreach ( $aArray as $_sKey => $_vValue ) {        
81
+            $_aOutput[ ] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ).PHP_EOL;
82 82
         }
83 83
         return implode( PHP_EOL, $_aOutput );
84 84
         
@@ -89,37 +89,37 @@  discard block
 block discarded – undo
89 89
      * @since       3.3.0
90 90
      * @return      string      The generated human readable array contents.
91 91
      */
92
-    static public function getReadableArrayContents( $sKey, $vValue, $sLabelCharLengths=16, $iOffset=0 ) {
92
+    static public function getReadableArrayContents( $sKey, $vValue, $sLabelCharLengths = 16, $iOffset = 0 ) {
93 93
         
94 94
         $_aOutput   = array();
95
-        $_aOutput[] = ( $iOffset 
96
-                ? str_pad( ' ', $iOffset  ) 
95
+        $_aOutput[ ] = ( $iOffset 
96
+                ? str_pad( ' ', $iOffset ) 
97 97
                 : '' 
98 98
             ) 
99 99
             . ( $sKey 
100
-                ? '[' . $sKey . ']' 
100
+                ? '['.$sKey.']' 
101 101
                 : '' 
102 102
             );
103 103
         
104
-        if ( ! in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) {
105
-            $_aOutput[] = $vValue;
104
+        if ( !in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) {
105
+            $_aOutput[ ] = $vValue;
106 106
             return implode( PHP_EOL, $_aOutput );                
107 107
         }
108 108
         
109 109
         foreach ( $vValue as $_sTitle => $_asDescription ) {
110
-            if ( ! in_array( gettype( $_asDescription ), array( 'array', 'object' ) ) ) {
111
-                $_aOutput[] = str_pad( ' ', $iOffset )
110
+            if ( !in_array( gettype( $_asDescription ), array( 'array', 'object' ) ) ) {
111
+                $_aOutput[ ] = str_pad( ' ', $iOffset )
112 112
                     . $_sTitle 
113 113
                     . str_pad( ':', $sLabelCharLengths - self::getStringLength( $_sTitle ) )
114 114
                     . $_asDescription;
115 115
                 continue;
116 116
             }
117
-            $_aOutput[] = str_pad( ' ', $iOffset )
117
+            $_aOutput[ ] = str_pad( ' ', $iOffset )
118 118
                 . $_sTitle 
119 119
                 . ": {" 
120 120
                 . self::getReadableArrayContents( '', $_asDescription, 16, $iOffset + 4 )
121 121
                 . PHP_EOL
122
-                . str_pad( ' ', $iOffset ) . "}";
122
+                . str_pad( ' ', $iOffset )."}";
123 123
         }
124 124
         return implode( PHP_EOL, $_aOutput );    
125 125
         
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
      */
133 133
     static public function getReadableListOfArrayAsHTML( array $aArray ) {
134 134
 
135
-        $_aOutput   = array();
136
-        foreach( $aArray as $_sKey => $_vValue ) {        
137
-            $_aOutput[] = "<ul class='array-contents'>" 
135
+        $_aOutput = array();
136
+        foreach ( $aArray as $_sKey => $_vValue ) {        
137
+            $_aOutput[ ] = "<ul class='array-contents'>" 
138 138
                     .  self::getReadableArrayContentsHTML( $_sKey, $_vValue )
139
-                . "</ul>" . PHP_EOL;
139
+                . "</ul>".PHP_EOL;
140 140
         }
141 141
         return implode( PHP_EOL, $_aOutput );    
142 142
         
@@ -153,25 +153,25 @@  discard block
 block discarded – undo
153 153
             $_aOutput   = array();
154 154
             
155 155
             // Title - array key
156
-            $_aOutput[] = $sKey 
157
-                ? "<h3 class='array-key'>" . $sKey . "</h3>"
156
+            $_aOutput[ ] = $sKey 
157
+                ? "<h3 class='array-key'>".$sKey."</h3>"
158 158
                 : "";
159 159
                 
160 160
             // If it does not have a nested array or object, 
161
-            if ( ! in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) {
162
-                $_aOutput[] = "<div class='array-value'>" 
161
+            if ( !in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) {
162
+                $_aOutput[ ] = "<div class='array-value'>" 
163 163
                         . html_entity_decode( nl2br( str_replace( ' ', '&nbsp;', $vValue ) ), ENT_QUOTES )
164 164
                     . "</div>";
165
-                return "<li>" . implode( PHP_EOL, $_aOutput ) . "</li>";    
165
+                return "<li>".implode( PHP_EOL, $_aOutput )."</li>";    
166 166
             }
167 167
             
168 168
             // Now it is a nested item.
169 169
             foreach ( $vValue as $_sKey => $_vValue ) {   
170
-                $_aOutput[] =  "<ul class='array-contents'>" 
170
+                $_aOutput[ ] = "<ul class='array-contents'>" 
171 171
                         . self::getReadableArrayContentsHTML( $_sKey, $_vValue ) 
172 172
                     . "</ul>";
173 173
             }
174
-            return implode( PHP_EOL, $_aOutput ) ;
174
+            return implode( PHP_EOL, $_aOutput );
175 175
             
176 176
         }
177 177
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     static public function getReadableListOfArray( array $aArray ) {
59 59
         
60 60
         $_aOutput   = array();
61
-        foreach( $aArray as $_sKey => $_vValue ) {        
61
+        foreach( $aArray as $_sKey => $_vValue ) {
62 62
             $_aOutput[] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ) . PHP_EOL;
63 63
         }
64 64
         return implode( PHP_EOL, $_aOutput );
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     static public function getReadableListOfArrayAsHTML( array $aArray ) {
115 115
 
116 116
         $_aOutput   = array();
117
-        foreach( $aArray as $_sKey => $_vValue ) {        
117
+        foreach( $aArray as $_sKey => $_vValue ) {
118 118
             $_aOutput[] = "<ul class='array-contents'>" 
119 119
                     .  self::getReadableArrayContentsHTML( $_sKey, $_vValue )
120 120
                 . "</ul>" . PHP_EOL;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             }
148 148
             
149 149
             // Now it is a nested item.
150
-            foreach ( $vValue as $_sKey => $_vValue ) {   
150
+            foreach ( $vValue as $_sKey => $_vValue ) {
151 151
                 $_aOutput[] =  "<ul class='array-contents'>" 
152 152
                         . self::getReadableArrayContentsHTML( $_sKey, $_vValue ) 
153 153
                     . "</ul>";
Please login to merge, or discard this patch.
development/factory/page_meta_box/AdminPageFramework_PageMetaBox_Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
      */
45 45
     public function _isInThePage() {
46 46
         
47
-        if ( ! $this->oProp->bIsAdmin ) {
47
+        if ( !$this->oProp->bIsAdmin ) {
48 48
             return false;     
49 49
         }
50 50
                     
51
-        if ( ! isset( $_GET[ 'page' ] ) ) {
51
+        if ( !isset( $_GET[ 'page' ] ) ) {
52 52
             return false;
53 53
         }
54 54
         
Please login to merge, or discard this patch.
factory/page_meta_box/_model/AdminPageFramework_Property_page_meta_box.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
      * @since       3.5.3
171 171
      * @return      string      The found page slug. An empty string if not found.
172 172
      * @remark      Do not return `null` when not found as some framework methods check the retuened value with `isset()` and if null is given, `isset()` yields `false` while it does `true` for an emtpy string (''). 
173
-    */     
173
+     */     
174 174
     public function getCurrentPageSlug() {
175 175
         return isset( $_GET[ 'page' ] ) 
176 176
             ? $_GET[ 'page' ] 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     /**
58 58
      * Sets up hooks and properties.
59 59
      */
60
-    public function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {     
60
+    public function __construct( $oCaller, $sClassName, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework', $sStructureType = 'page_meta_box' ) {     
61 61
         
62 62
         // Let them overload.
63 63
         unset(
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     public function _getScreenIDOfPage( $sPageSlug ) {
107 107
         $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug );
108 108
         return $_oAdminPage
109
-            ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ] . ( is_network_admin() ? '-network' : '' )
109
+            ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ].( is_network_admin() ? '-network' : '' )
110 110
             : '';
111 111
     }    
112 112
     
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      * @since       3.0.0
117 117
      * @return      boolean     Returns true if it is of framework's added page; otherwise, false.
118 118
      */
119
-    public function isPageAdded( $sPageSlug='' ) {    
119
+    public function isPageAdded( $sPageSlug = '' ) {    
120 120
         $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug );
121 121
         return $_oAdminPage
122 122
             ? $_oAdminPage->oProp->isPageAdded( $sPageSlug )
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     public function isCurrentTab( $sTabSlug ) {
134 134
         
135 135
         $_sCurrentPageSlug = $this->getElement( $_GET, 'page' );
136
-        if ( ! $_sCurrentPageSlug ) { 
136
+        if ( !$_sCurrentPageSlug ) { 
137 137
             return false; 
138 138
         }
139 139
         $_sCurrentTabSlug = $this->getElement( 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */         
187 187
     public function getDefaultInPageTab( $sPageSlug ) {
188 188
     
189
-        if ( ! $sPageSlug ) { 
189
+        if ( !$sPageSlug ) { 
190 190
             return ''; 
191 191
         }
192 192
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function getOptionKey( $sPageSlug ) {
203 203
         
204
-        if ( ! $sPageSlug ) { 
204
+        if ( !$sPageSlug ) { 
205 205
             return ''; 
206 206
         }
207 207
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             $GLOBALS,
229 229
             array( 'aAdminPageFramework', 'aPageClasses' )
230 230
         );                 
231
-        foreach( $_aPageClasses as $_oAdminPage ) {
231
+        foreach ( $_aPageClasses as $_oAdminPage ) {
232 232
             if ( $_oAdminPage->oProp->isPageAdded( $sPageSlug ) ) {
233 233
                 return $_oAdminPage;
234 234
             }
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     /**
58 58
      * Sets up hooks and properties.
59 59
      */
60
-    public function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {     
60
+    public function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {
61 61
         
62 62
         // Let them overload.
63 63
         unset(
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      * @since       3.0.0
117 117
      * @return      boolean     Returns true if it is of framework's added page; otherwise, false.
118 118
      */
119
-    public function isPageAdded( $sPageSlug='' ) {    
119
+    public function isPageAdded( $sPageSlug='' ) {
120 120
         $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug );
121 121
         return $_oAdminPage
122 122
             ? $_oAdminPage->oProp->isPageAdded( $sPageSlug )
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     public function isCurrentTab( $sTabSlug ) {
134 134
         
135 135
         $_sCurrentPageSlug = $this->getElement( $_GET, 'page' );
136
-        if ( ! $_sCurrentPageSlug ) { 
136
+        if ( ! $_sCurrentPageSlug ) {
137 137
             return false; 
138 138
         }
139 139
         $_sCurrentTabSlug = $this->getElement( 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */         
187 187
     public function getDefaultInPageTab( $sPageSlug ) {
188 188
     
189
-        if ( ! $sPageSlug ) { 
189
+        if ( ! $sPageSlug ) {
190 190
             return ''; 
191 191
         }
192 192
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function getOptionKey( $sPageSlug ) {
203 203
         
204
-        if ( ! $sPageSlug ) { 
204
+        if ( ! $sPageSlug ) {
205 205
             return ''; 
206 206
         }
207 207
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
Please login to merge, or discard this patch.