Skip to content

Commit 7a44547

Browse files
frankyndwsupplee
andauthored
Apply suggestions from code review
Co-Authored-By: David Supplee
1 parent a546f37 commit 7a44547

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

storage/src/activate_hmac_key.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
use Google\Cloud\Storage\StorageClient;
2828

2929
/**
30-
* Activate HMAC key.
30+
* Activate an HMAC key.
3131
*
32-
* @param string $accessId access ID for an inactive HMAC key.
32+
* @param string $accessId Access ID for an inactive HMAC key.
3333
* @param string $projectId Google Cloud Project ID.
3434
*
3535
*/

storage/src/create_hmac_key.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* Create a new HMAC key.
3131
*
32-
* @param string $serviceAccountEmail service account email to associate with new HMAC key.
32+
* @param string $serviceAccountEmail Service account email to associate with the new HMAC key.
3333
* @param string $projectId Google Cloud Project ID.
3434
*
3535
*/

storage/src/deactivate_hmac_key.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
use Google\Cloud\Storage\StorageClient;
2828

2929
/**
30-
* Deactivate HMAC key.
30+
* Deactivate an HMAC key.
3131
*
32-
* @param string $accessId access ID for an inactive HMAC key.
32+
* @param string $accessId Access ID for an inactive HMAC key.
3333
* @param string $projectId Google Cloud Project ID.
3434
*
3535
*/

storage/src/delete_hmac_key.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
use Google\Cloud\Storage\StorageClient;
2828

2929
/**
30-
* Delete HMAC key.
30+
* Delete an HMAC key.
3131
*
32-
* @param string $accessId access ID for an inactive HMAC key.
32+
* @param string $accessId Access ID for an HMAC key.
3333
* @param string $projectId Google Cloud Project ID.
3434
*
3535
*/

storage/src/get_hmac_key.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
use Google\Cloud\Storage\StorageClient;
2828

2929
/**
30-
* Get HMAC key.
30+
* Get an HMAC key.
3131
*
32-
* @param string $accessId access ID for HMAC key.
32+
* @param string $accessId Access ID for an HMAC key.
3333
* @param string $projectId Google Cloud Project ID.
3434
*
3535
*/

storage/src/list_hmac_keys.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
function list_hmac_keys($projectId)
3636
{
3737
$storage = new StorageClient();
38-
// By default hmacKeys will use the projectId used by StorageClient() list HMAC Keys.
38+
// By default hmacKeys will use the projectId used by StorageClient() to list HMAC Keys.
3939
$hmacKeys = $storage->hmacKeys(['projectId' => $projectId]);
4040

4141
foreach ($hmacKeys as $hmacKey) {

storage/storage.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -434,13 +434,13 @@
434434
$application->add(new Command('hmac-sa-list'))
435435
->setDescription('List Cloud Storage HMAC Keys.')
436436
->setHelp(<<
437-
The %command.name% command list Cloud Storage HMAC Keys.
437+
The %command.name% command lists Cloud Storage HMAC Keys.
438438
439439
php %command.full_name% --help
440440
441441
EOF
442442
)
443-
->addArgument('projectId', InputArgument::REQUIRED, 'The Cloud Project ID HMAC Keys to list')
443+
->addArgument('projectId', InputArgument::REQUIRED, 'The Cloud Project ID with HMAC Keys to list')
444444
->setCode(function ($input, $output) {
445445
$projectId = $input->getArgument('projectId');
446446
list_hmac_keys($projectId);
@@ -449,14 +449,14 @@
449449
$application->add(new Command('hmac-sa-create'))
450450
->setDescription('Create a Cloud Storage HMAC Key.')
451451
->setHelp(<<
452-
The %command.name% command create cloud storage HMAC keys.
452+
The %command.name% command creates Cloud Storage HMAC Keys.
453453
454454
php %command.full_name% --help
455455
456456
EOF
457457
)
458-
->addArgument('projectId', InputArgument::REQUIRED, 'The Cloud Project ID of the service account email')
459-
->addArgument('serviceAccountEmail', InputArgument::REQUIRED, 'The service account to associate new HMAC Key')
458+
->addArgument('projectId', InputArgument::REQUIRED, 'The Cloud Project ID associated with the service account email')
459+
->addArgument('serviceAccountEmail', InputArgument::REQUIRED, 'The service account to associate with the new HMAC Key')
460460
->setCode(function ($input, $output) {
461461
$projectId = $input->getArgument('projectId');
462462
$serviceAccountEmail = $input->getArgument('serviceAccountEmail');
@@ -472,12 +472,12 @@
472472
473473
EOF
474474
)
475-
->addArgument('projectId', InputArgument::REQUIRED, 'The Cloud Project Id associated to the HMAC key')
476-
->addArgument('accessId', InputArgument::REQUIRED, 'The Cloud Storage HMAC key access Id')
477-
->addOption('activate', null, InputOption::VALUE_NONE, 'Activate an HMAC key')
478-
->addOption('deactivate', null, InputOption::VALUE_NONE, 'Deactivate an HMAC key')
479-
->addOption('get', null, InputOption::VALUE_NONE, 'Get an HMAC key\'s metadata')
480-
->addOption('delete', null, InputOption::VALUE_NONE, 'Delete an HMAC key')
475+
->addArgument('projectId', InputArgument::REQUIRED, 'The Cloud Project ID associated with the HMAC Key')
476+
->addArgument('accessId', InputArgument::REQUIRED, 'The Cloud Storage HMAC Key access ID')
477+
->addOption('activate', null, InputOption::VALUE_NONE, 'Activate an HMAC Key')
478+
->addOption('deactivate', null, InputOption::VALUE_NONE, 'Deactivate an HMAC Key')
479+
->addOption('get', null, InputOption::VALUE_NONE, 'Get an HMAC Key\'s metadata')
480+
->addOption('delete', null, InputOption::VALUE_NONE, 'Delete an HMAC Key')
481481
->setCode(function ($input, $output) {
482482
$projectId = $input->getArgument('projectId');
483483
$accessId = $input->getArgument('accessId');

storage/test/HmacCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use PHPUnit\Framework\TestCase;
2424

2525
/**
26-
* Unit Tests for BucketPolicyOnlyCommand.
26+
* Unit Tests for HmacCommand.
2727
*/
2828
class HmacCommandTest extends TestCase
2929
{

0 commit comments

Comments
 (0)