Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class ImmutableCaster |
||
11 | { |
||
12 | public static function castSchemaToImmutable(Schema $schema): void |
||
13 | { |
||
14 | foreach ($schema->getTables() as $table) { |
||
15 | foreach ($table->getColumns() as $column) { |
||
16 | self::toImmutableType($column); |
||
17 | } |
||
18 | } |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Changes the type of a column to an immutable date type if the type is a date. |
||
23 | * This is needed because by default, when reading a Schema, Doctrine assumes a mutable datetime. |
||
24 | */ |
||
25 | private static function toImmutableType(Column $column): void |
||
37 | } |
||
38 | } |
||
40 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.