Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions stubs/DBAL/Connection.stub
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,100 @@ class Connection
*/
public function transactional(Closure $func);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return array<string, mixed>|false
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAssociative(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return list<mixed>|false
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchNumeric(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return mixed
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchOne(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return list<list<mixed>>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllNumeric(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return list<array<string,mixed>>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllAssociative(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return array<mixed,mixed>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllKeyValue(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return array<mixed,array<string,mixed>>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
*
* @return list<mixed>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchFirstColumn(string $query, array $params = [], array $types = []);

}
96 changes: 96 additions & 0 deletions stubs/DBAL/Connection4.stub
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,100 @@ class Connection
*/
public function transactional(Closure $func);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return array<string, mixed>|false
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAssociative(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return list<mixed>|false
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchNumeric(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return mixed
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchOne(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return list<list<mixed>>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllNumeric(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return list<array<string,mixed>>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllAssociative(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return array<mixed,mixed>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllKeyValue(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return array<mixed,array<string,mixed>>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []);

/**
* @param list<mixed>|array<string, mixed> $params
* @param WrapperParameterTypeArray $types
*
* @return list<mixed>
*
* @throws Exception
*
* @phpstan-impure
*/
public function fetchFirstColumn(string $query, array $params = [], array $types = []);

}
Loading