Skip to content

Commit

Permalink
Baselines 3 redundant (string) casts
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Aug 8, 2022
1 parent 8d2ca95 commit 7855d20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 97 deletions.
120 changes: 24 additions & 96 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2223,9 +2223,8 @@
</MixedMethodCall>
</file>
<file src="src/Writer/Extension/DublinCore/Renderer/Entry.php">
<MixedArgument occurrences="2">
<MixedArgument occurrences="1">
<code>$data</code>
<code>$data['name']</code>
</MixedArgument>
<MixedAssignment occurrences="2">
<code>$authors</code>
Expand All @@ -2239,9 +2238,8 @@
</TypeDoesNotContainType>
</file>
<file src="src/Writer/Extension/DublinCore/Renderer/Feed.php">
<MixedArgument occurrences="2">
<MixedArgument occurrences="1">
<code>$data</code>
<code>$data['name']</code>
</MixedArgument>
<MixedAssignment occurrences="2">
<code>$authors</code>
Expand Down Expand Up @@ -2293,11 +2291,6 @@
</RedundantConditionGivenDocblockType>
</file>
<file src="src/Writer/Extension/GooglePlayPodcast/Renderer/Entry.php">
<MixedArgument occurrences="3">
<code>$block</code>
<code>$description</code>
<code>$explicit</code>
</MixedArgument>
<MixedAssignment occurrences="3">
<code>$block</code>
<code>$description</code>
Expand All @@ -2310,12 +2303,8 @@
</MixedMethodCall>
</file>
<file src="src/Writer/Extension/GooglePlayPodcast/Renderer/Feed.php">
<MixedArgument occurrences="8">
<code>$author</code>
<code>$block</code>
<MixedArgument occurrences="4">
<code>$cat</code>
<code>$description</code>
<code>$explicit</code>
<code>$image</code>
<code>$key</code>
<code>$subcat</code>
Expand Down Expand Up @@ -2426,19 +2415,9 @@
</TypeDoesNotContainType>
</file>
<file src="src/Writer/Extension/ITunes/Renderer/Entry.php">
<MixedArgument occurrences="12">
<code>$author</code>
<code>$block</code>
<code>$duration</code>
<code>$episode</code>
<code>$explicit</code>
<MixedArgument occurrences="2">
<code>$image</code>
<code>$keywords</code>
<code>$season</code>
<code>$subtitle</code>
<code>$summary</code>
<code>$title</code>
<code>$type</code>
</MixedArgument>
<MixedAssignment occurrences="14">
<code>$author</code>
Expand Down Expand Up @@ -2477,22 +2456,12 @@
</TypeDoesNotContainType>
</file>
<file src="src/Writer/Extension/ITunes/Renderer/Feed.php">
<MixedArgument occurrences="15">
<code>$author</code>
<code>$block</code>
<MixedArgument occurrences="5">
<code>$cat</code>
<code>$duration</code>
<code>$explicit</code>
<code>$image</code>
<code>$key</code>
<code>$keywords</code>
<code>$owner['email']</code>
<code>$owner['name']</code>
<code>$subcat</code>
<code>$subtitle</code>
<code>$summary</code>
<code>$type</code>
<code>$url</code>
</MixedArgument>
<MixedArrayAccess occurrences="2">
<code>$owner['email']</code>
Expand Down Expand Up @@ -2560,12 +2529,19 @@
<code>getPodcastIndexSoundbites</code>
<code>getPodcastIndexTranscript</code>
</MixedMethodCall>
<RedundantCastGivenDocblockType occurrences="1">
<code>(string) $soundbite['title']</code>
</RedundantCastGivenDocblockType>
</file>
<file src="src/Writer/Extension/PodcastIndex/Renderer/Feed.php">
<MixedMethodCall occurrences="2">
<code>getPodcastIndexFunding</code>
<code>getPodcastIndexLocked</code>
</MixedMethodCall>
<RedundantCastGivenDocblockType occurrences="2">
<code>(string) $funding['title']</code>
<code>(string) $locked['value']</code>
</RedundantCastGivenDocblockType>
</file>
<file src="src/Writer/Extension/Slash/Renderer/Entry.php">
<MixedAssignment occurrences="1">
Expand Down Expand Up @@ -2608,9 +2584,6 @@
</TypeDoesNotContainType>
</file>
<file src="src/Writer/Extension/WellFormedWeb/Renderer/Entry.php">
<MixedArgument occurrences="1">
<code>$link['uri']</code>
</MixedArgument>
<MixedArrayAccess occurrences="2">
<code>$link['type']</code>
<code>$link['uri']</code>
Expand Down Expand Up @@ -2742,19 +2715,16 @@
<code>format</code>
<code>format</code>
</InvalidMethodCall>
<MixedArgument occurrences="15">
<MixedArgument occurrences="12">
<code>$cat['label']</code>
<code>$cat['scheme']</code>
<code>$cat['term']</code>
<code>$cat['term']</code>
<code>$content</code>
<code>$data</code>
<code>$data['email']</code>
<code>$data['length']</code>
<code>$data['name']</code>
<code>$data['type']</code>
<code>$data['uri']</code>
<code>$data['uri']</code>
<code>$source</code>
<code>$this-&gt;getDataContainer()-&gt;getDateCreated()-&gt;format(DateTime::ATOM)</code>
<code>$this-&gt;getDataContainer()-&gt;getDateModified()-&gt;format(DateTime::ATOM)</code>
Expand Down Expand Up @@ -2786,13 +2756,12 @@
<ParadoxicalCondition occurrences="1">
<code>! $authors || empty($authors)</code>
</ParadoxicalCondition>
<PossiblyNullArgument occurrences="9">
<PossiblyNullArgument occurrences="8">
<code>$this-&gt;container-&gt;getEncoding()</code>
<code>$this-&gt;getDataContainer()-&gt;getDescription()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getTitle()</code>
Expand All @@ -2816,11 +2785,8 @@
<InvalidArgument occurrences="1">
<code>$container</code>
</InvalidArgument>
<MixedArgument occurrences="7">
<MixedArgument occurrences="4">
<code>$data</code>
<code>$data['email']</code>
<code>$data['name']</code>
<code>$data['uri']</code>
<code>$this-&gt;container-&gt;getReference()</code>
<code>$this-&gt;container-&gt;getWhen()-&gt;format(DateTime::ATOM)</code>
<code>$this-&gt;getDataContainer()-&gt;getComment()</code>
Expand Down Expand Up @@ -2852,11 +2818,8 @@
<InvalidArgument occurrences="1">
<code>$container</code>
</InvalidArgument>
<MixedArgument occurrences="7">
<MixedArgument occurrences="4">
<code>$data</code>
<code>$data['email']</code>
<code>$data['name']</code>
<code>$data['uri']</code>
<code>$this-&gt;container-&gt;getReference()</code>
<code>$this-&gt;container-&gt;getWhen()-&gt;format(DateTime::ATOM)</code>
<code>$this-&gt;getDataContainer()-&gt;getComment()</code>
Expand Down Expand Up @@ -2894,14 +2857,12 @@
<InvalidMethodCall occurrences="1">
<code>format</code>
</InvalidMethodCall>
<MixedArgument occurrences="8">
<MixedArgument occurrences="6">
<code>$cat['scheme']</code>
<code>$cat['term']</code>
<code>$data</code>
<code>$data['type']</code>
<code>$data['uri']</code>
<code>$link</code>
<code>$name</code>
<code>$this-&gt;getDataContainer()-&gt;getDateModified()-&gt;format(DateTime::RSS)</code>
</MixedArgument>
<MixedArrayAccess occurrences="8">
Expand Down Expand Up @@ -2935,14 +2896,11 @@
<ParadoxicalCondition occurrences="1">
<code>! $authors || empty($authors)</code>
</ParadoxicalCondition>
<PossiblyNullArgument occurrences="7">
<PossiblyNullArgument occurrences="4">
<code>$this-&gt;container-&gt;getEncoding()</code>
<code>$this-&gt;getDataContainer()-&gt;getDescription()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getTitle()</code>
</PossiblyNullArgument>
<PossiblyNullReference occurrences="1">
<code>format</code>
Expand All @@ -2969,19 +2927,14 @@
<InvalidMethodCall occurrences="1">
<code>format</code>
</InvalidMethodCall>
<MixedArgument occurrences="14">
<MixedArgument occurrences="9">
<code>$cat['label']</code>
<code>$cat['scheme']</code>
<code>$cat['term']</code>
<code>$cat['term']</code>
<code>$data</code>
<code>$data['email']</code>
<code>$data['name']</code>
<code>$data['uri']</code>
<code>$gdata['name']</code>
<code>$href</code>
<code>$hubUrl</code>
<code>$image['uri']</code>
<code>$this-&gt;getDataContainer()-&gt;getDateModified()-&gt;format(DateTime::ATOM)</code>
<code>$type</code>
</MixedArgument>
Expand All @@ -3002,15 +2955,12 @@
<ParadoxicalCondition occurrences="1">
<code>! $authors || empty($authors)</code>
</ParadoxicalCondition>
<PossiblyNullArgument occurrences="8">
<PossiblyNullArgument occurrences="5">
<code>$gdata['uri']</code>
<code>$gdata['version']</code>
<code>$this-&gt;getDataContainer()-&gt;getDescription()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getLanguage()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getTitle()</code>
</PossiblyNullArgument>
<PossiblyNullArrayAccess occurrences="1">
<code>$gdata['name']</code>
Expand Down Expand Up @@ -3069,19 +3019,14 @@
<InvalidMethodCall occurrences="1">
<code>format</code>
</InvalidMethodCall>
<MixedArgument occurrences="14">
<MixedArgument occurrences="9">
<code>$cat['label']</code>
<code>$cat['scheme']</code>
<code>$cat['term']</code>
<code>$cat['term']</code>
<code>$data</code>
<code>$data['email']</code>
<code>$data['name']</code>
<code>$data['uri']</code>
<code>$gdata['name']</code>
<code>$href</code>
<code>$hubUrl</code>
<code>$image['uri']</code>
<code>$this-&gt;getDataContainer()-&gt;getDateModified()-&gt;format(DateTime::ATOM)</code>
<code>$type</code>
</MixedArgument>
Expand All @@ -3102,15 +3047,12 @@
<ParadoxicalCondition occurrences="1">
<code>! $authors || empty($authors)</code>
</ParadoxicalCondition>
<PossiblyNullArgument occurrences="8">
<PossiblyNullArgument occurrences="5">
<code>$gdata['uri']</code>
<code>$gdata['version']</code>
<code>$this-&gt;getDataContainer()-&gt;getDescription()</code>
<code>$this-&gt;getDataContainer()-&gt;getId()</code>
<code>$this-&gt;getDataContainer()-&gt;getLanguage()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getLink()</code>
<code>$this-&gt;getDataContainer()-&gt;getTitle()</code>
</PossiblyNullArgument>
<PossiblyNullArrayAccess occurrences="1">
<code>$gdata['name']</code>
Expand All @@ -3135,9 +3077,6 @@
<InvalidArrayOffset occurrences="1">
<code>$gdata['name']</code>
</InvalidArrayOffset>
<MixedArgument occurrences="1">
<code>$gdata['name']</code>
</MixedArgument>
<MixedAssignment occurrences="1">
<code>$ext</code>
</MixedAssignment>
Expand Down Expand Up @@ -3171,9 +3110,6 @@
<InvalidArrayOffset occurrences="1">
<code>$gdata['name']</code>
</InvalidArrayOffset>
<MixedArgument occurrences="1">
<code>$gdata['name']</code>
</MixedArgument>
<MixedAssignment occurrences="1">
<code>$ext</code>
</MixedAssignment>
Expand Down Expand Up @@ -3214,15 +3150,9 @@
<code>format</code>
<code>format</code>
</InvalidMethodCall>
<MixedArgument occurrences="10">
<MixedArgument occurrences="4">
<code>$cat['scheme']</code>
<code>$cat['term']</code>
<code>$data</code>
<code>$image['height']</code>
<code>$image['uri']</code>
<code>$image['width']</code>
<code>$name</code>
<code>$name</code>
<code>$this-&gt;getDataContainer()-&gt;getDateModified()-&gt;format(DateTime::RSS)</code>
<code>$this-&gt;getDataContainer()-&gt;getLastBuildDate()-&gt;format(DateTime::RSS)</code>
</MixedArgument>
Expand Down Expand Up @@ -3255,10 +3185,8 @@
<ParadoxicalCondition occurrences="1">
<code>! $authors || empty($authors)</code>
</ParadoxicalCondition>
<PossiblyNullArgument occurrences="3">
<PossiblyNullArgument occurrences="1">
<code>$this-&gt;container-&gt;getEncoding()</code>
<code>$this-&gt;getDataContainer()-&gt;getDescription()</code>
<code>$this-&gt;getDataContainer()-&gt;getTitle()</code>
</PossiblyNullArgument>
<PossiblyNullArrayAccess occurrences="1">
<code>$gdata['name']</code>
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/Renderer/Feed/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function _setLink(DOMDocument $dom, DOMElement $root)
}
$link = $dom->createElement('link');
$root->appendChild($link);
$text = $dom->createTextNode((string) $value);
$text = $dom->createTextNode($value);
$link->appendChild($text);
if (! Uri::factory($value)->isValid()) {
$link->setAttribute('isPermaLink', 'false');
Expand Down

0 comments on commit 7855d20

Please sign in to comment.