Skip to content

Commit ebb4645

Browse files
authored
Change property Schema::$typeMap to constant Schema::TYPE_MAP (#248)
1 parent dae9a9c commit ebb4645

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 1.2.1 under development
44

5-
- no changes in this release.
5+
- Enh #248: Change property `Schema::$typeMap` to constant `Schema::TYPE_MAP` (@Tigrov)
66

77
## 1.2.0 November 12, 2023
88

src/Schema.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@
6767
final class Schema extends AbstractPdoSchema
6868
{
6969
/**
70-
* @var array The mapping from physical column types (keys) to abstract column types (values).
70+
* The mapping from physical column types (keys) to abstract column types (values).
7171
*
7272
* @link https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/Data-Types.html
7373
*
74-
* @psalm-var string[]
74+
* @var string[]
7575
*/
76-
private array $typeMap = [
76+
private const TYPE_MAP = [
7777
'char' => self::TYPE_CHAR,
7878
'nchar' => self::TYPE_CHAR,
7979
'varchar2' => self::TYPE_STRING,
@@ -664,7 +664,7 @@ private function extractColumnType(ColumnSchemaInterface $column): string
664664
return self::TYPE_STRING;
665665
}
666666

667-
return $this->typeMap[$dbType] ?? self::TYPE_STRING;
667+
return self::TYPE_MAP[$dbType] ?? self::TYPE_STRING;
668668
}
669669

670670
/**

0 commit comments

Comments
 (0)