for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MadWizard\WebAuthn\Remote;
use MadWizard\WebAuthn\Format\SerializableTrait;
use Serializable;
class FileContents implements Serializable
{
use SerializableTrait;
/**
* @var string
*/
private $data;
private $contentType;
public function __construct(string $data, string $contentType)
$this->data = $data;
$this->contentType = $contentType;
}
public function getData(): string
return $this->data;
public function getContentType(): string
return $this->contentType;
public function __serialize(): array
return [
'contentType' => $this->contentType,
'data' => $this->data,
];
public function __unserialize(array $serialized): void
$this->contentType = $serialized['contentType'];
$this->data = $serialized['data'];