Skip to content

Commit

Permalink
Attempt to remove of Yiisoft/Array depedency (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdef committed Jan 15, 2023
1 parent 26f75d1 commit 544a63b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Schema.php
Expand Up @@ -5,8 +5,6 @@
namespace Yiisoft\Db\Sqlite;

use Throwable;
use Yiisoft\Arrays\ArrayHelper;
use Yiisoft\Arrays\ArraySorter;
use Yiisoft\Db\Constraint\CheckConstraint;
use Yiisoft\Db\Constraint\Constraint;
use Yiisoft\Db\Constraint\ForeignKeyConstraint;
Expand All @@ -16,6 +14,7 @@
use Yiisoft\Db\Exception\InvalidConfigException;
use Yiisoft\Db\Exception\NotSupportedException;
use Yiisoft\Db\Expression\Expression;
use Yiisoft\Db\Helper\ArrayHelper;
use Yiisoft\Db\Schema\AbstractSchema;
use Yiisoft\Db\Schema\ColumnSchemaBuilderInterface;
use Yiisoft\Db\Schema\ColumnSchemaInterface;
Expand Down Expand Up @@ -207,8 +206,8 @@ protected function loadTableForeignKeys(string $tableName): array
/** @psalm-var NormalizePragmaForeignKeyList $foreignKeysList */
$foreignKeysList = $this->normalizeRowKeyCase($foreignKeysList, true);
/** @psalm-var NormalizePragmaForeignKeyList $foreignKeysList */
$foreignKeysList = ArrayHelper::index($foreignKeysList, null, 'table');
ArraySorter::multisort($foreignKeysList, 'seq', SORT_ASC, SORT_NUMERIC);
$foreignKeysList = ArrayHelper::index($foreignKeysList, null, ['table']);
ArrayHelper::multisort($foreignKeysList, 'seq');

/** @psalm-var NormalizePragmaForeignKeyList $foreignKeysList */
foreach ($foreignKeysList as $table => $foreignKey) {
Expand Down Expand Up @@ -641,7 +640,7 @@ private function getPragmaIndexInfo(string $name): array
->queryAll();
/** @psalm-var Column $column */
$column = $this->normalizeRowKeyCase($column, true);
ArraySorter::multisort($column, 'seqno', SORT_ASC, SORT_NUMERIC);
ArrayHelper::multisort($column, 'seqno');

return $column;
}
Expand Down

0 comments on commit 544a63b

Please sign in to comment.