JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $droppedForeignKeys * @param array $addedColumns * @param array $changedColumns * @param array $droppedColumns * @param array $addedIndexes * @param array $modifiedIndexes * @param array $droppedIndexes * @param array $renamedIndexes * @param array $addedForeignKeys * @param array $modifiedForeignKeys */ public function __construct( private readonly Table $oldTable, private readonly array $addedColumns = [], private readonly array $changedColumns = [], private readonly array $droppedColumns = [], private array $addedIndexes = [], private readonly array $modifiedIndexes = [], private array $droppedIndexes = [], private readonly array $renamedIndexes = [], private readonly array $addedForeignKeys = [], private readonly array $modifiedForeignKeys = [], private readonly array $droppedForeignKeys = [], ) { } public function getOldTable(): Table { return $this->oldTable; } /** @return array */ public function getAddedColumns(): array { return $this->addedColumns; } /** @return array */ public function getChangedColumns(): array { return $this->changedColumns; } /** * @deprecated Use {@see getChangedColumns()} instead. * * @return list */ public function getModifiedColumns(): array { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/6280', '%s is deprecated, use `getChangedColumns()` instead.', __METHOD__, ); return array_values(array_filter( $this->getChangedColumns(), static fn (ColumnDiff $diff): bool => $diff->countChangedProperties() > ($diff->hasNameChanged() ? 1 : 0), )); } /** * @deprecated Use {@see getChangedColumns()} instead. * * @return array */ public function getRenamedColumns(): array { Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/6280', '%s is deprecated, you should use `getChangedColumns()` instead.', __METHOD__, ); $renamed = []; foreach ($this->getChangedColumns() as $diff) { if (! $diff->hasNameChanged()) { continue; } $oldColumnName = $diff->getOldColumn()->getName(); $renamed[$oldColumnName] = $diff->getNewColumn(); } return $renamed; } /** @return array */ public function getDroppedColumns(): array { return $this->droppedColumns; } /** @return array */ public function getAddedIndexes(): array { return $this->addedIndexes; } /** * @internal This method exists only for compatibility with the current implementation of schema managers * that modify the diff while processing it. */ public function unsetAddedIndex(Index $index): void { $this->addedIndexes = array_filter( $this->addedIndexes, static function (Index $addedIndex) use ($index): bool { return $addedIndex !== $index; }, ); } /** @return array */ public function getModifiedIndexes(): array { return $this->modifiedIndexes; } /** @return array */ public function getDroppedIndexes(): array { return $this->droppedIndexes; } /** * @internal This method exists only for compatibility with the current implementation of schema managers * that modify the diff while processing it. */ public function unsetDroppedIndex(Index $index): void { $this->droppedIndexes = array_filter( $this->droppedIndexes, static function (Index $droppedIndex) use ($index): bool { return $droppedIndex !== $index; }, ); } /** @return array */ public function getRenamedIndexes(): array { return $this->renamedIndexes; } /** @return array */ public function getAddedForeignKeys(): array { return $this->addedForeignKeys; } /** @return array */ public function getModifiedForeignKeys(): array { return $this->modifiedForeignKeys; } /** @return array */ public function getDroppedForeignKeys(): array { return $this->droppedForeignKeys; } /** * Returns whether the diff is empty (contains no changes). */ public function isEmpty(): bool { return count($this->addedColumns) === 0 && count($this->changedColumns) === 0 && count($this->droppedColumns) === 0 && count($this->addedIndexes) === 0 && count($this->modifiedIndexes) === 0 && count($this->droppedIndexes) === 0 && count($this->renamedIndexes) === 0 && count($this->addedForeignKeys) === 0 && count($this->modifiedForeignKeys) === 0 && count($this->droppedForeignKeys) === 0; } }