for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace UnicornFail\Emoji\Node;
final class Image extends AbstractStringContainer implements EmojiContainerInterface
{
/** @var Emoji */
private $emoji;
public function __construct(string $value, Emoji $emoji, string $url, ?string $alt = null)
parent::__construct($value);
$this->emoji = $emoji;
$this->attributes->set('src', $url);
if ($alt !== null) {
$this->attributes->set('alt', $alt);
}
public function getEmoji(): Emoji
return $this->emoji;
public function getUrl(): string
return (string) $this->attributes->get('src');