Skip to content

Commit 18cc85c

Browse files
committed
Remove useless phpdoc @throws
1 parent 087666f commit 18cc85c

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

src/Feed.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace AtomGenerator;
66

77
use DOMDocument;
8-
use Exception;
98
use LibXMLError;
109
use SimpleXMLElement;
1110
use Webmozart\Assert\Assert;
@@ -153,6 +152,7 @@ public function addChildrenTo(SimpleXMLElement $parent): void
153152

154153
if (null !== $this->generator) {
155154
$generator = $parent->addChild('generator', htmlspecialchars($this->generator));
155+
assert(null !== $generator);
156156
if (null !== $this->generatorVersion) {
157157
$generator->addAttribute('version', $this->generatorVersion);
158158
}
@@ -163,6 +163,7 @@ public function addChildrenTo(SimpleXMLElement $parent): void
163163

164164
foreach ($this->customElements as $customElement) {
165165
$element = $parent->addChild($customElement['name'], htmlspecialchars($customElement['value']), $customElement['uri']);
166+
assert(null !== $element);
166167
foreach ($customElement['attributes'] as $name => $value) {
167168
$element->addAttribute($name, $value);
168169
}
@@ -173,9 +174,6 @@ public function addChildrenTo(SimpleXMLElement $parent): void
173174
}
174175
}
175176

176-
/**
177-
* @throws Exception
178-
*/
179177
public function getSimpleXML(): SimpleXMLElement
180178
{
181179
$attributes = [];
@@ -198,9 +196,6 @@ public function getSimpleXML(): SimpleXMLElement
198196
return $xml;
199197
}
200198

201-
/**
202-
* @throws Exception
203-
*/
204199
public function getDocument(): DOMDocument
205200
{
206201
$node = dom_import_simplexml($this->getSimpleXML());
@@ -212,8 +207,6 @@ public function getDocument(): DOMDocument
212207

213208
/**
214209
* @return false|string
215-
*
216-
* @throws Exception
217210
*/
218211
public function saveXML()
219212
{

tests/FeedTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use AtomGenerator\Entry;
88
use AtomGenerator\Feed;
99
use DateTime;
10-
use Exception;
1110
use InvalidArgumentException;
1211
use LibXMLError;
1312
use PHPUnit\Framework\TestCase;
@@ -25,9 +24,6 @@ final class FeedTest extends TestCase
2524
/** @var bool reset file contents */
2625
protected static $reset = false;
2726

28-
/**
29-
* @throws Exception
30-
*/
3127
public function testFeedCreation1(): void
3228
{
3329
$feed = new Feed();
@@ -78,9 +74,6 @@ public function testFeedCreation1(): void
7874
self::assertXmlStringEqualsXmlFile(self::TEST_FEED_XML_PATH_1, $xml);
7975
}
8076

81-
/**
82-
* @throws Exception
83-
*/
8477
public function testFeedCreation2(): void
8578
{
8679
$feed = new Feed();
@@ -113,9 +106,6 @@ public function testFeedCreation2(): void
113106
self::assertXmlStringEqualsXmlFile(self::TEST_FEED_XML_PATH_2, $xml);
114107
}
115108

116-
/**
117-
* @throws Exception
118-
*/
119109
public function testFeedCreation3(): void
120110
{
121111
$feed = new Feed();
@@ -144,9 +134,6 @@ public function testFeedCreation3(): void
144134
self::assertXmlStringEqualsXmlFile(self::TEST_FEED_XML_PATH_3, $xml);
145135
}
146136

147-
/**
148-
* @throws Exception
149-
*/
150137
public function testFeedCreation4(): void
151138
{
152139
$sourceFeed = new Feed();
@@ -213,8 +200,6 @@ public function testFeedCreationException3(): void
213200

214201
/**
215202
* @codeCoverageIgnore
216-
*
217-
* @throws Exception
218203
*/
219204
public function testFeedCreationException4(): void
220205
{

0 commit comments

Comments
 (0)