Skip to content

Commit

Permalink
Baselined psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
glo17680 committed Oct 31, 2023
1 parent 530efa7 commit 1272818
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
14 changes: 11 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<InvalidPropertyAssignmentValue occurrences="1">
<code>$this-&gt;charList</code>
</InvalidPropertyAssignmentValue>
<MixedArgument occurrences="16">
<MixedArgument occurrences="18">
<code>$firstPart[$i]</code>
<code>$lastPart[$i]</code>
<code>$leftChar</code>
Expand All @@ -63,6 +63,7 @@
<code>$this-&gt;outputLine[$row]</code>
<code>$this-&gt;outputLine[$row][$k]</code>
<code>$this-&gt;outputLine[0]</code>
<code>$rightChar</code>
</MixedArgument>
<MixedArgumentTypeCoercion occurrences="3">
<code>$char</code>
Expand Down Expand Up @@ -190,6 +191,9 @@
<code>$amount</code>
<code>$amount</code>
</UnusedVariable>
<RedundantConditionGivenDocblockType occurrences="2">
<code>$this->_smushem($leftChar, $rightChar)</code>
</RedundantConditionGivenDocblockType>
</file>
<file src="src/Table/Column.php">
<DocblockTypeContradiction occurrences="3">
Expand Down Expand Up @@ -241,8 +245,9 @@
</InvalidFalsableReturnType>
</file>
<file src="src/Table/DecoratorManager.php">
<NonInvariantDocblockPropertyType occurrences="1">
<NonInvariantDocblockPropertyType occurrences="2">
<code>$aliases</code>
<code>$factories</code>
</NonInvariantDocblockPropertyType>
</file>
<file src="src/Table/Row.php">
Expand Down Expand Up @@ -367,6 +372,9 @@
<code>(int) $autoSeparate</code>
<code>(int) $padding</code>
</RedundantCastGivenDocblockType>
<MethodSignatureMustProvideReturnType occurence="1">
<code>__toString</code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="test/FigletTest.php">
<InvalidArgument occurrences="1">
Expand Down Expand Up @@ -416,7 +424,7 @@
</UnusedVariable>
</file>
<file src="test/MultiByteTest.php">
<DeprecatedMethod occurrences="2">
<DeprecatedMethod occurrences="4">
<code>Text\MultiByte::strPad('äääöö', 2, 'ö')</code>
<code>Text\MultiByte::wordWrap('äbüöcß', 2, ' ', true)</code>
</DeprecatedMethod>
Expand Down
4 changes: 0 additions & 4 deletions src/Figlet/Figlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -832,10 +832,6 @@ protected function _smushAmount()
if (empty($leftChar) || $leftChar === ' ') {
$amount++;
} elseif (! empty($rightChar)) {
/**
* @psalm-suppress RedundantConditionGivenDocblockType
* @psalm-suppress MixedArgument
*/
if ($this->_smushem($leftChar, $rightChar) !== null) {
$amount++;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Table/DecoratorManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ class DecoratorManager extends AbstractPluginManager
'zendtexttabledecoratorunicode' => Decorator\Unicode::class,
];

/**
* @var FactoriesConfigurationType
* @psalm-suppress NonInvariantDocblockPropertyType
*/
/** @var FactoriesConfigurationType */
protected $factories = [
Decorator\Ascii::class => InvokableFactory::class,
Decorator\Unicode::class => InvokableFactory::class,
Expand Down
1 change: 0 additions & 1 deletion src/Table/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ public function render()
/**
* Magic method which returns the rendered table
*
* @psalm-suppress MethodSignatureMustProvideReturnType
* @return string
*/
public function __toString()
Expand Down
1 change: 0 additions & 1 deletion test/MultiByteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

/**
* @group Laminas_Text
* @psalm-suppress DeprecatedMethod
*/
class MultiByteTest extends TestCase
{
Expand Down

0 comments on commit 1272818

Please sign in to comment.