for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace InShore\Bookwhen\ValueObjects\Transporter;
use InShore\Bookwhen\Contracts\StringableContract;
/**
* @internal
*/
final class BaseUri implements StringableContract
{
* Creates a new Base URI value object.
private function __construct(private readonly string $baseUri)
// ..
}
public static function from(string $baseUri): self
if (empty($baseUri)) {
throw new \InvalidArgumentException();
return new self($baseUri);
* {@inheritdoc}
public function toString(): string
return 'https://' . $this->baseUri . '/';