Skip to content

Commit

Permalink
Remove duplicate code move to yiisoft/db/Schema::class. (#179)
Browse files Browse the repository at this point in the history
* Remove duplicate code move to yiisoft/db/Schema::class.
  • Loading branch information
terabytesoftw committed Dec 10, 2022
1 parent 07ad9b3 commit f365d42
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/Schema.php
Expand Up @@ -21,7 +21,6 @@
use Yiisoft\Db\Schema\Schema as AbstractSchema;
use Yiisoft\Db\Schema\TableSchemaInterface;

use function array_change_key_case;
use function array_merge;
use function array_unique;
use function array_values;
Expand Down Expand Up @@ -1081,21 +1080,4 @@ protected function getCacheTag(): string
{
return md5(serialize(array_merge([self::class], $this->db->getCacheKey())));
}

/**
* Changes row's array key case to lower.
*
* @param array $row row's array or an array of row's arrays.
* @param bool $multiple whether multiple rows or a single row passed.
*
* @return array normalized row or rows.
*/
protected function normalizeRowKeyCase(array $row, bool $multiple): array
{
if ($multiple) {
return array_map(static fn (array $row) => array_change_key_case($row, CASE_LOWER), $row);
}

return array_change_key_case($row, CASE_LOWER);
}
}

0 comments on commit f365d42

Please sign in to comment.