Skip to content

Commit 8b8ae45

Browse files
committed
Renaming event based to event-based
1 parent fcef8da commit 8b8ae45

9 files changed

+21
-21
lines changed

storage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This simple command-line application demonstrates how to invoke Google Cloud Sto
3535
bucket-acl Manage the ACL for Cloud Storage buckets.
3636
bucket-default-acl Manage the default ACL for Cloud Storage buckets.
3737
bucket-labels Manage Cloud Storage bucket labels
38-
bucket-lock Manage Cloud Storage bucket retention policies
38+
bucket-lock Manage Cloud Storage retention policies and holds
3939
buckets Manage Cloud Storage buckets
4040
encryption Upload and download Cloud Storage objects with encryption
4141
object-acl Manage the ACL for Cloud Storage objects

storage/src/disable_default_event_based_hold.php

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

2929
/**
30-
* Disables a default event based hold for a bucket.
30+
* Disables a default event-based hold for a bucket.
3131
*
3232
* @param string $bucketName the name of your Cloud Storage bucket.
3333
*
@@ -38,6 +38,6 @@ function disable_default_event_based_hold($bucketName)
3838
$storage = new StorageClient();
3939
$bucket = $storage->bucket($bucketName);
4040
$bucket->update(['defaultEventBasedHold' => false]);
41-
printf('Default event based hold was disabled for %s' . PHP_EOL, $bucketName);
41+
printf('Default event-based hold was disabled for %s' . PHP_EOL, $bucketName);
4242
}
4343
# [END storage_disable_default_event_based_hold]

storage/src/enable_default_event_based_hold.php

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

2929
/**
30-
* Enables a default event based hold for a bucket.
30+
* Enables a default event-based hold for a bucket.
3131
*
3232
* @param string $bucketName the name of your Cloud Storage bucket.
3333
*
@@ -38,6 +38,6 @@ function enable_default_event_based_hold($bucketName)
3838
$storage = new StorageClient();
3939
$bucket = $storage->bucket($bucketName);
4040
$bucket->update(['defaultEventBasedHold' => true]);
41-
printf('Default event based hold was enabled for %s' . PHP_EOL, $bucketName);
41+
printf('Default event-based hold was enabled for %s' . PHP_EOL, $bucketName);
4242
}
4343
# [END storage_enable_default_event_based_hold]

storage/src/get_default_event_based_hold.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
use Google\Cloud\Storage\StorageClient;
2828

2929
/**
30-
* Enables a default event based hold for a bucket.
30+
* Enables a default event-based hold for a bucket.
3131
*
3232
* @param string $bucketName the name of your Cloud Storage bucket.
3333
*

storage/src/object_metadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function object_metadata($bucketName, $objectName)
5353
printf('MD5 Hash: %s' . PHP_EOL, $info['md5Hash']);
5454
printf('Content-type: %s' . PHP_EOL, $info['contentType']);
5555
printf("Temporary hold: " . ($info['temporaryHold'] ? "enabled" : "disabled") . PHP_EOL);
56-
printf("Event based hold: " . ($info['eventBasedHold'] ? "enabled" : "disabled") . PHP_EOL);
56+
printf("Event-based hold: " . ($info['eventBasedHold'] ? "enabled" : "disabled") . PHP_EOL);
5757
if ($info['retentionExpirationTime']) {
5858
printf("retentionExpirationTime: " . $info['retentionExpirationTime'] . PHP_EOL);
5959
}

storage/src/release_event_based_hold.php

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

2929
/**
30-
* Releases an event based hold for an object.
30+
* Releases an event-based hold for an object.
3131
*
3232
* @param string $bucketName the name of your Cloud Storage bucket.
3333
* @param string $objectName the name of your Cloud Storage object.
@@ -40,6 +40,6 @@ function release_event_based_hold($bucketName, $objectName)
4040
$bucket = $storage->bucket($bucketName);
4141
$object = $bucket->object($objectName);
4242
$object->update(['eventBasedHold' => false]);
43-
printf('Event based hold was released for %s' . PHP_EOL, $objectName);
43+
printf('Event-based hold was released for %s' . PHP_EOL, $objectName);
4444
}
4545
# [END storage_release_event_based_hold]

storage/src/set_event_based_hold.php

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

2929
/**
30-
* Sets an event based hold for an object.
30+
* Sets an event-based hold for an object.
3131
*
3232
* @param string $bucketName the name of your Cloud Storage bucket.
3333
* @param string $objectName the name of your Cloud Storage object.
@@ -40,6 +40,6 @@ function set_event_based_hold($bucketName, $objectName)
4040
$bucket = $storage->bucket($bucketName);
4141
$object = $bucket->object($objectName);
4242
$object->update(['eventBasedHold' => true]);
43-
printf('Event based hold was set for %s' . PHP_EOL, $objectName);
43+
printf('Event-based hold was set for %s' . PHP_EOL, $objectName);
4444
}
4545
# [END storage_set_event_based_hold]

storage/storage.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@
165165
->addOption('remove-retention-policy', null, InputOption::VALUE_NONE, 'Remove the retention policy')
166166
->addOption('lock-retention-policy', null, InputOption::VALUE_NONE, 'Lock the retention policy')
167167
->addOption('get-retention-policy', null, InputOption::VALUE_NONE, 'Gets the retention policy')
168-
->addOption('set-event-based-hold', null, InputOption::VALUE_NONE, 'Set an event based hold')
169-
->addOption('release-event-based-hold', null, InputOption::VALUE_NONE, 'Release an event based hold')
170-
->addOption('enable-default-event-based-hold', null, InputOption::VALUE_NONE, 'Enable default event based hold')
171-
->addOption('disable-default-event-based-hold', null, InputOption::VALUE_NONE, 'Disable default event based hold')
172-
->addOption('get-default-event-based-hold', null, InputOption::VALUE_NONE, 'Gets default event based hold')
168+
->addOption('set-event-based-hold', null, InputOption::VALUE_NONE, 'Set an event-based hold')
169+
->addOption('release-event-based-hold', null, InputOption::VALUE_NONE, 'Release an event-based hold')
170+
->addOption('enable-default-event-based-hold', null, InputOption::VALUE_NONE, 'Enable default event-based hold')
171+
->addOption('disable-default-event-based-hold', null, InputOption::VALUE_NONE, 'Disable default event-based hold')
172+
->addOption('get-default-event-based-hold', null, InputOption::VALUE_NONE, 'Gets default event-based hold')
173173
->addOption('set-temporary-hold', null, InputOption::VALUE_NONE, 'Set a temporary hold')
174174
->addOption('release-temporary-hold', null, InputOption::VALUE_NONE, 'Release a temporary hold')
175175
->setCode(function ($input, $output) {

storage/test/BucketLockCommandTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ public function testEnableDisableGetDefaultEventBasedHold()
208208
);
209209

210210
$outputString = <<
211-
Default event based hold was enabled for {$this->bucket->name()}
211+
Default event-based hold was enabled for {$this->bucket->name()}
212212
Default event-based hold is enabled for {$this->bucket->name()}
213-
Event based hold was released for {$this->object->name()}
214-
Default event based hold was disabled for {$this->bucket->name()}
213+
Event-based hold was released for {$this->object->name()}
214+
Default event-based hold was disabled for {$this->bucket->name()}
215215
Default event-based hold is not enabled for {$this->bucket->name()}
216216
217217
EOF;
@@ -246,8 +246,8 @@ public function testEnableDisableEventBasedHold()
246246
$this->assertFalse($this->object->info()['eventBasedHold']);
247247

248248
$outputString = <<
249-
Event based hold was set for {$this->object->name()}
250-
Event based hold was released for {$this->object->name()}
249+
Event-based hold was set for {$this->object->name()}
250+
Event-based hold was released for {$this->object->name()}
251251
252252
EOF;
253253
$this->expectOutputString($outputString);

0 commit comments

Comments
 (0)