@@ -110,7 +110,6 @@ |
||
110 | 110 | * Retrieves the settings error array set by the user in the validation callback. |
111 | 111 | * |
112 | 112 | * @since 3.7.8 |
113 | - * @param boolean $bDelete whether or not the transient should be deleted after retrieving it. |
|
114 | 113 | * @return array |
115 | 114 | */ |
116 | 115 | public function get() { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $_sTabSlug = $this->getElement( $_GET, 'tab', '' ); |
58 | 58 | $_sUserID = get_current_user_id(); |
59 | 59 | |
60 | - return "apf_li_" . md5( |
|
60 | + return "apf_li_".md5( |
|
61 | 61 | $_sPageNow |
62 | 62 | . $_sPageSlug |
63 | 63 | . $_sTabSlug |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | * @return void |
96 | 96 | */ |
97 | 97 | public function _replyToSave() { |
98 | - if ( ! isset( self::$_aLastInputs ) ) { |
|
98 | + if ( !isset( self::$_aLastInputs ) ) { |
|
99 | 99 | return; |
100 | 100 | } |
101 | 101 | $this->setTransient( |
102 | 102 | $this->sTransientKey, |
103 | 103 | self::$_aLastInputs, |
104 | - 60*60 // store it for 1 hour |
|
104 | + 60 * 60 // store it for 1 hour |
|
105 | 105 | ); |
106 | 106 | } |
107 | 107 | |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | $_aLastInputs = self::$_aCaches[ $this->sTransientKey ]; |
122 | 122 | } else { |
123 | 123 | $_aLastInputs = $this->getTransient( $this->sTransientKey ); |
124 | - self::$_aCaches[ $this->sTransientKey ] = $_aLastInputs; |
|
124 | + self::$_aCaches[ $this->sTransientKey ] = $_aLastInputs; |
|
125 | 125 | if ( false !== $_aLastInputs ) { |
126 | - $this->delete(); // deletes at the end of the script. |
|
126 | + $this->delete(); // deletes at the end of the script. |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 |
@@ -77,6 +77,8 @@ |
||
77 | 77 | } |
78 | 78 | /** |
79 | 79 | * @since 3.6.0 |
80 | + * @param boolean $abCollapsible |
|
81 | + * @param string $sTitle |
|
80 | 82 | * @return array |
81 | 83 | */ |
82 | 84 | private function _getArguments( $abCollapsible, $sTitle, array $aSection ) { |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | * @since 3.6.0 Moved from `AdminPageFramework_FormDefinition`. |
25 | 25 | */ |
26 | 26 | static public $aStructure = array( |
27 | - 'title' => null, // (string) the section title will be assigned by default in the section formatting method. |
|
28 | - 'is_collapsed' => true, // (boolean) whether it is already collapsed or expanded |
|
29 | - 'toggle_all_button' => null, // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`. |
|
30 | - 'collapse_others_on_expand' => true, // (boolean) whether the other collapsible sections should be folded when the section is unfolded. |
|
31 | - 'container' => 'sections', // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted. |
|
32 | - 'type' => 'box', // 3.7.0+ (string) supported types 'box', 'button' Default: `box`. The `button` type is only supported when the `container` argument is `section`. |
|
27 | + 'title' => null, // (string) the section title will be assigned by default in the section formatting method. |
|
28 | + 'is_collapsed' => true, // (boolean) whether it is already collapsed or expanded |
|
29 | + 'toggle_all_button' => null, // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`. |
|
30 | + 'collapse_others_on_expand' => true, // (boolean) whether the other collapsible sections should be folded when the section is unfolded. |
|
31 | + 'container' => 'sections', // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted. |
|
32 | + 'type' => 'box', // 3.7.0+ (string) supported types 'box', 'button' Default: `box`. The `button` type is only supported when the `container` argument is `section`. |
|
33 | 33 | ); |
34 | 34 | |
35 | 35 | public $abCollapsible = false; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @remark The framework will not pass this parameter when formatting a section definition array. |
43 | 43 | * It will be passed when the framework is rendering a form table to generate collapsible elements. |
44 | 44 | */ |
45 | - public $aSection = array(); |
|
45 | + public $aSection = array(); |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * Sets up properties. |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | |
86 | 86 | $_aCollapsible = $this->getAsArray( $this->abCollapsible ) + array( |
87 | 87 | 'title' => $sTitle, |
88 | - ) + self::$aStructure; |
|
88 | + ) + self::$aStructure; |
|
89 | 89 | |
90 | 90 | $_aCollapsible[ 'toggle_all_button' ] = implode( |
91 | 91 | ',', |
92 | 92 | $this->getAsArray( $_aCollapsible[ 'toggle_all_button' ] ) |
93 | 93 | ); |
94 | 94 | |
95 | - if ( ! empty( $aSection ) ) { |
|
95 | + if ( !empty( $aSection ) ) { |
|
96 | 96 | $_aCollapsible[ 'toggle_all_button' ] = $this->_getToggleAllButtonArgument( |
97 | 97 | $_aCollapsible[ 'toggle_all_button' ], |
98 | 98 | $aSection |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | private function _getToggleAllButtonArgument( $sToggleAll, array $aSection ) { |
118 | 118 | |
119 | - if ( ! $aSection[ 'repeatable' ] ) { |
|
119 | + if ( !$aSection[ 'repeatable' ] ) { |
|
120 | 120 | return $sToggleAll; |
121 | 121 | } |
122 | 122 | |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | // Disable the toggle all button for middle sub-sections in repeatable sections. |
129 | - if ( ! $aSection[ '_is_first_index' ] && ! $aSection[ '_is_last_index' ] ) { |
|
129 | + if ( !$aSection[ '_is_first_index' ] && !$aSection[ '_is_last_index' ] ) { |
|
130 | 130 | return 0; |
131 | 131 | } |
132 | 132 | |
133 | 133 | $_aToggleAll = $this->getAOrB( |
134 | - true === $sToggleAll || 1 === $sToggleAll, // evaluate |
|
135 | - array( 'top-right', 'bottom-right' ), // if true |
|
134 | + true === $sToggleAll || 1 === $sToggleAll, // evaluate |
|
135 | + array( 'top-right', 'bottom-right' ), // if true |
|
136 | 136 | explode( ',', $sToggleAll ) // if false |
137 | 137 | ); |
138 | 138 | $_aToggleAll = $this->getAOrB( |
@@ -98,6 +98,7 @@ discard block |
||
98 | 98 | * @since DEVVER Moved from `AdminPageFramework_FormDefinition`. Changed the name from `formatFields()`. |
99 | 99 | * Added the `$aSectionsets` parameter. |
100 | 100 | * @retuen array |
101 | + * @param string $sCapability |
|
101 | 102 | */ |
102 | 103 | private function _getFieldsetsFormatted( array $aFieldsets, array $aSectionsets, $sCapability ) { |
103 | 104 | |
@@ -271,6 +272,7 @@ discard block |
||
271 | 272 | * |
272 | 273 | * @since 3.0.0 |
273 | 274 | * @since DEVVER Moved from `AdminPageFramework_FormDefinition`. Changed the name from `formatField()`. |
275 | + * @param integer $iCountOfElements |
|
274 | 276 | * @return array|void An array of formatted field definition array. If required keys are not set, nothing will be returned. |
275 | 277 | */ |
276 | 278 | private function _getFieldsetFormatted( $aFieldset, $aSectionsets, $sCapability, $iCountOfElements, $iSubSectionIndex, $bIsSectionRepeatable, $oCallerObject ) { |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | private function _getFieldsetsFormatted( array $aFieldsets, array $aSectionsets, $sCapability ) { |
104 | 104 | |
105 | 105 | $_aNewFieldsets = array(); |
106 | - foreach( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
106 | + foreach ( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
107 | 107 | |
108 | 108 | // If the section is not set, skip. |
109 | - if ( ! isset( $aSectionsets[ $_sSectionPath ] ) ) { |
|
109 | + if ( !isset( $aSectionsets[ $_sSectionPath ] ) ) { |
|
110 | 110 | continue; |
111 | 111 | } |
112 | 112 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $_aItems, |
116 | 116 | $this->getElement( // 3.6.0+ Get the section's capability |
117 | 117 | $aSectionsets, |
118 | - array( $_sSectionPath, 'capability', ), |
|
118 | + array( $_sSectionPath, 'capability',), |
|
119 | 119 | $sCapability |
120 | 120 | ), |
121 | 121 | $aSectionsets |
@@ -175,16 +175,16 @@ discard block |
||
175 | 175 | */ |
176 | 176 | private function _getNormalFieldsetsFormatted( $aItems, $sCapability, $aSectionsets, $_abSectionRepeatable ) { |
177 | 177 | |
178 | - $_aNewItems = array(); |
|
179 | - foreach( $aItems as $_sFieldID => $_aFieldset ) { |
|
178 | + $_aNewItems = array(); |
|
179 | + foreach ( $aItems as $_sFieldID => $_aFieldset ) { |
|
180 | 180 | |
181 | 181 | // Insert the formatted field definition array. The fields count is needed to set each order value. |
182 | - $_aFieldset = $this->_getFieldsetFormatted( |
|
182 | + $_aFieldset = $this->_getFieldsetFormatted( |
|
183 | 183 | $_aFieldset, |
184 | 184 | $aSectionsets, |
185 | 185 | $sCapability, |
186 | 186 | count( $_aNewItems ), // count of elements - zero based |
187 | - null, // sub-section index |
|
187 | + null, // sub-section index |
|
188 | 188 | $_abSectionRepeatable, |
189 | 189 | $this->oCallerForm |
190 | 190 | ); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * @return boolean |
205 | 205 | */ |
206 | 206 | private function _isSubSections( $aItems, $_abSectionRepeatable ) { |
207 | - if ( ! empty( $_abSectionRepeatable ) ) { |
|
207 | + if ( !empty( $_abSectionRepeatable ) ) { |
|
208 | 208 | return true; |
209 | 209 | } |
210 | 210 | |
@@ -216,9 +216,9 @@ discard block |
||
216 | 216 | private function _getSubSectionsFormatted( $aItems, $sCapability, $aSectionsets, $_abSectionRepeatable ) { |
217 | 217 | |
218 | 218 | $_aNewFieldset = array(); |
219 | - foreach( $this->numerizeElements( $aItems ) as $_iSubSectionIndex => $_aFieldsets ) { |
|
219 | + foreach ( $this->numerizeElements( $aItems ) as $_iSubSectionIndex => $_aFieldsets ) { |
|
220 | 220 | |
221 | - foreach( $_aFieldsets as $_aFieldset ) { |
|
221 | + foreach ( $_aFieldsets as $_aFieldset ) { |
|
222 | 222 | $_iCountElement = count( $this->getElementAsArray( $_aNewFieldset, $_iSubSectionIndex ) ); |
223 | 223 | $_aFieldset = $this->_getFieldsetFormatted( |
224 | 224 | $_aFieldset, |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | if ( empty( $_aFieldset ) ) { |
233 | 233 | continue; |
234 | 234 | } |
235 | - $_aNewFieldset[ $_iSubSectionIndex ][ $_aFieldset['field_id'] ] = $_aFieldset; |
|
235 | + $_aNewFieldset[ $_iSubSectionIndex ][ $_aFieldset[ 'field_id' ] ] = $_aFieldset; |
|
236 | 236 | } |
237 | 237 | uasort( $_aNewFieldset[ $_iSubSectionIndex ], array( $this, 'sortArrayByKey' ) ); |
238 | 238 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | } |
261 | 261 | |
262 | 262 | $_aSortedFields = array(); |
263 | - foreach( $aSectionsets as $_sSectionPath => $_aSecitonset ) { |
|
263 | + foreach ( $aSectionsets as $_sSectionPath => $_aSecitonset ) { |
|
264 | 264 | if ( isset( $aFieldsets[ $_sSectionPath ] ) ) { |
265 | 265 | $_aSortedFields[ $_sSectionPath ] = $aFieldsets[ $_sSectionPath ]; |
266 | 266 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | private function _getFieldsetFormatted( $aFieldset, $aSectionsets, $sCapability, $iCountOfElements, $iSubSectionIndex, $bIsSectionRepeatable, $oCallerObject ) { |
280 | 280 | |
281 | - if ( ! isset( $aFieldset[ 'field_id' ], $aFieldset[ 'type' ] ) ) { |
|
281 | + if ( !isset( $aFieldset[ 'field_id' ], $aFieldset[ 'type' ] ) ) { |
|
282 | 282 | return; |
283 | 283 | } |
284 | 284 |
@@ -30,7 +30,6 @@ |
||
30 | 30 | * Returns the field container attribute array. |
31 | 31 | * |
32 | 32 | * @remark Formatting each sub-field should be performed prior to callign this method. |
33 | - * @param array $aField The (sub-)field definition array. This should have been formatted already. |
|
34 | 33 | * @return array The generated field container attribute array. |
35 | 34 | * @internal |
36 | 35 | * @since 3.5.3 |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Admin Page Framework |
|
4 | - * |
|
5 | - * http://en.michaeluno.jp/admin-page-framework/ |
|
6 | - * Copyright (c) 2013-2016 Michael Uno; Licensed MIT |
|
7 | - * |
|
8 | - */ |
|
3 | + * Admin Page Framework |
|
4 | + * |
|
5 | + * http://en.michaeluno.jp/admin-page-framework/ |
|
6 | + * Copyright (c) 2013-2016 Michael Uno; Licensed MIT |
|
7 | + * |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Provides utility methods which can be accessed among different components of the framework. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @since 3.6.0 |
26 | 26 | */ |
27 | - public $sContext = 'field'; |
|
27 | + public $sContext = 'field'; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Returns the field container attribute array. |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | |
42 | 42 | return array( |
43 | 43 | 'id' => $this->aArguments[ '_field_container_id' ], |
44 | - 'data-type' => $this->aArguments[ 'type' ], // referred by the repeatable field JavaScript script. |
|
44 | + 'data-type' => $this->aArguments[ 'type' ], // referred by the repeatable field JavaScript script. |
|
45 | 45 | // @deprecated 3.6.0 |
46 | 46 | // 'data-id_model' => $this->aArguments[ '_fields_container_id_model' ], // 3.3.1+ |
47 | - 'class' => "admin-page-framework-field admin-page-framework-field-" . $this->aArguments[ 'type' ] |
|
47 | + 'class' => "admin-page-framework-field admin-page-framework-field-".$this->aArguments[ 'type' ] |
|
48 | 48 | . $this->getAOrB( |
49 | 49 | $this->aArguments[ 'attributes' ][ 'disabled' ], |
50 | 50 | ' disabled', |
@@ -60,6 +60,7 @@ |
||
60 | 60 | * |
61 | 61 | * @since 3.1.0 |
62 | 62 | * @since DEVVER Moved from `AdminPageFramework_Form_View___Fieldset`. |
63 | + * @param string $sHeadingMessage |
|
63 | 64 | * @return string The error string message. An empty value if not found. |
64 | 65 | */ |
65 | 66 | private function _getFieldError( $aErrors, $aSectionPath, $aFieldPath, $sHeadingMessage ) { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | private function _getFieldError( $aErrors, $aSectionPath, $aFieldPath, $sHeadingMessage ) { |
66 | 66 | |
67 | 67 | // If this field has a section and the error element is set |
68 | - $_aErrorPath = array_merge( $aSectionPath, $aFieldPath ); |
|
68 | + $_aErrorPath = array_merge( $aSectionPath, $aFieldPath ); |
|
69 | 69 | if ( $this->_hasFieldError( $aErrors, $_aErrorPath ) ) { |
70 | 70 | return "<span class='field-error'>* " |
71 | 71 | . $sHeadingMessage |
@@ -176,6 +176,7 @@ discard block |
||
176 | 176 | * Returns the repeatable fields script. |
177 | 177 | * |
178 | 178 | * @since 2.1.3 |
179 | + * @param string $sFieldsContainerID |
|
179 | 180 | */ |
180 | 181 | protected function _getRepeaterFieldEnablerScript( $sFieldsContainerID, $iFieldCount, $aSettings ) { |
181 | 182 | |
@@ -222,6 +223,7 @@ discard block |
||
222 | 223 | * Returns the sortable fields script. |
223 | 224 | * |
224 | 225 | * @since 3.0.0 |
226 | + * @param string $sFieldsContainerID |
|
225 | 227 | */ |
226 | 228 | protected function _getSortableFieldEnablerScript( $sFieldsContainerID ) { |
227 | 229 |
@@ -189,7 +189,7 @@ |
||
189 | 189 | $_sButtons = |
190 | 190 | "<div class='admin-page-framework-repeatable-field-buttons' {$_sSettingsAttributes} >" |
191 | 191 | . "<a class='repeatable-field-remove-button button-secondary repeatable-field-button button button-small {$_sDashiconMinus}' href='#' title='{$_sRemove}' {$_sVisibility} data-id='{$sFieldsContainerID}'>" |
192 | - . ( $_bDashiconSupported ? '' : '-' ) |
|
192 | + . ( $_bDashiconSupported ? '' : '-' ) |
|
193 | 193 | . "</a>" |
194 | 194 | . "<a class='repeatable-field-add-button button-secondary repeatable-field-button button button-small {$_sDashiconPlus}' href='#' title='{$_sAdd}' data-id='{$sFieldsContainerID}'>" |
195 | 195 | . ( $_bDashiconSupported ? '' : '+' ) |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param object $oMsg An object storing the system messages. |
69 | 69 | * @param array $aCallbacks An array storing the form-field specific callbacks. |
70 | 70 | */ |
71 | - public function __construct( &$aField, $aOptions, $aErrors, &$aFieldTypeDefinitions, &$oMsg, array $aCallbacks=array() ) { |
|
71 | + public function __construct( &$aField, $aOptions, $aErrors, &$aFieldTypeDefinitions, &$oMsg, array $aCallbacks = array() ) { |
|
72 | 72 | |
73 | 73 | // @todo Investigate why the first parameter is passed by reference. |
74 | 74 | |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | $this->aErrors = $this->getAsArray( $aErrors ); |
80 | 80 | $this->oMsg = $oMsg; |
81 | 81 | $this->aCallbacks = $aCallbacks + array( |
82 | - 'hfID' => null, // the input id attribute |
|
83 | - 'hfTagID' => null, // the fieldset/field row container id attribute |
|
84 | - 'hfName' => null, // the input name attribute |
|
85 | - 'hfNameFlat' => null, // the flat input name attribute |
|
82 | + 'hfID' => null, // the input id attribute |
|
83 | + 'hfTagID' => null, // the fieldset/field row container id attribute |
|
84 | + 'hfName' => null, // the input name attribute |
|
85 | + 'hfNameFlat' => null, // the flat input name attribute |
|
86 | 86 | 'hfInputName' => null, |
87 | 87 | 'hfInputNameFlat' => null, |
88 | - 'hfClass' => null, // the class attribute |
|
88 | + 'hfClass' => null, // the class attribute |
|
89 | 89 | ); |
90 | 90 | |
91 | 91 | // 2. Load necessary JavaScript scripts. |
@@ -152,9 +152,9 @@ discard block |
||
152 | 152 | * @since 3.2.0 Added the `$sFieldsType` parameter. |
153 | 153 | * @internal |
154 | 154 | */ |
155 | - private function _loadScripts( $sStructureType='' ) { |
|
155 | + private function _loadScripts( $sStructureType = '' ) { |
|
156 | 156 | |
157 | - if ( 'widget' === $sStructureType && ! self::$_bIsLoadedSScripts_Widget ) { |
|
157 | + if ( 'widget' === $sStructureType && !self::$_bIsLoadedSScripts_Widget ) { |
|
158 | 158 | new AdminPageFramework_Form_View___Script_Widget; |
159 | 159 | self::$_bIsLoadedSScripts_Widget = true; |
160 | 160 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $_sRemove = $this->oMsg->get( 'remove' ); |
184 | 184 | $_sVisibility = $iFieldCount <= 1 ? " style='visibility: hidden;'" : ""; |
185 | 185 | $_sSettingsAttributes = $this->generateDataAttributes( ( array ) $aSettings ); |
186 | - $_bDashiconSupported = false; // version_compare( $GLOBALS['wp_version'], '3.8', '>=' ); |
|
186 | + $_bDashiconSupported = false; // version_compare( $GLOBALS['wp_version'], '3.8', '>=' ); |
|
187 | 187 | $_sDashiconPlus = $_bDashiconSupported ? 'dashicons dashicons-plus' : ''; |
188 | 188 | $_sDashiconMinus = $_bDashiconSupported ? 'dashicons dashicons-minus' : ''; |
189 | 189 | $_sButtons = |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | . "</a>" |
197 | 197 | . "</div>"; |
198 | 198 | $_aJSArray = json_encode( $aSettings ); |
199 | - $_sButtonsHTML = '"' . $_sButtons . '"'; |
|
199 | + $_sButtonsHTML = '"'.$_sButtons.'"'; |
|
200 | 200 | $_sScript = <<<JAVASCRIPTS |
201 | 201 | jQuery( document ).ready( function() { |
202 | 202 | var _nodePositionIndicators = jQuery( '#{$sFieldsContainerID} .admin-page-framework-field .repeatable-field-buttons' ); |
@@ -23,7 +23,6 @@ |
||
23 | 23 | * @internal |
24 | 24 | * @since 3.5.3 |
25 | 25 | * @since 3.6.0 Moved from `AdminPageFramework_FormDefinition`. |
26 | - * @param array $aFieldset a field definition array. |
|
27 | 26 | * @return boolean |
28 | 27 | */ |
29 | 28 | protected function _isSectionSet() { |
@@ -60,6 +60,7 @@ |
||
60 | 60 | /** |
61 | 61 | * Applies the subject string to the set callback filter function. |
62 | 62 | * @since 3.6.0 |
63 | + * @param string $sSubject |
|
63 | 64 | */ |
64 | 65 | protected function _getFiltered( $sSubject ) { |
65 | 66 | return is_callable( $this->hfCallback ) |
@@ -51,9 +51,9 @@ |
||
51 | 51 | $_sIndex = $this->getAOrB( |
52 | 52 | '0' !== $this->sIndex && empty( $this->sIndex ), |
53 | 53 | '', |
54 | - "[" . $this->sIndex . "]" |
|
54 | + "[".$this->sIndex."]" |
|
55 | 55 | ); |
56 | - return $this->_getFiltered( $this->_getFieldName() . $_sIndex ); |
|
56 | + return $this->_getFiltered( $this->_getFieldName().$_sIndex ); |
|
57 | 57 | |
58 | 58 | } |
59 | 59 |
@@ -51,6 +51,7 @@ |
||
51 | 51 | /** |
52 | 52 | * Applies the subject string to the set callback filter function. |
53 | 53 | * @since 3.6.0 |
54 | + * @param string $sSubject |
|
54 | 55 | */ |
55 | 56 | protected function _getFiltered( $sSubject ) { |
56 | 57 | return is_callable( $this->hfCallback ) |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $this->hfCallback, |
36 | 36 | ); |
37 | 37 | $this->aArguments = $_aParameters[ 0 ]; |
38 | - $this->hfCallback = $_aParameters[ 1 ]; |
|
38 | + $this->hfCallback = $_aParameters[ 1 ]; |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | |
84 | 84 | // Extract the first part as it does not have braces |
85 | 85 | $_sName = array_shift( $aParts ); |
86 | - foreach( $aParts as $_sPart ) { |
|
87 | - $_sName .= '[' . $_sPart . ']'; |
|
86 | + foreach ( $aParts as $_sPart ) { |
|
87 | + $_sName .= '['.$_sPart.']'; |
|
88 | 88 | } |
89 | 89 | return $_sName; |
90 | 90 |