Skip to content

Commit c5cf03e

Browse files
committed
Code review
1 parent e875038 commit c5cf03e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/BlockStorage/v2/Models/Volume.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,8 @@ public function parseMetadata(ResponseInterface $response): array
165165
*
166166
* @param bool $bootable
167167
*/
168-
public function setBootable(bool $bootable)
168+
public function setBootable(bool $bootable = true)
169169
{
170-
$bootable = boolval($bootable);
171170
$this->execute($this->api->postVolumeBootable(), ['id' => $this->id, 'bootable' => $bootable]);
172171
}
173172

@@ -186,15 +185,15 @@ public function setImageMetadata(array $metadata)
186185
*
187186
* @param array $options
188187
*
189-
* $options['status'] = (string) The volume status.
190-
* $options['migrationStatus'] = (string) The volume migration status.
191-
* $options['attachStatus'] = (string) The volume attach status. [OPTIONAL]
188+
* $options['status'] = (string) The volume status.
189+
* $options['migrationStatus'] = (string) The volume migration status.
190+
* $options['attachStatus'] = (string) The volume attach status. [OPTIONAL]
192191
*
193192
* @see https://developer.openstack.org/api-ref/block-storage/v2/index.html#volume-actions-volumes-action
194193
*/
195194
public function resetStatus(array $options)
196195
{
197-
$options += ['id' => $this->id];
196+
$options = array_merge($options, ['id' => $this->id]);
198197
$this->execute($this->api->postResetStatus(), $options);
199198
}
200199
}

src/ObjectStore/v1/Models/StorageObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class StorageObject extends OperatorResource implements Creatable, Deletable, Ha
3535
/** @var string */
3636
public $contentType;
3737

38-
/** @var \DateTimeImmutable */
38+
/** @var string */
3939
public $contentLength;
4040

41-
/** @var string */
41+
/** @var \DateTimeImmutable */
4242
public $lastModified;
4343

4444
/** @var array */

0 commit comments

Comments
 (0)