@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $this->aFieldset[ '_field_path_array' ], |
37 | 37 | $this->aFieldset[ 'error_message' ] |
38 | 38 | ); |
39 | - $_aOutputs[] = $_oFieldError->get(); |
|
39 | + $_aOutputs[ ] = $_oFieldError->get(); |
|
40 | 40 | |
41 | 41 | // Construct fields array for sub-fields. |
42 | 42 | $_oFieldsFormatter = new AdminPageFramework_Form_Model___Format_Fields( |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $_aFields = $_oFieldsFormatter->get(); |
47 | 47 | |
48 | 48 | /// Get the field and its sub-fields output. |
49 | - $_aOutputs[] = $this->___getFieldsOutput( |
|
49 | + $_aOutputs[ ] = $this->___getFieldsOutput( |
|
50 | 50 | $this->aFieldset, |
51 | 51 | $_aFields, |
52 | 52 | $this->aCallbacks |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | * @since 3.8.0 Added the `$aFieldset` parameter |
65 | 65 | * @return string |
66 | 66 | */ |
67 | - private function ___getFieldsOutput( $aFieldset, array $aFields, array $aCallbacks=array() ) { |
|
67 | + private function ___getFieldsOutput( $aFieldset, array $aFields, array $aCallbacks = array() ) { |
|
68 | 68 | $_aOutput = array(); |
69 | - foreach( $aFields as $_isIndex => $_aField ) { |
|
70 | - $_aOutput[] = $this->___getEachFieldOutput( |
|
69 | + foreach ( $aFields as $_isIndex => $_aField ) { |
|
70 | + $_aOutput[ ] = $this->___getEachFieldOutput( |
|
71 | 71 | $_aField, |
72 | 72 | $_isIndex, |
73 | 73 | $aCallbacks, |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | * @since 3.5.3 |
83 | 83 | * @return string The HTML output of the given field. |
84 | 84 | */ |
85 | - private function ___getEachFieldOutput( $aField, $isIndex, array $aCallbacks, $bIsLastElement=false ) { |
|
85 | + private function ___getEachFieldOutput( $aField, $isIndex, array $aCallbacks, $bIsLastElement = false ) { |
|
86 | 86 | |
87 | 87 | // Field type definition - allows mixed field types in sub-fields |
88 | 88 | $_aFieldTypeDefinition = $this->___getFieldTypeDefinition( $aField[ 'type' ] ); |
89 | - if ( ! is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) { |
|
89 | + if ( !is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) { |
|
90 | 90 | return ''; |
91 | 91 | } |
92 | 92 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'input', |
125 | 125 | array( |
126 | 126 | 'type' => 'hidden', |
127 | - 'name' => '__unset_' . $aField[ '_fields_type' ] . '[' . $aField[ '_input_name_flat' ] . ']', |
|
127 | + 'name' => '__unset_'.$aField[ '_fields_type' ].'['.$aField[ '_input_name_flat' ].']', |
|
128 | 128 | 'value' => $aField[ '_input_name_flat' ], |
129 | 129 | 'class' => 'unset-element-names element-address', |
130 | 130 | ) |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | private function ___getFieldOutput( $sContent, $aField, $bIsLastElement ) { |
140 | 140 | $_oFieldAttribute = new AdminPageFramework_Form_View___Attribute_Field( $aField ); |
141 | 141 | return $aField[ 'before_field' ] |
142 | - . "<div " . $_oFieldAttribute->get() . ">" |
|
142 | + . "<div ".$_oFieldAttribute->get().">" |
|
143 | 143 | . $sContent |
144 | 144 | . $this->___getUnsetFlagFieldInputTag( $aField ) |
145 | 145 | . $this->___getDelimiter( $aField, $bIsLastElement ) |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | private function ___getDelimiter( $aField, $bIsLastElement ) { |
170 | 170 | return $aField[ 'delimiter' ] |
171 | - ? "<div " . $this->getAttributes( |
|
171 | + ? "<div ".$this->getAttributes( |
|
172 | 172 | array( |
173 | 173 | 'class' => 'delimiter', |
174 | 174 | 'id' => "delimiter-{$aField[ 'input_id' ]}", |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | "" |
179 | 179 | ), |
180 | 180 | ) |
181 | - ) . ">" |
|
181 | + ).">" |
|
182 | 182 | . $aField[ 'delimiter' ] |
183 | 183 | . "</div>" |
184 | 184 | : ''; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | private function ___getFinalOutput( $aFieldset, array $aFieldsOutput, $iFieldsCount ) { |
194 | 194 | $_oFieldsetAttributes = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset ); |
195 | 195 | return $aFieldset[ 'before_fieldset' ] |
196 | - . "<fieldset " . $_oFieldsetAttributes->get() . ">" |
|
196 | + . "<fieldset ".$_oFieldsetAttributes->get().">" |
|
197 | 197 | . $this->___getEmbeddedFieldTitle( $aFieldset ) |
198 | 198 | . $this->___getChildFieldTitle( $aFieldset ) |
199 | 199 | . $this->___getFieldsetContent( $aFieldset, $aFieldsOutput, $iFieldsCount ) |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | * @since 3.8.0 |
208 | 208 | */ |
209 | 209 | private function ___getEmbeddedFieldTitle( $aFieldset ) { |
210 | - if ( ! $aFieldset[ '_is_title_embedded' ] ) { |
|
210 | + if ( !$aFieldset[ '_is_title_embedded' ] ) { |
|
211 | 211 | return ''; |
212 | 212 | } |
213 | 213 | $_oFieldTitle = new AdminPageFramework_Form_View___FieldTitle( |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | * @since 3.8.0 |
229 | 229 | */ |
230 | 230 | private function ___getChildFieldTitle( $aFieldset ) { |
231 | - if ( ! $aFieldset[ '_nested_depth' ] ) { |
|
231 | + if ( !$aFieldset[ '_nested_depth' ] ) { |
|
232 | 232 | return ''; |
233 | 233 | } |
234 | 234 | if ( $aFieldset[ '_is_title_embedded' ] ) { |
@@ -254,12 +254,12 @@ discard block |
||
254 | 254 | if ( is_scalar( $aFieldset[ 'content' ] ) ) { |
255 | 255 | return $aFieldset[ 'content' ]; |
256 | 256 | } |
257 | - $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields( |
|
257 | + $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields( |
|
258 | 258 | $aFieldset, |
259 | - array(), // attribute array |
|
259 | + array(), // attribute array |
|
260 | 260 | $iFieldsCount |
261 | 261 | ); |
262 | - return "<div " . $_oFieldsAttributes->get() . ">" |
|
262 | + return "<div ".$_oFieldsAttributes->get().">" |
|
263 | 263 | . $aFieldset[ 'before_fields' ] |
264 | 264 | . implode( PHP_EOL, $aFieldsOutput ) |
265 | 265 | . $aFieldset[ 'after_fields' ] |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | $aField[ 'description' ], |
282 | 282 | 'admin-page-framework-fields-description' // class selector |
283 | 283 | ); |
284 | - $_aOutput[] = $_oFieldDescription->get(); |
|
284 | + $_aOutput[ ] = $_oFieldDescription->get(); |
|
285 | 285 | |
286 | 286 | // Dimensional keys of repeatable and sortable fields |
287 | - $_aOutput[] = $this->___getDynamicElementFlagFieldInputTag( $aField ); |
|
287 | + $_aOutput[ ] = $this->___getDynamicElementFlagFieldInputTag( $aField ); |
|
288 | 288 | |
289 | - $_aOutput[] = $this->_getRepeatableFieldButtons( 'fields-' . $aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] ); |
|
289 | + $_aOutput[ ] = $this->_getRepeatableFieldButtons( 'fields-'.$aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] ); |
|
290 | 290 | |
291 | 291 | return implode( PHP_EOL, array_filter( $_aOutput ) ); |
292 | 292 | |
@@ -297,10 +297,10 @@ discard block |
||
297 | 297 | * @return string |
298 | 298 | */ |
299 | 299 | private function ___getDynamicElementFlagFieldInputTag( $aFieldset ) { |
300 | - if ( ! empty( $aFieldset[ 'repeatable' ] ) ) { |
|
300 | + if ( !empty( $aFieldset[ 'repeatable' ] ) ) { |
|
301 | 301 | return $this->___getRepeatableFieldFlagTag( $aFieldset ); |
302 | 302 | } |
303 | - if ( ! empty( $aFieldset[ 'sortable' ] ) ) { |
|
303 | + if ( !empty( $aFieldset[ 'sortable' ] ) ) { |
|
304 | 304 | return $this->___getSortableFieldFlagTag( $aFieldset ); |
305 | 305 | } |
306 | 306 | return ''; |
@@ -314,8 +314,8 @@ discard block |
||
314 | 314 | 'input', |
315 | 315 | array( |
316 | 316 | 'type' => 'hidden', |
317 | - 'name' => '__repeatable_elements_' . $aFieldset[ '_structure_type' ] |
|
318 | - . '[' . $aFieldset[ '_field_address' ] . ']', |
|
317 | + 'name' => '__repeatable_elements_'.$aFieldset[ '_structure_type' ] |
|
318 | + . '['.$aFieldset[ '_field_address' ].']', |
|
319 | 319 | 'class' => 'element-address', |
320 | 320 | 'value' => $aFieldset[ '_field_address' ], |
321 | 321 | 'data-field_address_model' => $aFieldset[ '_field_address_model' ], |
@@ -331,8 +331,8 @@ discard block |
||
331 | 331 | 'input', |
332 | 332 | array( |
333 | 333 | 'type' => 'hidden', |
334 | - 'name' => '__sortable_elements_' . $aFieldset[ '_structure_type' ] |
|
335 | - . '[' . $aFieldset[ '_field_address' ] . ']', |
|
334 | + 'name' => '__sortable_elements_'.$aFieldset[ '_structure_type' ] |
|
335 | + . '['.$aFieldset[ '_field_address' ].']', |
|
336 | 336 | 'class' => 'element-address', |
337 | 337 | 'value' => $aFieldset[ '_field_address' ], |
338 | 338 | 'data-field_address_model' => $aFieldset[ '_field_address_model' ], |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | public function get() { |
51 | 51 | |
52 | 52 | // Get the set value(s) |
53 | - $_mSavedValue = $this->___getStoredInputFieldValue( $this->aField, $this->aOptions ); |
|
53 | + $_mSavedValue = $this->___getStoredInputFieldValue( $this->aField, $this->aOptions ); |
|
54 | 54 | |
55 | 55 | // Construct fields array. |
56 | 56 | $_aFields = $this->___getFieldsWithSubs( $this->aField, $_mSavedValue ); |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | * @since 3.6.0 Moved from `AdminPageFramework_FieldDefinition`. |
99 | 99 | */ |
100 | 100 | private function ___divideMainAndSubFields( $aField, array &$aFirstField, array &$aSubFields ) { |
101 | - foreach( $aField as $_nsIndex => $_mFieldElement ) { |
|
101 | + foreach ( $aField as $_nsIndex => $_mFieldElement ) { |
|
102 | 102 | if ( is_numeric( $_nsIndex ) ) { |
103 | - $aSubFields[] = $_mFieldElement; |
|
103 | + $aSubFields[ ] = $_mFieldElement; |
|
104 | 104 | } else { |
105 | 105 | $aFirstField[ $_nsIndex ] = $_mFieldElement; |
106 | 106 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // We are collecting elements from the second sub-field. |
126 | 126 | unset( $_aSavedValues[ 0 ] ); |
127 | 127 | |
128 | - foreach( $_aSavedValues as $_iIndex => $vValue ) { |
|
128 | + foreach ( $_aSavedValues as $_iIndex => $vValue ) { |
|
129 | 129 | $aSubFields[ $_iIndex - 1 ] = isset( $aSubFields[ $_iIndex - 1 ] ) && is_array( $aSubFields[ $_iIndex - 1 ] ) |
130 | 130 | ? $aSubFields[ $_iIndex - 1 ] |
131 | 131 | : array(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | private function ___fillSubFields( array &$aSubFields, array $aFirstField ) { |
141 | 141 | |
142 | - foreach( $aSubFields as &$_aSubField ) { |
|
142 | + foreach ( $aSubFields as &$_aSubField ) { |
|
143 | 143 | |
144 | 144 | // Evacuate the label element which should not be merged. |
145 | 145 | $_aLabel = $this->getElement( |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | |
170 | 170 | // Determine whether the elements are saved in an array. |
171 | 171 | // $_bHasSubFields = count( $aFields ) > 1 || $aField[ 'repeatable' ] || $aField[ 'sortable' ]; |
172 | - if ( ! $this->hasSubFields( $aFields, $aField ) ) { |
|
172 | + if ( !$this->hasSubFields( $aFields, $aField ) ) { |
|
173 | 173 | $aFields[ 0 ][ '_saved_value' ] = $mSavedValue; |
174 | 174 | $aFields[ 0 ][ '_is_multiple_fields' ] = false; |
175 | 175 | return; |
176 | 176 | } |
177 | 177 | |
178 | - foreach( $aFields as $_iIndex => &$_aThisField ) { |
|
178 | + foreach ( $aFields as $_iIndex => &$_aThisField ) { |
|
179 | 179 | $_aThisField[ '_saved_value' ] = $this->getElement( $mSavedValue, $_iIndex, null ); |
180 | - $_aThisField[ '_subfield_index' ] = $_iIndex; // 3.8.0+ |
|
180 | + $_aThisField[ '_subfield_index' ] = $_iIndex; // 3.8.0+ |
|
181 | 181 | $_aThisField[ '_is_multiple_fields' ] = true; |
182 | 182 | } |
183 | 183 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * @since 3.6.0 Moved from `AdminPageFramework_FieldDefinition`. |
191 | 191 | */ |
192 | 192 | private function ___setFieldsValue( &$aFields ) { |
193 | - foreach( $aFields as &$_aField ) { |
|
193 | + foreach ( $aFields as &$_aField ) { |
|
194 | 194 | $_aField[ '_is_value_set_by_user' ] = isset( $_aField[ 'value' ] ); |
195 | 195 | $_aField[ 'value' ] = $this->___getSetFieldValue( $_aField ); |
196 | 196 | } |
@@ -232,10 +232,10 @@ discard block |
||
232 | 232 | */ |
233 | 233 | private function ___getStoredInputFieldValue( $aField, $aOptions ) { |
234 | 234 | |
235 | - $_aFieldPath = $aField[ '_field_path_array' ]; |
|
235 | + $_aFieldPath = $aField[ '_field_path_array' ]; |
|
236 | 236 | |
237 | 237 | // If a section is not set, check the first dimension element. |
238 | - if ( ! isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) { |
|
238 | + if ( !isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) { |
|
239 | 239 | return $this->getElement( |
240 | 240 | $aOptions, |
241 | 241 | $_aFieldPath, // $aField[ 'field_id' ], // @todo this may have to be a field path instead of field id. |
@@ -230,7 +230,7 @@ |
||
230 | 230 | * @since 3.7.0 Changed the `_field_type` element to `_structure_type`. |
231 | 231 | * @return null|string|array |
232 | 232 | */ |
233 | - private function ___getStoredInputFieldValue( $aField, $aOptions ) { |
|
233 | + private function ___getStoredInputFieldValue( $aField, $aOptions ) { |
|
234 | 234 | |
235 | 235 | $_aFieldPath = $aField[ '_field_path_array' ]; |
236 | 236 |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | * @return string |
37 | 37 | * @since 3.8.9 |
38 | 38 | */ |
39 | - static protected function _getLegibleDetails( $mValue, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) { |
|
39 | + static protected function _getLegibleDetails( $mValue, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) { |
|
40 | 40 | if ( is_array( $mValue ) ) { |
41 | - return '(array, length: ' . count( $mValue ).') ' |
|
42 | - . self::getAsString( print_r( self::___getLegibleDetailedArray( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) , true ) ); |
|
41 | + return '(array, length: '.count( $mValue ).') ' |
|
42 | + . self::getAsString( print_r( self::___getLegibleDetailedArray( $mValue, $iStringLengthLimit, $iArrayDepthLimit ), true ) ); |
|
43 | 43 | } |
44 | 44 | return self::getAsString( print_r( self::getLegibleDetailedValue( $mValue, $iStringLengthLimit ), true ) ); |
45 | 45 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @since 3.8.9 |
55 | 55 | * @since 3.8.22 Added the `$sStringLengthLimit` and `$iArrayDepthLimit` parameters. |
56 | 56 | */ |
57 | - static protected function _getLegible( $mValue, $iStringLengthLimit=0, $iArrayDepthLimit=0 ) { |
|
57 | + static protected function _getLegible( $mValue, $iStringLengthLimit = 0, $iArrayDepthLimit = 0 ) { |
|
58 | 58 | |
59 | 59 | $iArrayDepthLimit = $iArrayDepthLimit ? $iArrayDepthLimit : self::$iLegibleArrayDepthLimit; |
60 | 60 | $mValue = is_object( $mValue ) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ) |
72 | 72 | : $mValue; |
73 | 73 | $mValue = is_string( $mValue ) |
74 | - ? self::___getLegibleString( $mValue, $iStringLengthLimit, false ) |
|
74 | + ? self::___getLegibleString( $mValue, $iStringLengthLimit, false ) |
|
75 | 75 | : $mValue; |
76 | 76 | return self::getArrayRepresentationSanitized( self::getAsString( print_r( $mValue, true ) ) ); |
77 | 77 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @return string |
84 | 84 | */ |
85 | 85 | static private function ___getLegibleDetailedCallable( $asoCallable ) { |
86 | - return '(callable) ' . self::___getCallableName( $asoCallable ); |
|
86 | + return '(callable) '.self::___getCallableName( $asoCallable ); |
|
87 | 87 | } |
88 | 88 | /** |
89 | 89 | * @since 3.8.9 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $_sSubject = is_object( $asoCallable[ 0 ] ) |
101 | 101 | ? get_class( $asoCallable[ 0 ] ) |
102 | 102 | : ( string ) $asoCallable[ 0 ]; |
103 | - return $_sSubject . '::' . ( string ) $asoCallable[ 1 ]; |
|
103 | + return $_sSubject.'::'.( string ) $asoCallable[ 1 ]; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | if ( method_exists( $oObject, '__toString' ) ) { |
113 | 113 | return ( string ) $oObject; |
114 | 114 | } |
115 | - return '(object) ' . get_class( $oObject ) . ' ' . count( get_object_vars( $oObject ) ) . ' properties.'; |
|
115 | + return '(object) '.get_class( $oObject ).' '.count( get_object_vars( $oObject ) ).' properties.'; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @param integer $iDepthLimit |
128 | 128 | * @return array |
129 | 129 | */ |
130 | - static private function ___getLegibleDetailedArray( array $aArray, $iStringLengthLimit=0, $iDepthLimit=0 ) { |
|
130 | + static private function ___getLegibleDetailedArray( array $aArray, $iStringLengthLimit = 0, $iDepthLimit = 0 ) { |
|
131 | 131 | $_iDepthLimit = $iDepthLimit ? $iDepthLimit : self::$iLegibleArrayDepthLimit; |
132 | 132 | return self::getArrayMappedRecursive( |
133 | 133 | array( __CLASS__, 'getLegibleDetailedValue' ), |
@@ -169,9 +169,9 @@ discard block |
||
169 | 169 | return self::___getLegibleDetailedObject( $mNonScalar ); |
170 | 170 | } |
171 | 171 | if ( is_array( $mNonScalar ) ) { |
172 | - return '(' . $_sType . ') ' . count( $mNonScalar ) . ' elements'; |
|
172 | + return '('.$_sType.') '.count( $mNonScalar ).' elements'; |
|
173 | 173 | } |
174 | - return '(' . $_sType . ') ' . ( string ) $mNonScalar; |
|
174 | + return '('.$_sType.') '.( string ) $mNonScalar; |
|
175 | 175 | |
176 | 176 | } |
177 | 177 | /** |
@@ -183,11 +183,11 @@ discard block |
||
183 | 183 | */ |
184 | 184 | static private function ___getLegibleDetailedScalar( $sScalar, $iStringLengthLimit ) { |
185 | 185 | if ( is_bool( $sScalar ) ) { |
186 | - return '(boolean) ' . ( $sScalar ? 'true' : 'false' ); |
|
186 | + return '(boolean) '.( $sScalar ? 'true' : 'false' ); |
|
187 | 187 | } |
188 | 188 | return is_string( $sScalar ) |
189 | 189 | ? self::___getLegibleString( $sScalar, $iStringLengthLimit, true ) |
190 | - : '(' . gettype( $sScalar ) . ', length: ' . self::___getValueLength( $sScalar ) . ') ' . $sScalar; |
|
190 | + : '('.gettype( $sScalar ).', length: '.self::___getValueLength( $sScalar ).') '.$sScalar; |
|
191 | 191 | } |
192 | 192 | /** |
193 | 193 | * Returns a length of a value.l |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * @param boolean $bShowDetails |
212 | 212 | * @return string |
213 | 213 | */ |
214 | - static private function ___getLegibleString( $sString, $iLengthLimit, $bShowDetails=true ) { |
|
214 | + static private function ___getLegibleString( $sString, $iLengthLimit, $bShowDetails = true ) { |
|
215 | 215 | |
216 | 216 | static $_iMBSupport; |
217 | 217 | $_iMBSupport = isset( $_iMBSupport ) ? $_iMBSupport : ( integer ) function_exists( 'mb_strlen' ); |
@@ -222,8 +222,8 @@ discard block |
||
222 | 222 | |
223 | 223 | if ( $bShowDetails ) { |
224 | 224 | return $_iCharLength <= $iCharLimit |
225 | - ? '(string, length: ' . $_iCharLength . ') ' . $sString |
|
226 | - : '(string, length: ' . $_iCharLength . ') ' . call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) ) |
|
225 | + ? '(string, length: '.$_iCharLength.') '.$sString |
|
226 | + : '(string, length: '.$_iCharLength.') '.call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) ) |
|
227 | 227 | . '...'; |
228 | 228 | } |
229 | 229 | return $_iCharLength <= $iCharLimit |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | * @since 3.8.22 |
240 | 240 | * @since 3.8.23 Deprecated the `$oException` parameter. |
241 | 241 | */ |
242 | - static public function getStackTrace( $iSkip=0, $_deprecated=null ) { |
|
242 | + static public function getStackTrace( $iSkip = 0, $_deprecated = null ) { |
|
243 | 243 | |
244 | - $_iSkip = 1; // need to skip this method trace itself |
|
244 | + $_iSkip = 1; // need to skip this method trace itself |
|
245 | 245 | $_oException = new Exception(); |
246 | 246 | |
247 | 247 | // Backward compatibility. |
@@ -256,22 +256,22 @@ discard block |
||
256 | 256 | $_aFrames = array_slice( $_aFrames, $_iSkip ); |
257 | 257 | foreach ( array_reverse( $_aFrames ) as $_iIndex => $_aFrame ) { |
258 | 258 | |
259 | - $_aFrame = $_aFrame + array( |
|
259 | + $_aFrame = $_aFrame + array( |
|
260 | 260 | 'file' => null, 'line' => null, 'function' => null, |
261 | 261 | 'class' => null, 'args' => array(), |
262 | 262 | ); |
263 | 263 | $_sArguments = self::___getArgumentsOfEachStackTrace( $_aFrame[ 'args' ] ); |
264 | - $_aTraces[] = sprintf( |
|
264 | + $_aTraces[ ] = sprintf( |
|
265 | 265 | "#%s %s(%s): %s(%s)", |
266 | 266 | $_iIndex + 1, |
267 | 267 | $_aFrame[ 'file' ], |
268 | 268 | $_aFrame[ 'line' ], |
269 | - isset( $_aFrame[ 'class' ] ) ? $_aFrame[ 'class' ] . '->' . $_aFrame[ 'function' ] : $_aFrame[ 'function' ], |
|
269 | + isset( $_aFrame[ 'class' ] ) ? $_aFrame[ 'class' ].'->'.$_aFrame[ 'function' ] : $_aFrame[ 'function' ], |
|
270 | 270 | $_sArguments |
271 | 271 | ); |
272 | 272 | |
273 | 273 | } |
274 | - return implode( PHP_EOL, $_aTraces ) . PHP_EOL; |
|
274 | + return implode( PHP_EOL, $_aTraces ).PHP_EOL; |
|
275 | 275 | |
276 | 276 | } |
277 | 277 | /** |
@@ -284,16 +284,16 @@ discard block |
||
284 | 284 | foreach ( $aTraceArguments as $_mArgument ) { |
285 | 285 | $_sType = gettype( $_mArgument ); |
286 | 286 | $_sType = str_replace( |
287 | - array( 'resource (closed)', 'unknown type', 'integer', 'double', ), |
|
288 | - array( 'resource', 'unknown', 'scalar', 'scalar', ), |
|
287 | + array( 'resource (closed)', 'unknown type', 'integer', 'double',), |
|
288 | + array( 'resource', 'unknown', 'scalar', 'scalar',), |
|
289 | 289 | $_sType |
290 | 290 | ); |
291 | 291 | $_sMethodName = "___getStackTraceArgument_{$_sType}"; |
292 | - $_aArguments[] = method_exists( __CLASS__, $_sMethodName ) |
|
292 | + $_aArguments[ ] = method_exists( __CLASS__, $_sMethodName ) |
|
293 | 293 | ? self::{$_sMethodName}( $_mArgument ) |
294 | 294 | : $_sType; |
295 | 295 | } |
296 | - return join(", ", $_aArguments ); |
|
296 | + return join( ", ", $_aArguments ); |
|
297 | 297 | } |
298 | 298 | /** |
299 | 299 | * @since 3.8.22 |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | static private function ___getStackTraceArgument_string( $mArgument ) { |
304 | 304 | $_sString = self::___getLegibleString( $mArgument, 200, true ); |
305 | - return "'" . $_sString . "'"; |
|
305 | + return "'".$_sString."'"; |
|
306 | 306 | } |
307 | 307 | static private function ___getStackTraceArgument_scalar( $mArgument ) { |
308 | 308 | return $mArgument; |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | return 'NULL'; |
315 | 315 | } |
316 | 316 | static private function ___getStackTraceArgument_object( $mArgument ) { |
317 | - return 'Object(' . get_class( $mArgument ) . ')'; |
|
317 | + return 'Object('.get_class( $mArgument ).')'; |
|
318 | 318 | } |
319 | 319 | static private function ___getStackTraceArgument_resource( $mArgument ) { |
320 | 320 | return get_resource_type( $mArgument ); |
@@ -327,18 +327,18 @@ discard block |
||
327 | 327 | $_iMax = 10; |
328 | 328 | $_iTotal = count( $mArgument ); |
329 | 329 | $_iIndex = 0; |
330 | - foreach( $mArgument as $_sKey => $_mValue ) { |
|
330 | + foreach ( $mArgument as $_sKey => $_mValue ) { |
|
331 | 331 | $_iIndex++; |
332 | - $_mValue = is_scalar( $_mValue ) |
|
332 | + $_mValue = is_scalar( $_mValue ) |
|
333 | 333 | ? self::___getLegibleDetailedScalar( $_mValue, 100 ) |
334 | - : ucfirst( gettype( $_mValue ) ) . ( |
|
334 | + : ucfirst( gettype( $_mValue ) ).( |
|
335 | 335 | is_object( $_mValue ) |
336 | - ? ' (' . get_class( $_mValue ) . ')' |
|
336 | + ? ' ('.get_class( $_mValue ).')' |
|
337 | 337 | : '' |
338 | 338 | ); |
339 | - $_sOutput .= $_sKey . ': ' . $_mValue . ', '; |
|
339 | + $_sOutput .= $_sKey.': '.$_mValue.', '; |
|
340 | 340 | if ( $_iIndex > $_iMax && $_iTotal > $_iMax ) { |
341 | - $_sOutput = rtrim( $_sOutput, ',' ) . '...'; |
|
341 | + $_sOutput = rtrim( $_sOutput, ',' ).'...'; |
|
342 | 342 | break; |
343 | 343 | } |
344 | 344 | } |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | static public function getObjectName( $mItem ) { |
30 | 30 | if ( is_object( $mItem ) ) { |
31 | - return '(object) ' . get_class( $mItem ); |
|
31 | + return '(object) '.get_class( $mItem ); |
|
32 | 32 | } |
33 | 33 | return $mItem; |
34 | 34 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param string $sMore |
47 | 47 | * @return array |
48 | 48 | */ |
49 | - static public function getSlicedByDepth( array $aSubject, $iDepth=0, $sMore='(array truncated) ...' ) { |
|
49 | + static public function getSlicedByDepth( array $aSubject, $iDepth = 0, $sMore = '(array truncated) ...' ) { |
|
50 | 50 | |
51 | 51 | foreach ( $aSubject as $_sKey => $_vValue ) { |
52 | 52 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @param integer $iArrayDepthLimit The depth limit for arrays. |
27 | 27 | * @since 3.8.9 |
28 | 28 | */ |
29 | - static protected function _log( $mValue, $sFilePath=null, $bStackTrace=false, $iTrace=0, $iStringLengthLimit=99999, $iArrayDepthLimit=50 ) { |
|
29 | + static protected function _log( $mValue, $sFilePath = null, $bStackTrace = false, $iTrace = 0, $iStringLengthLimit = 99999, $iArrayDepthLimit = 50 ) { |
|
30 | 30 | |
31 | 31 | static $_fPreviousTimeStamp = 0; |
32 | 32 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $_sCallerClass = self::___getCallerClassName( $_oCallerInfo, $iTrace ); |
36 | 36 | $_fCurrentTimeStamp = microtime( true ); |
37 | 37 | $_sLogContent = self::___getLogContents( $mValue, $_fCurrentTimeStamp, $_fPreviousTimeStamp, $_sCallerClass, $_sCallerFunction, $iStringLengthLimit, $iArrayDepthLimit ) |
38 | - . ( $bStackTrace ? self::getStackTrace($iTrace + 1 ) : '' ) |
|
38 | + . ( $bStackTrace ? self::getStackTrace( $iTrace + 1 ) : '' ) |
|
39 | 39 | . PHP_EOL; |
40 | 40 | |
41 | 41 | file_put_contents( self::___getLogFilePath( $sFilePath, $_sCallerClass ), $_sLogContent, FILE_APPEND ); |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time |
53 | 53 | $_sCallerClass, |
54 | 54 | $_sCallerFunction |
55 | - ) . PHP_EOL |
|
56 | - . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ) . PHP_EOL; |
|
55 | + ).PHP_EOL |
|
56 | + . self::_getLegibleDetails( $mValue, $iStringLengthLimit, $iArrayDepthLimit ).PHP_EOL; |
|
57 | 57 | } |
58 | 58 | /** |
59 | 59 | * @since 3.8.9 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | static private function ___getCallerFunctionName( $oCallerInfo, $iTrace ) { |
63 | 63 | return self::getElement( |
64 | - $oCallerInfo, // subject array |
|
64 | + $oCallerInfo, // subject array |
|
65 | 65 | array( 2 + $iTrace, 'function' ), // key |
66 | 66 | '' // default |
67 | 67 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | static private function ___getCallerClassName( $oCallerInfo, $iTrace ) { |
74 | 74 | return self::getElement( |
75 | - $oCallerInfo, // subject array |
|
75 | + $oCallerInfo, // subject array |
|
76 | 76 | array( 2 + $iTrace, 'class' ), // key |
77 | 77 | '' // default |
78 | 78 | ); |
@@ -86,11 +86,11 @@ discard block |
||
86 | 86 | */ |
87 | 87 | static private function ___getLogFilePath( $bsFilePathOrName, $sCallerClass ) { |
88 | 88 | |
89 | - $_sWPContentDir = WP_CONTENT_DIR . DIRECTORY_SEPARATOR; |
|
89 | + $_sWPContentDir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR; |
|
90 | 90 | |
91 | 91 | // It is a partial file name |
92 | - if ( is_string( $bsFilePathOrName ) && ! self::hasSlash( $bsFilePathOrName ) ) { |
|
93 | - return $_sWPContentDir . $bsFilePathOrName . '_' . date( "Ymd" ) . '.log'; |
|
92 | + if ( is_string( $bsFilePathOrName ) && !self::hasSlash( $bsFilePathOrName ) ) { |
|
93 | + return $_sWPContentDir.$bsFilePathOrName.'_'.date( "Ymd" ).'.log'; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | // Try creating a file. |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | // Return a generated default log path. |
105 | 105 | $_sClassBaseName = $sCallerClass ? basename( $sCallerClass ) : basename( get_class() ); |
106 | - return $_sWPContentDir . $_sClassBaseName . '_' . date( "Ymd" ) . '.log'; |
|
106 | + return $_sWPContentDir.$_sClassBaseName.'_'.date( "Ymd" ).'.log'; |
|
107 | 107 | |
108 | 108 | } |
109 | 109 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * @return boolean |
112 | 112 | */ |
113 | 113 | static private function ___createFile( $sFilePath ) { |
114 | - if ( ! $sFilePath || true === $sFilePath ) { |
|
114 | + if ( !$sFilePath || true === $sFilePath ) { |
|
115 | 115 | return false; |
116 | 116 | } |
117 | 117 | if ( file_exists( $sFilePath ) ) { |
@@ -131,11 +131,11 @@ discard block |
||
131 | 131 | $_nNow = $fCurrentTimeStamp + ( self::___getSiteGMTOffset() * 60 * 60 ); |
132 | 132 | $_nMicroseconds = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' ); |
133 | 133 | $_aOutput = array( |
134 | - date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds, |
|
134 | + date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds, |
|
135 | 135 | self::___getFormattedElapsedTime( $nElapsed ), |
136 | 136 | self::___getPageLoadID(), |
137 | 137 | self::getFrameworkVersion(), |
138 | - $sCallerClass . '::' . $sCallerFunction, |
|
138 | + $sCallerClass.'::'.$sCallerFunction, |
|
139 | 139 | current_filter(), |
140 | 140 | self::getCurrentURL(), |
141 | 141 | ); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | static private function ___getSiteGMTOffset() { |
149 | 149 | static $_nGMTOffset; |
150 | - $_nGMTOffset = isset( $_nGMTOffset ) |
|
150 | + $_nGMTOffset = isset( $_nGMTOffset ) |
|
151 | 151 | ? $_nGMTOffset |
152 | 152 | : get_option( 'gmt_offset' ); |
153 | 153 | return $_nGMTOffset; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | static private function ___getPageLoadID() { |
159 | 159 | static $_sPageLoadID; |
160 | - $_sPageLoadID = $_sPageLoadID |
|
160 | + $_sPageLoadID = $_sPageLoadID |
|
161 | 161 | ? $_sPageLoadID |
162 | 162 | : uniqid(); |
163 | 163 | return $_sPageLoadID; |
@@ -180,15 +180,15 @@ discard block |
||
180 | 180 | 3, |
181 | 181 | '0' |
182 | 182 | ); |
183 | - $_sElapsed = self::getElement( |
|
184 | - $_aElapsedParts, // subject array |
|
185 | - 0, // key |
|
183 | + $_sElapsed = self::getElement( |
|
184 | + $_aElapsedParts, // subject array |
|
185 | + 0, // key |
|
186 | 186 | 0 // default |
187 | 187 | ); |
188 | - $_sElapsed = strlen( $_sElapsed ) > 1 |
|
189 | - ? '+' . substr( $_sElapsed, -1, 2 ) |
|
190 | - : ' ' . $_sElapsed; |
|
191 | - return $_sElapsed . '.' . $_sElapsedFloat; |
|
188 | + $_sElapsed = strlen( $_sElapsed ) > 1 |
|
189 | + ? '+'.substr( $_sElapsed, -1, 2 ) |
|
190 | + : ' '.$_sElapsed; |
|
191 | + return $_sElapsed.'.'.$_sElapsedFloat; |
|
192 | 192 | |
193 | 193 | } |
194 | 194 |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | static public function getReadableListOfArray( array $aArray ) { |
28 | 28 | |
29 | - $_aOutput = array(); |
|
30 | - foreach( $aArray as $_sKey => $_vValue ) { |
|
31 | - $_aOutput[] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ) . PHP_EOL; |
|
29 | + $_aOutput = array(); |
|
30 | + foreach ( $aArray as $_sKey => $_vValue ) { |
|
31 | + $_aOutput[ ] = self::getReadableArrayContents( $_sKey, $_vValue, 32 ).PHP_EOL; |
|
32 | 32 | } |
33 | 33 | return implode( PHP_EOL, $_aOutput ); |
34 | 34 | |
@@ -40,37 +40,37 @@ discard block |
||
40 | 40 | * @since 3.9.0 Moved from `AdminPageFramework_Utility_Array.php`. |
41 | 41 | * @return string The generated human-readable array contents. |
42 | 42 | */ |
43 | - static public function getReadableArrayContents( $sKey, $vValue, $sLabelCharLengths=16, $iOffset=0 ) { |
|
43 | + static public function getReadableArrayContents( $sKey, $vValue, $sLabelCharLengths = 16, $iOffset = 0 ) { |
|
44 | 44 | |
45 | 45 | $_aOutput = array(); |
46 | - $_aOutput[] = ( $iOffset |
|
47 | - ? str_pad( ' ', $iOffset ) |
|
46 | + $_aOutput[ ] = ( $iOffset |
|
47 | + ? str_pad( ' ', $iOffset ) |
|
48 | 48 | : '' |
49 | 49 | ) |
50 | 50 | . ( $sKey |
51 | - ? '[' . $sKey . ']' |
|
51 | + ? '['.$sKey.']' |
|
52 | 52 | : '' |
53 | 53 | ); |
54 | 54 | |
55 | - if ( ! in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) { |
|
56 | - $_aOutput[] = $vValue; |
|
55 | + if ( !in_array( gettype( $vValue ), array( 'array', 'object' ) ) ) { |
|
56 | + $_aOutput[ ] = $vValue; |
|
57 | 57 | return implode( PHP_EOL, $_aOutput ); |
58 | 58 | } |
59 | 59 | |
60 | 60 | foreach ( $vValue as $_sTitle => $_asDescription ) { |
61 | - if ( ! in_array( gettype( $_asDescription ), array( 'array', 'object' ) ) ) { |
|
62 | - $_aOutput[] = str_pad( ' ', $iOffset ) |
|
61 | + if ( !in_array( gettype( $_asDescription ), array( 'array', 'object' ) ) ) { |
|
62 | + $_aOutput[ ] = str_pad( ' ', $iOffset ) |
|
63 | 63 | . $_sTitle |
64 | 64 | . str_pad( ':', $sLabelCharLengths - self::getStringLength( $_sTitle ) ) |
65 | 65 | . $_asDescription; |
66 | 66 | continue; |
67 | 67 | } |
68 | - $_aOutput[] = str_pad( ' ', $iOffset ) |
|
68 | + $_aOutput[ ] = str_pad( ' ', $iOffset ) |
|
69 | 69 | . $_sTitle |
70 | 70 | . ": {" |
71 | 71 | . self::getReadableArrayContents( '', $_asDescription, 16, $iOffset + 4 ) |
72 | 72 | . PHP_EOL |
73 | - . str_pad( ' ', $iOffset ) . "}"; |
|
73 | + . str_pad( ' ', $iOffset )."}"; |
|
74 | 74 | } |
75 | 75 | return implode( PHP_EOL, $_aOutput ); |
76 | 76 | |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | * @return string The HTML list generated from the given array. |
84 | 84 | */ |
85 | 85 | static public function getReadableListOfArrayAsHTML( array $aArray ) { |
86 | - $_aOutput = array(); |
|
87 | - foreach( $aArray as $_sKey => $_vValue ) { |
|
88 | - $_aOutput[] = "<ul class='array-contents'>" |
|
86 | + $_aOutput = array(); |
|
87 | + foreach ( $aArray as $_sKey => $_vValue ) { |
|
88 | + $_aOutput[ ] = "<ul class='array-contents'>" |
|
89 | 89 | . self::getReadableArrayContentsHTML( $_sKey, $_vValue ) |
90 | - . "</ul>" . PHP_EOL; |
|
90 | + . "</ul>".PHP_EOL; |
|
91 | 91 | } |
92 | 92 | return implode( PHP_EOL, $_aOutput ); |
93 | 93 | } |
@@ -105,25 +105,25 @@ discard block |
||
105 | 105 | $_aOutput = array(); |
106 | 106 | |
107 | 107 | // Title - array key |
108 | - $_aOutput[] = $sKey |
|
109 | - ? "<h3 class='array-key'>" . $sKey . "</h3>" |
|
108 | + $_aOutput[ ] = $sKey |
|
109 | + ? "<h3 class='array-key'>".$sKey."</h3>" |
|
110 | 110 | : ""; |
111 | 111 | |
112 | 112 | // If it does not have a nested array or object, |
113 | - if ( ! in_array( gettype( $vValue ), array( 'array', 'object' ), true ) ) { |
|
114 | - $_aOutput[] = "<div class='array-value'>" |
|
113 | + if ( !in_array( gettype( $vValue ), array( 'array', 'object' ), true ) ) { |
|
114 | + $_aOutput[ ] = "<div class='array-value'>" |
|
115 | 115 | . html_entity_decode( nl2br( $vValue ), ENT_QUOTES ) |
116 | 116 | . "</div>"; |
117 | - return "<li>" . implode( PHP_EOL, $_aOutput ) . "</li>"; |
|
117 | + return "<li>".implode( PHP_EOL, $_aOutput )."</li>"; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | // Now it is a nested item. |
121 | 121 | foreach ( $vValue as $_sKey => $_vValue ) { |
122 | - $_aOutput[] = "<ul class='array-contents'>" |
|
122 | + $_aOutput[ ] = "<ul class='array-contents'>" |
|
123 | 123 | . self::getReadableArrayContentsHTML( $_sKey, $_vValue ) |
124 | 124 | . "</ul>"; |
125 | 125 | } |
126 | - return implode( PHP_EOL, $_aOutput ) ; |
|
126 | + return implode( PHP_EOL, $_aOutput ); |
|
127 | 127 | |
128 | 128 | } |
129 | 129 |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $_sOutput .= "<tr " . self::getAttributes( $_aTRAttr ) . ">"; |
330 | 330 | $_sOutput .= "<td " . self::getAttributes( $_aTDAttrFirst ) . ">" |
331 | 331 | . "<p " . self::getAttributes( $_aPAttr ) . ">" . self::___getHTMLEscaped( $_sColumnName, $bEscape ) . "</p>" |
332 | - . "</td>"; |
|
332 | + . "</td>"; |
|
333 | 333 | $_sOutput .= self::___getColumnValue( $_asValue, $aAllAttributes, $bEscape, 1 ); |
334 | 334 | $_sOutput .= "</tr>"; |
335 | 335 | } |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | if ( is_scalar( $mValue ) ) { |
397 | 397 | return "<td " . self::getAttributes( $_aTDAttrNth ) . ">" |
398 | 398 | . "<p " . self::getAttributes( $_aPAttr ) . ">" . self::___getHTMLEscaped( $mValue, $bEscape ) . "</p>" |
399 | - . "</td>"; |
|
399 | + . "</td>"; |
|
400 | 400 | } |
401 | 401 | if ( is_array( $mValue ) ) { |
402 | 402 | return self::isAssociativeArray( $mValue ) || self::isMultiDimensional( $mValue ) |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @return string |
32 | 32 | * @since 3.9.0 |
33 | 33 | */ |
34 | - static public function getTableOfKeyValues( array $aArray, array $aAllAttributes=array(), array $aHeader=array(), array $aFooter=array(), $bEscape=true, $sCaption='' ) { |
|
34 | + static public function getTableOfKeyValues( array $aArray, array $aAllAttributes = array(), array $aHeader = array(), array $aFooter = array(), $bEscape = true, $sCaption = '' ) { |
|
35 | 35 | $_aAllAttributes = $aAllAttributes + array( |
36 | 36 | 'table' => array(), |
37 | 37 | 'caption' => array(), |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | 'li' => array(), |
47 | 47 | 'p' => array(), |
48 | 48 | ); |
49 | - return "<table " . self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'table' ) ) . ">" |
|
49 | + return "<table ".self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'table' ) ).">" |
|
50 | 50 | . self::___getTableCaption( $sCaption, $_aAllAttributes, $bEscape ) |
51 | 51 | . self::___getTableHeaderOfKeyValuePair( $aHeader, $aAllAttributes, $bEscape ) |
52 | - . "<tbody " . self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'tbody' ) ) . ">" |
|
52 | + . "<tbody ".self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'tbody' ) ).">" |
|
53 | 53 | . self::___getRowsOfKeyValuePair( $aArray, $aAllAttributes, $bEscape ) |
54 | 54 | . "</tbody>" |
55 | 55 | . self::___getTableFooterOfKeyValuePair( $aFooter, $aAllAttributes, $bEscape ) |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @return string |
70 | 70 | * @since 3.9.0 |
71 | 71 | */ |
72 | - static public function getTableOfArray( array $aArray, array $aAllAttributes=array(), array $aHeader=array(), array $aFooter=array(), $bEscape=true, $sCaption='' ) { |
|
72 | + static public function getTableOfArray( array $aArray, array $aAllAttributes = array(), array $aHeader = array(), array $aFooter = array(), $bEscape = true, $sCaption = '' ) { |
|
73 | 73 | |
74 | 74 | $_aAllAttributes = $aAllAttributes + array( |
75 | 75 | 'table' => array(), |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | 'li' => array(), |
86 | 86 | 'p' => array(), |
87 | 87 | ); |
88 | - return "<table " . self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'table' ) ) . ">" |
|
88 | + return "<table ".self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'table' ) ).">" |
|
89 | 89 | . self::___getTableCaption( $sCaption, $_aAllAttributes, $bEscape ) |
90 | 90 | . self::___getTableHeader( $aHeader, $_aAllAttributes, $bEscape ) |
91 | - . "<tbody " . self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'tbody' ) ) . ">" |
|
91 | + . "<tbody ".self::getAttributes( self::getElementAsArray( $_aAllAttributes, 'tbody' ) ).">" |
|
92 | 92 | . self::___getTableRows( $aArray, $_aAllAttributes, $bEscape ) |
93 | 93 | . "</tbody>" |
94 | 94 | . self::___getTableFooter( $aFooter, $_aAllAttributes, $bEscape ) |
@@ -96,14 +96,14 @@ discard block |
||
96 | 96 | } |
97 | 97 | static private function ___getTableCaption( $sCaption, $aAllAttributes, $bEscape ) { |
98 | 98 | $sCaption = ( string ) $sCaption; |
99 | - if ( ! strlen( $sCaption ) ) { |
|
99 | + if ( !strlen( $sCaption ) ) { |
|
100 | 100 | return ''; |
101 | 101 | } |
102 | 102 | $_aCapAttr = self::getElementAsArray( $aAllAttributes, 'caption' ); |
103 | 103 | $_sCaption = $bEscape |
104 | 104 | ? htmlspecialchars( $sCaption ) |
105 | 105 | : $sCaption; |
106 | - return "<caption " . self::getAttributes( $_aCapAttr ) . ">" |
|
106 | + return "<caption ".self::getAttributes( $_aCapAttr ).">" |
|
107 | 107 | . $_sCaption |
108 | 108 | . "</caption>"; |
109 | 109 | } |
@@ -126,24 +126,24 @@ discard block |
||
126 | 126 | $_aTHAttr1 = self::getElementAsArray( $aAllAttributes, array( 'th', 0 ) ) + $_aTHAttr; |
127 | 127 | $_aTHAttr2 = self::getElementAsArray( $aAllAttributes, array( 'th', 1 ) ) + $_aTHAttr; |
128 | 128 | $_sOutput = ''; |
129 | - foreach( $aHeader as $_sKey => $_sValue ) { |
|
130 | - $_sOutput .= "<tr " . self::getAttributes( $_aTRAttr ) . ">" |
|
131 | - . "<th " . self::getAttributes( $_aTHAttr1 ) . ">" . self::___getHTMLEscaped( $_sKey, $bEscape ) . "</th>" |
|
132 | - . "<th " . self::getAttributes( $_aTHAttr2 ) . ">" . self::___getHTMLEscaped( $_sValue, $bEscape ) . "</th>" |
|
129 | + foreach ( $aHeader as $_sKey => $_sValue ) { |
|
130 | + $_sOutput .= "<tr ".self::getAttributes( $_aTRAttr ).">" |
|
131 | + . "<th ".self::getAttributes( $_aTHAttr1 ).">".self::___getHTMLEscaped( $_sKey, $bEscape )."</th>" |
|
132 | + . "<th ".self::getAttributes( $_aTHAttr2 ).">".self::___getHTMLEscaped( $_sValue, $bEscape )."</th>" |
|
133 | 133 | . "</tr>"; |
134 | 134 | } |
135 | - return "<thead>" . $_sOutput . "</thead>"; |
|
135 | + return "<thead>".$_sOutput."</thead>"; |
|
136 | 136 | } |
137 | 137 | static private function ___getTableHeaderOfMultiColumns( array $aHeader, array $aAllAttributes, $bEscape ) { |
138 | 138 | $_aTRAttr = self::getElementAsArray( $aAllAttributes, 'tr' ); |
139 | 139 | $_aTHAttr = self::getElementAsArray( $aAllAttributes, 'th' ); |
140 | - $_sOutput = "<tr " . self::getAttributes( $_aTRAttr ) . ">"; |
|
141 | - foreach( array_values( $aHeader ) as $_iIndex => $_sColumnName ) { |
|
140 | + $_sOutput = "<tr ".self::getAttributes( $_aTRAttr ).">"; |
|
141 | + foreach ( array_values( $aHeader ) as $_iIndex => $_sColumnName ) { |
|
142 | 142 | $_aTHAttrNth = self::getElementAsArray( $aAllAttributes, array( 'th', $_iIndex ) ) + $_aTHAttr; |
143 | - $_sOutput .= "<th " . self::getAttributes( $_aTHAttrNth ) . ">" . self::___getHTMLEscaped( ( string ) $_sColumnName, $bEscape ) . "</th>"; |
|
143 | + $_sOutput .= "<th ".self::getAttributes( $_aTHAttrNth ).">".self::___getHTMLEscaped( ( string ) $_sColumnName, $bEscape )."</th>"; |
|
144 | 144 | } |
145 | 145 | $_sOutput .= "</tr>"; |
146 | - return "<thead>" . $_sOutput . "</thead>"; |
|
146 | + return "<thead>".$_sOutput."</thead>"; |
|
147 | 147 | } |
148 | 148 | static private function ___getTableFooter( array $aFooter, array $aAllAttributes, $bEscape ) { |
149 | 149 | if ( empty( $aFooter ) ) { |
@@ -160,24 +160,24 @@ discard block |
||
160 | 160 | $_aTDAttr1 = self::getElementAsArray( $aAllAttributes, array( 'td', 0 ) ) + $_aTDAttr; |
161 | 161 | $_aTDAttr2 = self::getElementAsArray( $aAllAttributes, array( 'td', 1 ) ) + $_aTDAttr; |
162 | 162 | $_sOutput = ''; |
163 | - foreach( $aFooter as $_sKey => $_sValue ) { |
|
164 | - $_sOutput = "<tr " . self::getAttributes( $_aTRAttr ) . ">" |
|
165 | - . "<td " . self::getAttributes( $_aTDAttr1 ) . ">" . self::___getHTMLEscaped( $_sKey, $bEscape ) . "</td>" |
|
166 | - . "<td " . self::getAttributes( $_aTDAttr2 ) . ">" . self::___getHTMLEscaped( $_sValue, $bEscape ) . "</td>" |
|
163 | + foreach ( $aFooter as $_sKey => $_sValue ) { |
|
164 | + $_sOutput = "<tr ".self::getAttributes( $_aTRAttr ).">" |
|
165 | + . "<td ".self::getAttributes( $_aTDAttr1 ).">".self::___getHTMLEscaped( $_sKey, $bEscape )."</td>" |
|
166 | + . "<td ".self::getAttributes( $_aTDAttr2 ).">".self::___getHTMLEscaped( $_sValue, $bEscape )."</td>" |
|
167 | 167 | . "</tr>"; |
168 | 168 | } |
169 | - return "<tfoot>" . $_sOutput . "</tfoot>"; |
|
169 | + return "<tfoot>".$_sOutput."</tfoot>"; |
|
170 | 170 | } |
171 | 171 | static private function ___getTableFooterOfMultiColumns( array $aFooter, array $aAllAttributes, $bEscape ) { |
172 | 172 | $_aTRAttr = self::getElementAsArray( $aAllAttributes, 'tr' ); |
173 | 173 | $_aTDAttr = self::getElementAsArray( $aAllAttributes, 'td' ); |
174 | - $_sOutput = "<tr " . self::getAttributes( $_aTRAttr ) . ">"; |
|
175 | - foreach( array_values( $aFooter ) as $_iIndex => $_sColumnName ) { |
|
174 | + $_sOutput = "<tr ".self::getAttributes( $_aTRAttr ).">"; |
|
175 | + foreach ( array_values( $aFooter ) as $_iIndex => $_sColumnName ) { |
|
176 | 176 | $_aTDAttrNth = self::getElementAsArray( $aAllAttributes, array( 'td', $_iIndex ) ) + $_aTDAttr; |
177 | - $_sOutput .= "<td " . self::getAttributes( $_aTDAttrNth ) . ">" . self::___getHTMLEscaped( ( string ) $_sColumnName, $bEscape ) . "</td>"; |
|
177 | + $_sOutput .= "<td ".self::getAttributes( $_aTDAttrNth ).">".self::___getHTMLEscaped( ( string ) $_sColumnName, $bEscape )."</td>"; |
|
178 | 178 | } |
179 | 179 | $_sOutput .= "</tr>"; |
180 | - return "<tfoot>" . $_sOutput . "</tfoot>"; |
|
180 | + return "<tfoot>".$_sOutput."</tfoot>"; |
|
181 | 181 | } |
182 | 182 | static private function ___getTableRows( array $aArray, array $aAllAttributes, $bEscape ) { |
183 | 183 | if ( empty( $aArray ) ) { |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | $_aTDAttrFirst = self::getElementAsArray( $aAllAttributes, array( 'td', 0 ) ) + $_aTDAttr; |
215 | 215 | $_aTDAttrFirst[ 'class' ] = self::getClassAttribute( 'column-key', self::getElement( $_aTDAttrFirst, array( 'class' ), '' ) ); |
216 | 216 | $_sOutput = ''; |
217 | - foreach( $aItem as $_sColumnName => $_asValue ) { |
|
218 | - $_sOutput .= "<tr " . self::getAttributes( $_aTRAttr ) . ">"; |
|
219 | - $_sOutput .= "<td " . self::getAttributes( $_aTDAttrFirst ) . ">" |
|
220 | - . "<p " . self::getAttributes( $_aPAttr ) . ">" . self::___getHTMLEscaped( $_sColumnName, $bEscape ) . "</p>" |
|
217 | + foreach ( $aItem as $_sColumnName => $_asValue ) { |
|
218 | + $_sOutput .= "<tr ".self::getAttributes( $_aTRAttr ).">"; |
|
219 | + $_sOutput .= "<td ".self::getAttributes( $_aTDAttrFirst ).">" |
|
220 | + . "<p ".self::getAttributes( $_aPAttr ).">".self::___getHTMLEscaped( $_sColumnName, $bEscape )."</p>" |
|
221 | 221 | . "</td>"; |
222 | 222 | $_sOutput .= self::___getColumnValue( $_asValue, $aAllAttributes, $bEscape, 1 ); |
223 | 223 | $_sOutput .= "</tr>"; |
@@ -231,15 +231,15 @@ discard block |
||
231 | 231 | static private function ___getRowsOfMultiColumns( array $aArray, array $aAllAttributes, $bEscape ) { |
232 | 232 | $_aTRAttr = self::getElementAsArray( $aAllAttributes, 'tr' ); |
233 | 233 | $_sOutput = ''; |
234 | - foreach( $aArray as $_iRowIndex => $_asValue ) { |
|
234 | + foreach ( $aArray as $_iRowIndex => $_asValue ) { |
|
235 | 235 | if ( is_scalar( $_asValue ) ) { |
236 | - $_sOutput .= "<tr " . self::getAttributes( $_aTRAttr ) . ">" |
|
236 | + $_sOutput .= "<tr ".self::getAttributes( $_aTRAttr ).">" |
|
237 | 237 | . self::___getColumnValue( $_asValue, $aAllAttributes, $bEscape, 0 ) |
238 | 238 | . "</tr>"; |
239 | 239 | continue; |
240 | 240 | } |
241 | 241 | $_aColumns = self::getAsArray( $_asValue ); |
242 | - $_sOutput .= "<tr " . self::getAttributes( $_aTRAttr ) . ">" |
|
242 | + $_sOutput .= "<tr ".self::getAttributes( $_aTRAttr ).">" |
|
243 | 243 | . self::___getColumns( $_aColumns, $aAllAttributes, $bEscape ) |
244 | 244 | . "</tr>"; |
245 | 245 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | static private function ___getColumns( array $aColumns, $aAllAttributes, $bEscape ) { |
249 | 249 | $_sOutput = ''; |
250 | - foreach( array_values( $aColumns ) as $_iIndex => $_asValue ) { |
|
250 | + foreach ( array_values( $aColumns ) as $_iIndex => $_asValue ) { |
|
251 | 251 | $_sOutput .= self::___getColumnValue( $_asValue, $aAllAttributes, $bEscape, $_iIndex ); |
252 | 252 | } |
253 | 253 | return $_sOutput; |
@@ -269,24 +269,24 @@ discard block |
||
269 | 269 | if ( is_null( $mValue ) ) { |
270 | 270 | $mValue = '(null)'; |
271 | 271 | } |
272 | - $_aPAttr = self::getElementAsArray( $aAllAttributes, 'p' ); |
|
272 | + $_aPAttr = self::getElementAsArray( $aAllAttributes, 'p' ); |
|
273 | 273 | if ( is_scalar( $mValue ) ) { |
274 | - return "<td " . self::getAttributes( $_aTDAttrNth ) . ">" |
|
275 | - . "<p " . self::getAttributes( $_aPAttr ) . ">" . self::___getHTMLEscaped( $mValue, $bEscape ) . "</p>" |
|
274 | + return "<td ".self::getAttributes( $_aTDAttrNth ).">" |
|
275 | + . "<p ".self::getAttributes( $_aPAttr ).">".self::___getHTMLEscaped( $mValue, $bEscape )."</p>" |
|
276 | 276 | . "</td>"; |
277 | 277 | } |
278 | 278 | if ( is_array( $mValue ) ) { |
279 | 279 | return self::isAssociativeArray( $mValue ) || self::isMultiDimensional( $mValue ) |
280 | - ? "<td " . self::getAttributes( $_aTDAttrNth ) . ">" |
|
280 | + ? "<td ".self::getAttributes( $_aTDAttrNth ).">" |
|
281 | 281 | . self::getTableOfKeyValues( $mValue, $aAllAttributes ) |
282 | 282 | . "</td>" |
283 | - : "<td " . self::getAttributes( $_aTDAttrNth ) . ">" |
|
283 | + : "<td ".self::getAttributes( $_aTDAttrNth ).">" |
|
284 | 284 | // @todo may ought to be numeric-rows table |
285 | 285 | . self::___getList( $mValue, $aAllAttributes, $bEscape ) |
286 | 286 | . "</td>"; |
287 | 287 | } |
288 | - return "<td " . self::getAttributes( $_aTDAttrNth ) . ">" |
|
289 | - . '(' . gettype( $mValue ) . ')' . ( is_object( $mValue ) ? get_class( $mValue ) : '' ) |
|
288 | + return "<td ".self::getAttributes( $_aTDAttrNth ).">" |
|
289 | + . '('.gettype( $mValue ).')'.( is_object( $mValue ) ? get_class( $mValue ) : '' ) |
|
290 | 290 | . "</td>"; |
291 | 291 | } |
292 | 292 | /** |
@@ -303,16 +303,16 @@ discard block |
||
303 | 303 | if ( empty( $aArray ) ) { |
304 | 304 | return ''; |
305 | 305 | } |
306 | - $_sList = "<ul " . self::getAttributes( $_aULAttr ) . ">"; |
|
307 | - foreach( $aArray as $_asValue ) { |
|
306 | + $_sList = "<ul ".self::getAttributes( $_aULAttr ).">"; |
|
307 | + foreach ( $aArray as $_asValue ) { |
|
308 | 308 | $_sItem = is_array( $_asValue ) |
309 | 309 | ? self::___getList( $_asValue, $aAllAttributes, $bEscape ) |
310 | 310 | : self::___getHTMLEscaped( $_asValue, $bEscape ); |
311 | - $_sList .= "<li " . self::getAttributes( $_aLIAttr ) . ">" |
|
311 | + $_sList .= "<li ".self::getAttributes( $_aLIAttr ).">" |
|
312 | 312 | . $_sItem |
313 | 313 | . "</li>"; |
314 | 314 | } |
315 | - $_sList .= "</ul>"; |
|
315 | + $_sList .= "</ul>"; |
|
316 | 316 | return $_sList; |
317 | 317 | } |
318 | 318 |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | * @since 3.8.9 |
28 | 28 | * @since 3.8.32 Moved from `AdminPageFramework_Debug_Base` and renamed from `___getArrayMappedRecursive()` and made public as a part of the utility class. |
29 | 29 | */ |
30 | - static public function getArrayMappedRecursive( $cCallback, $aArray, array $aArguments=array() ) { |
|
30 | + static public function getArrayMappedRecursive( $cCallback, $aArray, array $aArguments = array() ) { |
|
31 | 31 | $_aOutput = array(); |
32 | - foreach( $aArray as $_isKey => $_vValue ) { |
|
32 | + foreach ( $aArray as $_isKey => $_vValue ) { |
|
33 | 33 | if ( is_array( $_vValue ) ) { |
34 | 34 | $_aOutput[ $_isKey ] = self::getArrayMappedRecursive( $cCallback, $_vValue, $aArguments ); |
35 | 35 | continue; |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | * @return numeric |
47 | 47 | * @since 3.7.4 |
48 | 48 | */ |
49 | - static public function getUnusedNumericIndex( $aArray, $nIndex, $iOffset=1 ) { |
|
49 | + static public function getUnusedNumericIndex( $aArray, $nIndex, $iOffset = 1 ) { |
|
50 | 50 | |
51 | 51 | // Check if the order value is not used. |
52 | - if ( ! isset( $aArray[ $nIndex ] ) ) { |
|
52 | + if ( !isset( $aArray[ $nIndex ] ) ) { |
|
53 | 53 | return $nIndex; |
54 | 54 | } |
55 | 55 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @return boolean |
65 | 65 | */ |
66 | 66 | static public function isAssociative( array $aArray ) { |
67 | - return array_keys ( $aArray ) !== range( 0, count( $aArray ) - 1 ); |
|
67 | + return array_keys( $aArray ) !== range( 0, count( $aArray ) - 1 ); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |