Skip to content

Commit 9289cec

Browse files
Remove needless TypeErrors
1 parent b01b78c commit 9289cec

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

HttpCache/HttpCache.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ public function __construct(KernelInterface $kernel, string|StoreInterface $cach
4545

4646
if ($cache instanceof StoreInterface) {
4747
$this->store = $cache;
48-
} elseif (null !== $cache && !\is_string($cache)) {
49-
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a string or a SurrogateInterface, "%s" given.', __METHOD__, get_debug_type($cache)));
5048
} else {
5149
$this->cacheDir = $cache;
5250
}

Secrets/SodiumVault.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
3434
*/
3535
public function __construct(string $secretsDir, string|\Stringable $decryptionKey = null)
3636
{
37-
if (null !== $decryptionKey && !\is_string($decryptionKey) && !$decryptionKey instanceof \Stringable) {
38-
throw new \TypeError(sprintf('Decryption key should be a string or an object that implements the __toString() method, "%s" given.', get_debug_type($decryptionKey)));
39-
}
40-
4137
$this->pathPrefix = rtrim(strtr($secretsDir, '/', \DIRECTORY_SEPARATOR), \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR.basename($secretsDir).'.';
4238
$this->decryptionKey = $decryptionKey;
4339
$this->secretsDir = $secretsDir;

0 commit comments

Comments
 (0)