createdAt = new \DateTimeImmutable('now'); } /** * Get string representation. * * @return string * * @since 1.0.0 */ public function __toString() { return (string) \json_encode($this->toArray()); } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'name' => $this->name, 'path' => $this->path, 'version' => $this->version, 'status' => $this->status, 'createdAt' => $this->createdAt, ]; } }