for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Elastification\Client\Serializer\Gateway;
/**
* @package Elastification\Client\Serializer\Gateway
* @author Mario Mueller
*/
abstract class GatewayFactory
{
* @param mixed $value
*
* @return GatewayInterface|mixed
public static function factory($value)
if (is_array($value)) {
return new NativeArrayGateway($value);
} elseif (is_object($value)) {
return new NativeObjectGateway($value);
}
return $value;