Skip to content

Commit 0fc36c9

Browse files
Boyscouting
1 parent 227cf18 commit 0fc36c9

12 files changed

+17
-39
lines changed

bin/allow-null-prevhash.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
(string) \file_get_contents($root . '/local/settings.json'),
2626
true
2727
);
28-
/** @var EasyDB $db */
2928
$db = Factory::create(
3029
$settings['database']['dsn'],
3130
$settings['database']['username'] ?? '',

bin/change-replica-source-publickey.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
EasyDB,
1414
Factory
1515
};
16-
use GuzzleHttp\Client;
1716
use ParagonIE\Chronicle\Chronicle;
1817
use ParagonIE\Chronicle\Exception\InstanceNotFoundException;
19-
use ParagonIE\ConstantTime\Base64UrlSafe;
20-
use ParagonIE\Sapient\CryptographyKeys\SigningPublicKey;
2118

2219
$root = \dirname(__DIR__);
2320
/** @psalm-suppress UnresolvableInclude */
@@ -43,8 +40,6 @@
4340
Chronicle::setDatabase($db);
4441

4542
/**
46-
* @var Getopt
47-
*
4843
* This defines the Command Line options.
4944
*/
5045
$getopt = new GetOpt([

bin/create-client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*
4747
* These two are equivalent:
4848
* php create-client.php -p foo
49-
* php create-client php --public=key=foo
49+
* php create-client.php --publickey=foo
5050
*/
5151
$getopt = new Getopt([
5252
new Option('p', 'publickey', Getopt::REQUIRED_ARGUMENT),

bin/cross-sign.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
);
4343

4444
/**
45-
* @var GetOpt $getopt
46-
*
4745
* This defines the Command Line options.
4846
*/
4947
$getopt = new GetOpt([
@@ -113,7 +111,6 @@
113111
}
114112
if (is_string($publicKey)) {
115113
try {
116-
/** @var SigningPublicKey $publicKeyObj */
117114
$publicKeyObj = new SigningPublicKey(
118115
Base64UrlSafe::decode($publicKey)
119116
);
@@ -173,7 +170,6 @@
173170

174171
// Write to database...
175172
$db->beginTransaction();
176-
/** @var string $table */
177173
$table = Chronicle::getTableName('xsign_targets');
178174
if ($db->exists('SELECT * FROM ' . $table . ' WHERE name = ?', $name)) {
179175
// Update an existing cross-sign target

bin/fix-nulls.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
use ParagonIE\EasyDB\{
5-
EasyDB,
6-
Factory
7-
};
4+
use ParagonIE\EasyDB\Factory;
85

96
$root = \dirname(__DIR__);
107
/** @psalm-suppress UnresolvableInclude */
@@ -21,7 +18,6 @@
2118
true
2219
);
2320

24-
/** @var EasyDB $db */
2521
$db = Factory::create(
2622
$settings['database']['dsn'],
2723
$settings['database']['username'] ?? '',

bin/install.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
};
88
use ParagonIE\Sapient\CryptographyKeys\SigningSecretKey;
99

10-
/** @var string $root */
1110
$root = \dirname(__DIR__);
1211
/** @psalm-suppress UnresolvableInclude */
1312
require_once $root . '/cli-autoload.php';
1413

1514
// Generate a signing key.
16-
/** @var SigningSecretKey $signingKey */
1715
$signingKey = SigningSecretKey::generate();
1816

1917
// Store the signing key:
@@ -23,8 +21,6 @@
2321
);
2422

2523
/**
26-
* @var Getopt $getopt
27-
*
2824
* This defines the Command Line options.
2925
*
3026
* These are many examples:

bin/keygen.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
require_once $root . '/cli-autoload.php';
99

1010
/* This generates a new secret key from your kernel's CSPRNG */
11-
/** @var SigningSecretKey $signingSecretKey */
1211
$signingSecretKey = SigningSecretKey::generate();
1312

14-
echo (string) json_encode(
13+
echo json_encode(
1514
[
1615
'secret-key' => $signingSecretKey->getString(),
1716
'public-key' => $signingSecretKey->getPublicKey()->getString()

bin/make-tables.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
GetOpt,
66
Option
77
};
8+
use Slim\App;
89
use ParagonIE\Chronicle\Chronicle;
910
use ParagonIE\Chronicle\Exception\InstanceNotFoundException;
1011

@@ -16,9 +17,8 @@
1617

1718
/**
1819
* @var array $settings
19-
* @var \Slim\App $app
2020
*/
21-
$app = new \Slim\App($settings);
21+
$app = new App($settings);
2222

2323
if (!isset($app)) {
2424
throw new Error('Variable $app is not defined');
@@ -54,7 +54,6 @@
5454
exit(1);
5555
}
5656

57-
/** @var \ParagonIE\EasyDB\EasyDB $db */
5857
$db = ParagonIE\EasyDB\Factory::create(
5958
$settings['database']['dsn'],
6059
$settings['database']['username'] ?? null,

bin/replicate.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@
2727
exit(1);
2828
}
2929

30-
/** @var array<string, string> $settings */
30+
/** @var array<string, string|string[]> $settings */
3131
$settings = \json_decode(
3232
(string) \file_get_contents($root . '/local/settings.json'),
3333
true
3434
);
35-
/** @var EasyDB $db */
3635
$db = Factory::create(
3736
$settings['database']['dsn'],
3837
$settings['database']['username'] ?? '',
@@ -42,8 +41,6 @@
4241
Chronicle::setDatabase($db);
4342

4443
/**
45-
* @var Getopt
46-
*
4744
* This defines the Command Line options.
4845
*/
4946
$getopt = new GetOpt([

bin/scheduled-tasks.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
true
2323
);
2424

25-
/** @var EasyDB $db */
2625
$db = Factory::create(
2726
$settings['database']['dsn'],
2827
$settings['database']['username'] ?? '',

0 commit comments

Comments
 (0)