Skip to content

Commit 30e8378

Browse files
authored
PHPLIB-1174: Rely on Binary constructor default type (#1121)
Update psalm-baseline.xml to suppress the TooFewArguments error since Psalm is not aware of the Binary constructor's default type.
1 parent 3e60e8d commit 30e8378

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/tutorial/client-side-encryption.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ more than one encryption key or create them dynamically.
3939
use MongoDB\Client;
4040
use MongoDB\Driver\ClientEncryption;
4141

42-
$localKey = new Binary('<binary key data (96 bytes)>', Binary::TYPE_GENERIC);
42+
$localKey = new Binary('<binary key data (96 bytes)>');
4343

4444
$clientEncryptionOpts = [
4545
'keyVaultNamespace' => 'encryption.__keyVault',
@@ -78,7 +78,7 @@ side.
7878
use MongoDB\Client;
7979
use MongoDB\Driver\ClientEncryption;
8080

81-
$localKey = new Binary('<binary key data (96 bytes)>', Binary::TYPE_GENERIC);
81+
$localKey = new Binary('<binary key data (96 bytes)>');
8282
$encryptionOpts = [
8383
'keyVaultNamespace' => 'encryption.__keyVault',
8484
'kmsProviders' => [
@@ -142,7 +142,7 @@ encrypted fields.
142142
use MongoDB\Client;
143143
use MongoDB\Driver\ClientEncryption;
144144

145-
$localKey = new Binary('<binary key data (96 bytes)>', Binary::TYPE_GENERIC);
145+
$localKey = new Binary('<binary key data (96 bytes)>');
146146

147147
$client = new Client();
148148

@@ -197,7 +197,7 @@ encrypts and decrypts values in the document.
197197
use MongoDB\Client;
198198
use MongoDB\Driver\ClientEncryption;
199199

200-
$localKey = new Binary('<binary key data (96 bytes)>', Binary::TYPE_GENERIC);
200+
$localKey = new Binary('<binary key data (96 bytes)>');
201201

202202
$clientEncryptionOpts = [
203203
'keyVaultNamespace' => 'encryption.__keyVault',
@@ -250,7 +250,7 @@ To use an alternate name when referencing an encryption key, use the
250250
use MongoDB\Client;
251251
use MongoDB\Driver\ClientEncryption;
252252

253-
$localKey = new Binary('<binary key data (96 bytes)>', Binary::TYPE_GENERIC);
253+
$localKey = new Binary('<binary key data (96 bytes)>');
254254

255255
$clientEncryptionOpts = [
256256
'keyVaultNamespace' => 'encryption.__keyVault',
@@ -300,7 +300,7 @@ query on the ``encryptedIndexed`` field.
300300
use MongoDB\BSON\Binary;
301301
use MongoDB\Client;
302302

303-
$localKey = new Binary('<binary key data (96 bytes)>', Binary::TYPE_GENERIC);
303+
$localKey = new Binary('<binary key data (96 bytes)>');
304304

305305
$encryptionOpts = [
306306
'keyVaultNamespace' => 'encryption.__keyVault',

0 commit comments

Comments
 (0)