for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Shippinno\Notification\Domain\Model;
use Verraes\ClassFunctions\ClassFunctions;
abstract class Destination
{
/**
* @return string
*/
abstract public function destinationType(): string;
abstract public function jsonRepresentation(): string;
public function typedJsonRepresentation(): string
$decoded = json_decode($this->jsonRepresentation(), true);
$decoded['type'] = ClassFunctions::short($this);
return json_encode($decoded);
}
* @param string $stringRepresentation
* @return Destination
abstract public static function fromJsonRepresentation(string $stringRepresentation): Destination;