gdbots/pbjc-php

View on GitHub
src/Type/UuidType.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Gdbots\Pbjc\Type;

use Gdbots\Pbj\WellKnown\UuidIdentifier;

final class UuidType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function isScalar()
    {
        return false;
    }

    /**
     * {@inheritdoc}
     */
    public function getDefault()
    {
        return UuidIdentifier::generate();
    }

    /**
     * {@inheritdoc}
     */
    public function isString()
    {
        return true;
    }
}