Skip to content

Commit

Permalink
Fix class name casing
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Dec 2, 2023
1 parent 7e5fa51 commit 181f70b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/Internal/PgSqlHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ final class PgSqlHandle extends AbstractHandle
\PGSQL_DIAG_SOURCE_FUNCTION => "source_function",
];

/** @var array<string, array<int, PgsqlType>> */
/** @var array<string, array<int, PgSqlType>> */
private static array $typeCache;

private static ?\Closure $errorHandler = null;

/** @var \PgSql\Connection PostgreSQL connection handle. */
private ?\PgSql\Connection $handle;

/** @var array<int, PgsqlType> */
/** @var array<int, PgSqlType> */
private readonly array $types;

/** @var array<non-empty-string, StatementStorage<string>> */
Expand Down Expand Up @@ -161,7 +161,7 @@ public function __construct(
}

/**
* @return array<int, PgsqlType>
* @return array<int, PgSqlType>
*/
private static function fetchTypes(\PgSql\Connection $handle): array
{
Expand All @@ -174,7 +174,7 @@ private static function fetchTypes(\PgSql\Connection $handle): array
[$oid, $type, $delimiter, $element] = $row;
\assert(\is_numeric($oid) && \is_numeric($element), "OID and element type expected to be integers");
\assert(\is_string($type) && \is_string($delimiter), "Unexpected types in type catalog query results");
$types[(int) $oid] = new PgsqlType($type, $delimiter, (int) $element);
$types[(int) $oid] = new PgSqlType($type, $delimiter, (int) $element);
}

return $types;
Expand Down
6 changes: 3 additions & 3 deletions src/Internal/PgSqlResultIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
final class PgSqlResultIterator
{
/**
* @param array<int, PgsqlType> $types
* @param array<int, PgSqlType> $types
*
* @return \Iterator<int, TRowType>
*/
Expand All @@ -23,7 +23,7 @@ public static function iterate(\PgSql\Result $handle, array $types): \Iterator
}

/**
* @param array<int, PgsqlType> $types
* @param array<int, PgSqlType> $types
*/
private function __construct(
private readonly \PgSql\Result $handle,
Expand Down Expand Up @@ -74,7 +74,7 @@ private function cast(int $oid, ?string $value): array|bool|int|float|string|nul
return null;
}

$type = $this->types[$oid] ?? PgsqlType::getDefaultType();
$type = $this->types[$oid] ?? PgSqlType::getDefaultType();

return match ($type->type) {
'A' => ArrayParser::parse( // Array
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/PgSqlResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class PgSqlResultSet implements PostgresResult, \IteratorAggregate
private readonly int $columnCount;

/**
* @param array<int, PgsqlType> $types
* @param array<int, PgSqlType> $types
* @param Future<PostgresResult|null> $nextResult
*/
public function __construct(
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/PgsqlType.php → src/Internal/PgSqlType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Amp\Postgres\Internal;

/** @internal */
final class PgsqlType
final class PgSqlType
{
private static ?self $default = null;

Expand Down

0 comments on commit 181f70b

Please sign in to comment.