Skip to content

Commit

Permalink
use phpstan's strict rules
Browse files Browse the repository at this point in the history
  • Loading branch information
konecnyjakub committed Dec 1, 2017
1 parent 0407b15 commit 451db16
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
composer.lock export-ignore
phpstan.neon export-ignore
.scrutinizer.yml export-ignore
build.xml export-ignore
build.xml export-ignore
phpstan.neon export-ignore
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<arg value="-l"/>
<arg value="7"/>
<arg value="-c"/>
<arg path="vendor/nexendrie/code-quality/phpstan.neon"/>
<arg path="phpstan.neon"/>
<arg path="src"/>
<arg path="tests"/>
</exec>
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
includes:
- vendor/nexendrie/code-quality/phpstan.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
6 changes: 3 additions & 3 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ public function generate(): \SimpleXMLElement {
}
$channel = simplexml_load_file(__DIR__ . "/template.xml");
$channel->channel->lastBuildDate[0][0] = date($this->dateTimeFormat, $lastBuildDate);
if($this->link) {
if($this->link !== "") {
$channel->channel->link[0][0] = $this->link;
}
if($this->title) {
if($this->title !== "") {
$channel->channel->title[0][0] = $this->title;
}
if($this->description) {
if($this->description !== "") {
$channel->channel->description[0][0] = $this->description;
}
/** @var RssChannelItem $item */
Expand Down

0 comments on commit 451db16

Please sign in to comment.