Skip to content

Commit a20ce0b

Browse files
Uh-oh who reverted this 🤯
1 parent 8cca827 commit a20ce0b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/MartinGeorgiev/Doctrine/DBAL/Types/BaseArray.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ public function convertToDatabaseValue($phpArray, AbstractPlatform $platform): ?
3838

3939
foreach ($phpArray as &$item) {
4040
if (!$this->isValidArrayItemForDatabase($item)) {
41-
$exceptionMessage = 'One or more of the items given doesn\'t look valid.';
41+
$exceptionMessage = "One or more of the items given doesn't look valid.";
4242

4343
throw new ConversionException($exceptionMessage);
4444
}
45+
4546
$item = $this->transformArrayItemForPostgres($item);
4647
}
4748

@@ -51,7 +52,7 @@ public function convertToDatabaseValue($phpArray, AbstractPlatform $platform): ?
5152
/**
5253
* Tests if given PHP array item is from compatible type for PostgreSQL.
5354
*/
54-
protected function isValidArrayItemForDatabase(mixed $item): bool
55+
public function isValidArrayItemForDatabase(mixed $item): bool
5556
{
5657
return true;
5758
}
@@ -76,6 +77,7 @@ public function convertToPHPValue($postgresArray, AbstractPlatform $platform): ?
7677
if ($postgresArray === null) {
7778
return null;
7879
}
80+
7981
if (!\is_string($postgresArray)) {
8082
$exceptionMessage = 'Given PostgreSQL value content type is not PHP string. Instead it is "%s".';
8183

@@ -105,7 +107,7 @@ protected function transformPostgresArrayToPHPArray(string $postgresArray): arra
105107
*
106108
* @return mixed
107109
*/
108-
protected function transformArrayItemForPHP(mixed $item)
110+
public function transformArrayItemForPHP(mixed $item)
109111
{
110112
return $item;
111113
}

0 commit comments

Comments
 (0)