for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Metadata;
/**
* Base class for property metadata.
*
* This class is intended to be extended to add your application specific
* properties, and flags.
* @author Johannes M. Schmitt <[email protected]>
*/
class PropertyMetadata implements \Serializable
{
* @var string
public $class;
public $name;
public function __construct(string $class, string $name)
$this->class = $class;
$this->name = $name;
}
* @return string
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
* @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation
public function serialize()
return serialize($this->__serialize());
* @param string $str
* @return void
public function unserialize($str)
$this->__unserialize((array) unserialize((string) $str));
* @return array<string>
public function __serialize(): array
return [
$this->class,
$this->name,
];
* @param array<string> $data
public function __unserialize(array $data): void
[$this->class, $this->name] = $data;