for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Apie\OpenapiSchema\Map;
use Apie\CompositeValueObjects\Exceptions\InvalidKeyException;
use Apie\CompositeValueObjects\ValueObjectHashmapTrait;
use Apie\CompositeValueObjects\ValueObjectListInterface;
use Apie\OpenapiSchema\Spec\Example;
use Apie\TypeJuggling\AnotherValueObject;
use Apie\TypeJuggling\TypeUtilInterface;
class ExampleMap implements ValueObjectListInterface
{
use ValueObjectHashmapTrait;
protected static function getWantedType(string $fieldName): TypeUtilInterface
if (!preg_match('/^[a-zA-Z-0-9]+$/', $fieldName)) {
throw new InvalidKeyException($fieldName, null);
}
return new AnotherValueObject($fieldName, Example::class);