Skip to content

Commit 3b3cc7e

Browse files
committed
Fixing some variable names
1 parent b64dbe0 commit 3b3cc7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Schema/Traits/Custom_Table_Query_Methods.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,12 +692,12 @@ public static function get_all_by( string $column, $value, string $operator = '=
692692

693693
$database = Config::get_db();
694694
$results = [];
695-
foreach ( static::fetch_all_where( $database::prepare( "WHERE %i {$operator} {$placeholder}", ...array_filter( [ $column, ...self::ensure_array( $value ) ], static fn( $v ) => null !== $v ) ), $limit, ARRAY_A, $order_by ) as $task_array ) {
696-
if ( empty( $task_array[ static::uid_column() ] ) ) {
695+
foreach ( static::fetch_all_where( $database::prepare( "WHERE %i {$operator} {$placeholder}", ...array_filter( [ $column, ...self::ensure_array( $value ) ], static fn( $v ) => null !== $v ) ), $limit, ARRAY_A, $order_by ) as $data_array ) {
696+
if ( empty( $data_array[ static::uid_column() ] ) ) {
697697
continue;
698698
}
699699

700-
$results[] = static::transform_from_array( self::amend_value_types( $task_array ) );
700+
$results[] = static::transform_from_array( self::amend_value_types( $data_array ) );
701701
}
702702

703703
return $results;
@@ -720,13 +720,13 @@ public static function get_first_by( string $column, $value ) {
720720
[ $value, $placeholder ] = self::prepare_value_for_query( $column, $value );
721721

722722
$database = Config::get_db();
723-
$task_array = static::fetch_first_where( $database::prepare( "WHERE %i = {$placeholder}", ...array_filter( [ $column, ...self::ensure_array( $value ) ], static fn( $v ) => null !== $v ) ), ARRAY_A );
723+
$data_array = static::fetch_first_where( $database::prepare( "WHERE %i = {$placeholder}", ...array_filter( [ $column, ...self::ensure_array( $value ) ], static fn( $v ) => null !== $v ) ), ARRAY_A );
724724

725-
if ( empty( $task_array[ static::uid_column() ] ) ) {
725+
if ( empty( $data_array[ static::uid_column() ] ) ) {
726726
return null;
727727
}
728728

729-
return static::transform_from_array( self::amend_value_types( $task_array ) );
729+
return static::transform_from_array( self::amend_value_types( $data_array ) );
730730
}
731731

732732
/**

0 commit comments

Comments
 (0)