Skip to content

Commit 454d9a6

Browse files
committed
Removed type declarations on field code to support outdated versions of PHP
Signed-off-by: Kevin Provance <[email protected]>
1 parent eeaf12d commit 454d9a6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

redux-core/inc/classes/class-redux-field.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,13 @@ public function media_query( string $style_data = '' ) {
230230
}
231231

232232
/**
233-
* CSS for field output, if set.
233+
* CSS for field output, if set (Remove the noinpection line and fix this function when we drop support for PHP 7.1).
234234
*
235235
* @param string $style CSS string.
236+
*
237+
* @noinspection PhpMissingParamTypeInspection
236238
*/
237-
public function output( string $style = '' ) {
239+
public function output( $style = '' ) {
238240
if ( '' !== $style ) {
239241

240242
// Force output value into an array.

redux-core/inc/classes/class-redux-wordpress-data.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ private function order_data( array $data = array(), string $sort = 'value', stri
226226
* @param array|string $args Arguments to pass.
227227
* @param mixed|array $current_value If a current value already set in the database.
228228
*
229-
* @return array
229+
* @return array|null|string
230230
*/
231-
private function get_data( string $type, $args, $current_value ): array {
231+
private function get_data( string $type, $args, $current_value ) {
232232
$args = $this->get_arg_defaults( $type, $args );
233233

234234
$opt_name = $this->opt_name;

0 commit comments

Comments
 (0)