File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ public static function fromString(string $ltree): static
3838 return new static ($ branch ); // @phpstan-ignore-line argument.type
3939 }
4040
41+ #[\Override]
42+ public function jsonSerialize (): array
43+ {
44+ return $ this ->branch ;
45+ }
46+
4147 #[\Override]
4248 public function createLeaf (string $ leaf ): static
4349 {
Original file line number Diff line number Diff line change 44
55namespace MartinGeorgiev \Doctrine \DBAL \Types \ValueObject ;
66
7- interface LtreeInterface extends \Stringable
7+ interface LtreeInterface extends \Stringable, \JsonSerializable
88{
99 /**
1010 * @param list<non-empty-string> $branch
@@ -18,6 +18,12 @@ public function __construct(array $branch);
1818 */
1919 public static function fromString (string $ ltree ): static ;
2020
21+ /**
22+ * @return list<non-empty-string>
23+ */
24+ #[\Override]
25+ public function jsonSerialize (): array ;
26+
2127 /**
2228 * @param non-empty-string $leaf
2329 *
You can’t perform that action at this time.
0 commit comments