Skip to content

Commit 0bac84e

Browse files
TomasVotrubajaapio
authored andcommitted
remove unused docblocks
1 parent 154c85b commit 0bac84e

26 files changed

+2
-186
lines changed

src/DocBlock.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,9 @@ final class DocBlock
4040
private $isTemplateEnd = false;
4141

4242
/**
43-
* @param string $summary
4443
* @param DocBlock\Tag[] $tags
4544
* @param Types\Context $context The context in which the DocBlock occurs.
4645
* @param Location $location The location within the file that this DocBlock occurs in.
47-
* @param bool $isTemplateStart
48-
* @param bool $isTemplateEnd
4946
*/
5047
public function __construct(
5148
string $summary = '',
@@ -71,9 +68,6 @@ public function __construct(
7168
$this->isTemplateStart = $isTemplateStart;
7269
}
7370

74-
/**
75-
* @return string
76-
*/
7771
public function getSummary(): string
7872
{
7973
return $this->summary;
@@ -181,8 +175,6 @@ public function getTagsByName(string $name)
181175
* Checks if a tag of a certain type is present in this DocBlock.
182176
*
183177
* @param string $name Tag name to check for.
184-
*
185-
* @return bool
186178
*/
187179
public function hasTag(string $name): bool
188180
{
@@ -200,7 +192,6 @@ public function hasTag(string $name): bool
200192
* Remove a tag from this DocBlock.
201193
*
202194
* @param Tag $tag The tag to remove.
203-
*
204195
*/
205196
public function removeTag(Tag $tagToRemove)
206197
{
@@ -216,7 +207,6 @@ public function removeTag(Tag $tagToRemove)
216207
* Adds a tag to this DocBlock.
217208
*
218209
* @param Tag $tag The tag to add.
219-
*
220210
*/
221211
private function addTag(Tag $tag)
222212
{

src/DocBlock/Description.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Description
5959
/**
6060
* Initializes a Description with its body (template) and a listing of the tags used in the body template.
6161
*
62-
* @param string $bodyTemplate
6362
* @param Tag[] $tags
6463
*/
6564
public function __construct(string $bodyTemplate, array $tags = [])
@@ -81,9 +80,6 @@ public function getTags()
8180
/**
8281
* Renders this description as a string where the provided formatter will format the tags in the expected string
8382
* format.
84-
*
85-
*
86-
* @return string
8783
*/
8884
public function render(Formatter $formatter = null): string
8985
{
@@ -101,8 +97,6 @@ public function render(Formatter $formatter = null): string
10197

10298
/**
10399
* Returns a plain string representation of this description.
104-
*
105-
* @return string
106100
*/
107101
public function __toString(): string
108102
{

src/DocBlock/DescriptionFactory.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class DescriptionFactory
3939

4040
/**
4141
* Initializes this factory with the means to construct (inline) tags.
42-
*
4342
*/
4443
public function __construct(TagFactory $tagFactory)
4544
{
@@ -49,7 +48,6 @@ public function __construct(TagFactory $tagFactory)
4948
/**
5049
* Returns the parsed text of this description.
5150
*
52-
* @param string $contents
5351
*
5452
* @return Description
5553
*/
@@ -63,7 +61,6 @@ public function create(string $contents, TypeContext $context = null): Descripti
6361
/**
6462
* Strips the contents from superfluous whitespace and splits the description into a series of tokens.
6563
*
66-
* @param string $contents
6764
*
6865
* @return string[] A series of tokens of which the description text is composed.
6966
*/
@@ -149,10 +146,6 @@ private function parse($tokens, TypeContext $context)
149146
*
150147
* If we do not normalize the indentation then we have superfluous whitespace on the second and subsequent
151148
* lines and this may cause rendering issues when, for example, using a Markdown converter.
152-
*
153-
* @param string $contents
154-
*
155-
* @return string
156149
*/
157150
private function removeSuperfluousStartingWhitespace(string $contents): string
158151
{

src/DocBlock/ExampleFinder.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ class ExampleFinder
2828

2929
/**
3030
* Attempts to find the example contents for the given descriptor.
31-
*
32-
*
33-
* @return string
3431
*/
3532
public function find(Example $example): string
3633
{
@@ -46,9 +43,6 @@ public function find(Example $example): string
4643

4744
/**
4845
* Registers the project's root directory where an 'examples' folder can be expected.
49-
*
50-
* @param string $directory
51-
*
5246
*/
5347
public function setSourceDirectory(string $directory = '')
5448
{
@@ -57,8 +51,6 @@ public function setSourceDirectory(string $directory = '')
5751

5852
/**
5953
* Returns the project's root directory where an 'examples' folder can be expected.
60-
*
61-
* @return string
6254
*/
6355
public function getSourceDirectory(): string
6456
{
@@ -96,7 +88,6 @@ public function getExampleDirectories()
9688
* 3. Checks the 'examples' folder in the current working directory for examples
9789
* 4. Checks the path relative to the current working directory for the given filename
9890
*
99-
* @param string $filename
10091
*
10192
* @return string|null
10293
*/
@@ -127,10 +118,6 @@ private function getExampleFileContents(string $filename)
127118

128119
/**
129120
* Get example filepath based on the example directory inside your project.
130-
*
131-
* @param string $file
132-
*
133-
* @return string
134121
*/
135122
private function getExamplePathFromExampleDirectory(string $file): string
136123
{
@@ -139,11 +126,6 @@ private function getExamplePathFromExampleDirectory(string $file): string
139126

140127
/**
141128
* Returns a path to the example file in the given directory..
142-
*
143-
* @param string $directory
144-
* @param string $file
145-
*
146-
* @return string
147129
*/
148130
private function constructExamplePath(string $directory, string $file): string
149131
{
@@ -152,10 +134,6 @@ private function constructExamplePath(string $directory, string $file): string
152134

153135
/**
154136
* Get example filepath based on sourcecode.
155-
*
156-
* @param string $file
157-
*
158-
* @return string
159137
*/
160138
private function getExamplePathFromSource(string $file): string
161139
{

src/DocBlock/Serializer.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ public function getDocComment(DocBlock $docblock): string
8888
}
8989

9090
/**
91-
* @param $indent
92-
* @param $text
9391
* @return mixed
9492
*/
9593
private function removeTrailingSpaces($indent, $text)
@@ -98,19 +96,13 @@ private function removeTrailingSpaces($indent, $text)
9896
}
9997

10098
/**
101-
* @param $indent
102-
* @param $text
10399
* @return mixed
104100
*/
105101
private function addAsterisksForEachLine($indent, $text)
106102
{
107103
return str_replace("\n", "\n{$indent} * ", $text);
108104
}
109105

110-
/**
111-
* @param $wrapLength
112-
* @return string
113-
*/
114106
private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength): string
115107
{
116108
$text = $docblock->getSummary() . ((string)$docblock->getDescription() ? "\n\n" . $docblock->getDescription()
@@ -123,12 +115,6 @@ private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLeng
123115
return $text;
124116
}
125117

126-
/**
127-
* @param $wrapLength
128-
* @param $indent
129-
* @param $comment
130-
* @return string
131-
*/
132118
private function addTagBlock(DocBlock $docblock, $wrapLength, $indent, $comment): string
133119
{
134120
foreach ($docblock->getTags() as $tag) {

src/DocBlock/StandardTagFactory.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ public function registerTagHandler(string $tagName, string $handler)
160160
/**
161161
* Extracts all components for a tag.
162162
*
163-
* @param string $tagLine
164163
*
165164
* @return string[]
166165
*/
@@ -184,8 +183,6 @@ private function extractTagParts(string $tagLine)
184183
* Creates a new tag object with the given name and body or returns null if the tag name was recognized but the
185184
* body was invalid.
186185
*
187-
* @param string $body
188-
* @param string $name
189186
*
190187
* @return Tag|null
191188
*/
@@ -202,10 +199,6 @@ private function createTag(string $body, string $name, TypeContext $context)
202199

203200
/**
204201
* Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`).
205-
*
206-
* @param string $tagName
207-
*
208-
* @return string
209202
*/
210203
private function findHandlerClassName(string $tagName, TypeContext $context): string
211204
{
@@ -258,7 +251,6 @@ private function getArgumentsForParametersFromWiring($parameters, $locator)
258251
* Retrieves a series of ReflectionParameter objects for the static 'create' method of the given
259252
* tag handler class name.
260253
*
261-
* @param string $handlerClassName
262254
*
263255
* @return \ReflectionParameter[]
264256
*/
@@ -299,11 +291,8 @@ private function getServiceLocatorWithDynamicParameters(TypeContext $context, st
299291
/**
300292
* Returns whether the given tag belongs to an annotation.
301293
*
302-
* @param string $tagContent
303294
*
304295
* @todo this method should be populated once we implement Annotation notation support.
305-
*
306-
* @return bool
307296
*/
308297
private function isAnnotation(string $tagContent): bool
309298
{

src/DocBlock/TagFactory.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ interface TagFactory
3737
*
3838
* @param string $name
3939
* @param mixed $value
40-
*
41-
* @return void
4240
*/
4341
public function addParameter(string $name, $value);
4442

@@ -52,9 +50,6 @@ public function addParameter(string $name, $value);
5250
* interface is passed as alias then every time that interface is requested the provided service will be returned.
5351
*
5452
* @param object $service
55-
* @param string $alias
56-
*
57-
* @return void
5853
*/
5954
public function addService($service);
6055

@@ -86,8 +81,6 @@ public function create(string $tagLine, TypeContext $context = null): ?Tag;
8681
* @throws \InvalidArgumentException if the handler is not a string
8782
* @throws \InvalidArgumentException if the handler is not an existing class
8883
* @throws \InvalidArgumentException if the handler does not implement the {@see Tag} interface
89-
*
90-
* @return void
9184
*/
9285
public function registerTagHandler(string $tagName, string $handler);
9386
}

src/DocBlock/Tags/Author.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ final class Author extends BaseTag implements Factory\StaticMethod
3030

3131
/**
3232
* Initializes this tag with the author name and e-mail.
33-
*
34-
* @param string $authorName
35-
* @param string $authorEmail
3633
*/
3734
public function __construct(string $authorName, string $authorEmail)
3835
{
@@ -66,8 +63,6 @@ public function getEmail(): string
6663

6764
/**
6865
* Returns this tag in string form.
69-
*
70-
* @return string
7166
*/
7267
public function __toString(): string
7368
{
@@ -77,7 +72,6 @@ public function __toString(): string
7772
/**
7873
* Attempts to create a new Author object based on †he tag body.
7974
*
80-
* @param string $body
8175
*
8276
* @return static
8377
*/

src/DocBlock/Tags/Covers.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ final class Covers extends BaseTag implements Factory\StaticMethod
3232

3333
/**
3434
* Initializes this tag.
35-
*
36-
* @param Description $description
3735
*/
3836
public function __construct(Fqsen $refers, Description $description = null)
3937
{
@@ -72,8 +70,6 @@ public function getReference(): Fqsen
7270

7371
/**
7472
* Returns a string representation of this tag.
75-
*
76-
* @return string
7773
*/
7874
public function __toString(): string
7975
{

src/DocBlock/Tags/Example.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ public function getFilePath(): string
138138

139139
/**
140140
* Returns a string representation for this tag.
141-
*
142-
* @return string
143141
*/
144142
public function __toString(): string
145143
{
@@ -148,27 +146,17 @@ public function __toString(): string
148146

149147
/**
150148
* Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute).
151-
*
152-
* @param string $uri
153-
*
154-
* @return bool
155149
*/
156150
private function isUriRelative(string $uri): bool
157151
{
158152
return false === strpos($uri, ':');
159153
}
160154

161-
/**
162-
* @return int
163-
*/
164155
public function getStartingLine(): int
165156
{
166157
return $this->startingLine;
167158
}
168159

169-
/**
170-
* @return int
171-
*/
172160
public function getLineCount(): int
173161
{
174162
return $this->lineCount;

0 commit comments

Comments
 (0)