for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AmaTeam\ElasticSearch\Mapping\Type;
use AmaTeam\ElasticSearch\Mapping\TypeInterface;
abstract class AbstractType implements TypeInterface
{
protected static $registry = [];
public function getFriendlyId(): string
return $this->getId();
}
public static function getInstance()
$class = get_called_class();
if (!isset(self::$registry[$class])) {
self::$registry[$class] = new static();
return self::$registry[$class];