Skip to content

Commit 44b8258

Browse files
author
Damien Debin
committed
Remove redundant PHPdoc.
1 parent e778de6 commit 44b8258

4 files changed

Lines changed: 0 additions & 120 deletions

File tree

src/AbstractElement.php

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ public function __construct()
5151
$this->setUpdatedDateTime(new DateTime('now'));
5252
}
5353

54-
/**
55-
* @param string $id
56-
*/
5754
public function setId(string $id): void
5855
{
5956
if ((0 !== strpos($id, 'tag:')) && (false === filter_var($id, FILTER_VALIDATE_URL))) {
@@ -62,29 +59,18 @@ public function setId(string $id): void
6259
$this->id = $id;
6360
}
6461

65-
/**
66-
* @param string $title
67-
* @param null|string $type
68-
*/
6962
public function setTitle(string $title, ?string $type = null): void
7063
{
7164
Assert::oneOf($type, [null, 'text', 'xhtml', 'html']);
7265
$this->title = $title;
7366
$this->titleType = $type;
7467
}
7568

76-
/**
77-
* @param DateTimeInterface $updated
78-
*/
7969
public function setUpdatedDateTime(DateTimeInterface $updated): void
8070
{
8171
$this->updatedDateTime = $updated;
8272
}
8373

84-
/**
85-
* @param null|string $rights
86-
* @param null|string $type
87-
*/
8874
public function setRights(?string $rights, ?string $type = null): void
8975
{
9076
Assert::true((null !== $rights) || (null === $type));
@@ -93,11 +79,6 @@ public function setRights(?string $rights, ?string $type = null): void
9379
$this->rightsType = $type;
9480
}
9581

96-
/**
97-
* @param string $term
98-
* @param null|string $scheme
99-
* @param null|string $label
100-
*/
10182
public function addCategory(string $term, ?string $scheme = null, ?string $label = null): void
10283
{
10384
$category = [
@@ -116,14 +97,6 @@ public function addCategory(string $term, ?string $scheme = null, ?string $label
11697
$this->categories[] = $category;
11798
}
11899

119-
/**
120-
* @param string $uri
121-
* @param null|string $rel
122-
* @param null|string $type
123-
* @param null|string $hreflang
124-
* @param null|string $title
125-
* @param null|int $length
126-
*/
127100
public function addLink(string $uri, ?string $rel = null, ?string $type = null, ?string $hreflang = null, ?string $title = null, ?int $length = null): void
128101
{
129102
self::assertURL($uri);
@@ -156,29 +129,16 @@ public function addLink(string $uri, ?string $rel = null, ?string $type = null,
156129
$this->links[] = $link;
157130
}
158131

159-
/**
160-
* @param string $name
161-
* @param null|string $email
162-
* @param null|string $uri
163-
*/
164132
public function addAuthor(string $name, ?string $email = null, ?string $uri = null): void
165133
{
166134
$this->authors[] = self::createPerson($name, $email, $uri);
167135
}
168136

169-
/**
170-
* @param string $name
171-
* @param null|string $email
172-
* @param null|string $uri
173-
*/
174137
public function addContributor(string $name, ?string $email = null, ?string $uri = null): void
175138
{
176139
$this->contributors[] = self::createPerson($name, $email, $uri);
177140
}
178141

179-
/**
180-
* @param SimpleXMLElement $parent
181-
*/
182142
public function addChildrenTo(SimpleXMLElement $parent): void
183143
{
184144
$parent->addChild('id', $this->id);
@@ -217,10 +177,6 @@ public function addChildrenTo(SimpleXMLElement $parent): void
217177
}
218178

219179
/**
220-
* @param string $name
221-
* @param null|string $email
222-
* @param null|string $uri
223-
*
224180
* @return mixed[]
225181
*/
226182
protected static function createPerson(string $name, ?string $email = null, ?string $uri = null): array
@@ -242,14 +198,6 @@ protected static function createPerson(string $name, ?string $email = null, ?str
242198
return $person;
243199
}
244200

245-
/**
246-
* @param SimpleXMLElement $parent
247-
* @param string $name
248-
* @param null|string $data
249-
* @param null|string $type
250-
*
251-
* @return SimpleXMLElement
252-
*/
253201
protected static function addChildWithTypeToElement(SimpleXMLElement $parent, string $name, ?string $data, ?string $type): SimpleXMLElement
254202
{
255203
if (null !== $data) {
@@ -269,10 +217,6 @@ protected static function addChildWithTypeToElement(SimpleXMLElement $parent, st
269217
return $element;
270218
}
271219

272-
/**
273-
* @param string $cdataText
274-
* @param SimpleXMLElement $element
275-
*/
276220
protected static function addCData(string $cdataText, SimpleXMLElement $element): void
277221
{
278222
$node = dom_import_simplexml($element);
@@ -281,9 +225,6 @@ protected static function addCData(string $cdataText, SimpleXMLElement $element)
281225
$node->appendChild($no->createCDATASection($cdataText));
282226
}
283227

284-
/**
285-
* @param string $value
286-
*/
287228
protected static function assertURL(string $value): void
288229
{
289230
if (false === filter_var($value, FILTER_VALIDATE_URL)) {

src/Entry.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ class Entry extends AbstractElement
2929
/** @var null|Feed */
3030
protected $source;
3131

32-
/**
33-
* @param null|string $summary
34-
* @param null|string $type
35-
*/
3632
public function setSummary(?string $summary, ?string $type = null): void
3733
{
3834
Assert::true((null !== $summary) || (null === $type));
@@ -41,11 +37,6 @@ public function setSummary(?string $summary, ?string $type = null): void
4137
$this->summaryType = $type;
4238
}
4339

44-
/**
45-
* @param null|string $content
46-
* @param null|string $type
47-
* @param null|string $src
48-
*/
4940
public function setContent(?string $content, ?string $type = null, ?string $src = null): void
5041
{
5142
Assert::true(((null !== $content) && (null === $src)) ||
@@ -59,17 +50,11 @@ public function setContent(?string $content, ?string $type = null, ?string $src
5950
$this->contentSrc = $src;
6051
}
6152

62-
/**
63-
* @param null|DateTimeInterface $publishedDateTime
64-
*/
6553
public function setPublishedDateTime(?DateTimeInterface $publishedDateTime): void
6654
{
6755
$this->publishedDateTime = $publishedDateTime;
6856
}
6957

70-
/**
71-
* @param null|Feed $sourceFeed
72-
*/
7358
public function setSource(?Feed $sourceFeed): void
7459
{
7560
if (null !== $sourceFeed) {
@@ -78,9 +63,6 @@ public function setSource(?Feed $sourceFeed): void
7863
$this->source = $sourceFeed;
7964
}
8065

81-
/**
82-
* @param SimpleXMLElement $parent
83-
*/
8466
public function addChildrenTo(SimpleXMLElement $parent): void
8567
{
8668
if ((null === $this->content) && (null === $this->contentSrc)) {

src/Feed.php

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -50,33 +50,21 @@ public function __construct()
5050
$this->setPrettify(true);
5151
}
5252

53-
/**
54-
* @param bool $prettify
55-
*/
5653
public function setPrettify(bool $prettify): void
5754
{
5855
$this->prettify = $prettify;
5956
}
6057

61-
/**
62-
* @param null|string $language
63-
*/
6458
public function setLanguage(?string $language): void
6559
{
6660
$this->language = $language;
6761
}
6862

69-
/**
70-
* @param null|string $subtitle
71-
*/
7263
public function setSubtitle(?string $subtitle): void
7364
{
7465
$this->subtitle = $subtitle;
7566
}
7667

77-
/**
78-
* @param null|string $uri
79-
*/
8068
public function setIconUri(?string $uri): void
8169
{
8270
if (null !== $uri) {
@@ -85,9 +73,6 @@ public function setIconUri(?string $uri): void
8573
$this->icon = $uri;
8674
}
8775

88-
/**
89-
* @param null|string $uri
90-
*/
9176
public function setLogoUri(?string $uri): void
9277
{
9378
if (null !== $uri) {
@@ -96,11 +81,6 @@ public function setLogoUri(?string $uri): void
9681
$this->logo = $uri;
9782
}
9883

99-
/**
100-
* @param null|string $generator
101-
* @param null|string $uri
102-
* @param null|string $version
103-
*/
10484
public function setGenerator(?string $generator, ?string $uri = null, ?string $version = null): void
10585
{
10686
Assert::true((null !== $generator) || ((null === $uri) && (null === $version)));
@@ -112,9 +92,6 @@ public function setGenerator(?string $generator, ?string $uri = null, ?string $v
11292
$this->generatorUri = $uri;
11393
}
11494

115-
/**
116-
* @param Entry $entry
117-
*/
11895
public function addEntry(Entry $entry): void
11996
{
12097
$this->entries[] = $entry;
@@ -137,9 +114,6 @@ public function getEntries(): array
137114
}
138115

139116
/**
140-
* @param string $ns
141-
* @param string $uri
142-
* @param string $name
143117
* @param mixed $value
144118
* @param null|string[] $attributes
145119
*/
@@ -156,9 +130,6 @@ public function addCustomElement(string $ns, string $uri, string $name, $value,
156130
];
157131
}
158132

159-
/**
160-
* @param SimpleXMLElement $parent
161-
*/
162133
public function addChildrenTo(SimpleXMLElement $parent): void
163134
{
164135
parent::addChildrenTo($parent);
@@ -197,9 +168,6 @@ public function addChildrenTo(SimpleXMLElement $parent): void
197168
}
198169
}
199170

200-
/**
201-
* @return SimpleXMLElement
202-
*/
203171
public function getSimpleXML(): SimpleXMLElement
204172
{
205173
$attributes = [];
@@ -222,9 +190,6 @@ public function getSimpleXML(): SimpleXMLElement
222190
return $xml;
223191
}
224192

225-
/**
226-
* @return DOMDocument
227-
*/
228193
public function getDocument(): DOMDocument
229194
{
230195
$node = dom_import_simplexml($this->getSimpleXML());
@@ -233,9 +198,6 @@ public function getDocument(): DOMDocument
233198
return $node->ownerDocument;
234199
}
235200

236-
/**
237-
* @return string
238-
*/
239201
public function saveXML(): string
240202
{
241203
$dom = $this->getDocument();
@@ -251,10 +213,7 @@ public function saveXML(): string
251213
*
252214
* @see https://cweiske.de/tagebuch/atom-validation.htm
253215
*
254-
* @param DOMDocument $document
255216
* @param null|libXMLError[] $errors
256-
*
257-
* @return bool
258217
*/
259218
public static function validate(DOMDocument $document, ?array &$errors = null): bool
260219
{

tests/FeedTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ public function testFeedCreationException4(): void
213213
/**
214214
* @param libXMLError[] $errors
215215
*
216-
* @return string
217-
*
218216
* @codeCoverageIgnore
219217
*/
220218
protected static function formatXmlErrors(array $errors): string

0 commit comments

Comments
 (0)