Skip to content

Commit 19b5535

Browse files
committed
Clean up
1 parent 3acbe24 commit 19b5535

File tree

4 files changed

+13
-39
lines changed

4 files changed

+13
-39
lines changed

src/DocBlock/Tags/Mixin.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,4 @@ public static function create(
4848

4949
return new static($type, $description);
5050
}
51-
52-
public function __toString(): string
53-
{
54-
if ($this->description) {
55-
$description = $this->description->render();
56-
} else {
57-
$description = '';
58-
}
59-
60-
$type = (string) $this->type;
61-
62-
return $type . ($description !== '' ? ($type !== '' ? ' ' : '') . $description : '');
63-
}
6451
}

src/DocBlock/Tags/Return_.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,4 @@ public static function create(
6060

6161
return new static($type, $description);
6262
}
63-
64-
public function __toString(): string
65-
{
66-
if ($this->description) {
67-
$description = $this->description->render();
68-
} else {
69-
$description = '';
70-
}
71-
72-
$type = $this->type ? '' . $this->type : 'mixed';
73-
74-
return $type . ($description !== '' ? ' ' . $description : '');
75-
}
7663
}

src/DocBlock/Tags/TagWithType.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,17 @@ protected static function extractTypeFromBody(string $body): array
7171

7272
return [$type, $description];
7373
}
74+
75+
public function __toString(): string
76+
{
77+
if ($this->description) {
78+
$description = $this->description->render();
79+
} else {
80+
$description = '';
81+
}
82+
83+
$type = (string) $this->type;
84+
85+
return $type . ($description !== '' ? ($type !== '' ? ' ' : '') . $description : '');
86+
}
7487
}

src/DocBlock/Tags/Throws.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,4 @@ public static function create(
4848

4949
return new static($type, $description);
5050
}
51-
52-
public function __toString(): string
53-
{
54-
if ($this->description) {
55-
$description = $this->description->render();
56-
} else {
57-
$description = '';
58-
}
59-
60-
$type = (string) $this->type;
61-
62-
return $type . ($description !== '' ? ($type !== '' ? ' ' : '') . $description : '');
63-
}
6451
}

0 commit comments

Comments
 (0)