8000 Add missing types · symfony/symfony@d20e06d · GitHub
[go: up one dir, main page]

Skip to content

Commit d20e06d

Browse files
committed
Add missing types
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 032431b commit d20e06d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/Symfony/Component/Cache/Adapter/CouchbaseCollectionAdapter.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ class CouchbaseCollectionAdapter extends AbstractAdapter
3030
private const THIRTY_DAYS_IN_SECONDS = 2592000;
3131
private const MAX_KEY_LENGTH = 250;
3232

33-
/** @var Collection */
34-
private $connection;
35-
private $marshaller;
33+
private Collection $connection;
34+
private MarshallerInterface $marshaller;
3635

3736
public function __construct(Collection $connection, string $namespace = '', int $defaultLifetime = 0, MarshallerInterface $marshaller = null)
3837
{
@@ -49,17 +48,10 @@ public function __construct(Collection $connection, string $namespace = '', int
4948
$this->marshaller = $marshaller ?? new DefaultMarshaller();
5049
}
5150

52-
/**
53-
* @param array|string $dsn
54-
*
55-
* @return Bucket|Collection
56-
*/
57-
public static function createConnection($dsn, array $options = [])
51+
public static function createConnection(array|string $dsn, array $options = []): Bucket|Collection
5852
{
5953
if (\is_string($dsn)) {
6054
$dsn = [$dsn];
61-
} elseif (!\is_array($dsn)) {
62-
throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be array or string, "%s" given.', __METHOD__, get_debug_type($dsn)));
6355
}
6456

6557
if (!static::isSupported()) {

0 commit comments

Comments
 (0)
0