File tree Expand file tree Collapse file tree 7 files changed +3
-35
lines changed Expand file tree Collapse file tree 7 files changed +3
-35
lines changed Original file line number Diff line number Diff line change 99 "issues" : " https://github.com/php-type-language/phpdoc/issues"
1010 },
1111 "require" : {
12- "php" : " ^8.1" ,
13- "ext-json" : " *"
12+ "php" : " ^8.1"
1413 },
1514 "autoload" : {
1615 "psr-4" : {
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ final class DocBlock implements
2121 OptionalDescriptionProviderInterface,
2222 TagsProviderInterface,
2323 \IteratorAggregate,
24- \JsonSerializable,
2524 \ArrayAccess,
2625 \Countable
2726{
@@ -95,14 +94,6 @@ public function getIterator(): \Traversable
9594 return new \ArrayIterator ($ this ->tags );
9695 }
9796
98- public function jsonSerialize (): array
99- {
100- return [
101- 'description ' => $ this ->description ,
102- 'tags ' => $ this ->tags ,
103- ];
104- }
105-
10697 /**
10798 * @return int<0, max>
10899 */
Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ public static function fromStringableOrNull(string|\Stringable|null $description
3737 return self ::fromStringable ($ description );
3838 }
3939
40- public function jsonSerialize (): string
41- {
42- return $ this ->value ;
43- }
44-
4540 public function __toString (): string
4641 {
4742 return $ this ->value ;
Original file line number Diff line number Diff line change 88 * Any class that implements this interface is a description object
99 * that can be represented as a raw string scalar value.
1010 */
11- interface DescriptionInterface extends \JsonSerializable, \ Stringable
11+ interface DescriptionInterface extends \Stringable
1212{
1313 /**
1414 * Returns a plain string representation of this description.
Original file line number Diff line number Diff line change @@ -88,11 +88,6 @@ public function offsetUnset(mixed $offset): void
8888 throw new \BadMethodCallException (static ::class . ' objects are immutable ' );
8989 }
9090
91- public function jsonSerialize (): array
92- {
93- return $ this ->components ;
94- }
95-
9691 public function __toString (): string
9792 {
9893 return \implode ('' , $ this ->components );
Original file line number Diff line number Diff line change @@ -31,15 +31,6 @@ public function getDescription(): ?DescriptionInterface
3131 return $ this ->description ;
3232 }
3333
34- public function jsonSerialize (): array
35- {
36- return \array_filter ([
37- 'kind ' => static ::class,
38- 'name ' => $ this ->name ,
39- 'description ' => $ this ->description ,
40- ], static fn (mixed $ value ): bool => $ value !== null );
41- }
42-
4334 public function __toString (): string
4435 {
4536 if ($ this ->description === null ) {
Original file line number Diff line number Diff line change 66
77use TypeLang \PHPDoc \Tag \Description \OptionalDescriptionProviderInterface ;
88
9- interface TagInterface extends
10- OptionalDescriptionProviderInterface,
11- \JsonSerializable,
12- \Stringable
9+ interface TagInterface extends OptionalDescriptionProviderInterface, \Stringable
1310{
1411 /**
1512 * Returns the non-empty tag name string without the '@' prefix.
You can’t perform that action at this time.
0 commit comments