Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 1272818

Browse files
committed
Baselined psalm errors
1 parent 530efa7 commit 1272818

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

Diff for: psalm-baseline.xml

+11-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<InvalidPropertyAssignmentValue occurrences="1">
4747
<code>$this-&gt;charList</code>
4848
</InvalidPropertyAssignmentValue>
49-
<MixedArgument occurrences="16">
49+
<MixedArgument occurrences="18">
5050
<code>$firstPart[$i]</code>
5151
<code>$lastPart[$i]</code>
5252
<code>$leftChar</code>
@@ -63,6 +63,7 @@
6363
<code>$this-&gt;outputLine[$row]</code>
6464
<code>$this-&gt;outputLine[$row][$k]</code>
6565
<code>$this-&gt;outputLine[0]</code>
66+
<code>$rightChar</code>
6667
</MixedArgument>
6768
<MixedArgumentTypeCoercion occurrences="3">
6869
<code>$char</code>
@@ -190,6 +191,9 @@
190191
<code>$amount</code>
191192
<code>$amount</code>
192193
</UnusedVariable>
194+
<RedundantConditionGivenDocblockType occurrences="2">
195+
<code>$this->_smushem($leftChar, $rightChar)</code>
196+
</RedundantConditionGivenDocblockType>
193197
</file>
194198
<file src="src/Table/Column.php">
195199
<DocblockTypeContradiction occurrences="3">
@@ -241,8 +245,9 @@
241245
</InvalidFalsableReturnType>
242246
</file>
243247
<file src="src/Table/DecoratorManager.php">
244-
<NonInvariantDocblockPropertyType occurrences="1">
248+
<NonInvariantDocblockPropertyType occurrences="2">
245249
<code>$aliases</code>
250+
<code>$factories</code>
246251
</NonInvariantDocblockPropertyType>
247252
</file>
248253
<file src="src/Table/Row.php">
@@ -367,6 +372,9 @@
367372
<code>(int) $autoSeparate</code>
368373
<code>(int) $padding</code>
369374
</RedundantCastGivenDocblockType>
375+
<MethodSignatureMustProvideReturnType occurence="1">
376+
<code>__toString</code>
377+
</MethodSignatureMustProvideReturnType>
370378
</file>
371379
<file src="test/FigletTest.php">
372380
<InvalidArgument occurrences="1">
@@ -416,7 +424,7 @@
416424
</UnusedVariable>
417425
</file>
418426
<file src="test/MultiByteTest.php">
419-
<DeprecatedMethod occurrences="2">
427+
<DeprecatedMethod occurrences="4">
420428
<code>Text\MultiByte::strPad('äääöö', 2, 'ö')</code>
421429
<code>Text\MultiByte::wordWrap('äbüöcß', 2, ' ', true)</code>
422430
</DeprecatedMethod>

Diff for: src/Figlet/Figlet.php

-4
Original file line numberDiff line numberDiff line change
@@ -832,10 +832,6 @@ protected function _smushAmount()
832832
if (empty($leftChar) || $leftChar === ' ') {
833833
$amount++;
834834
} elseif (! empty($rightChar)) {
835-
/**
836-
* @psalm-suppress RedundantConditionGivenDocblockType
837-
* @psalm-suppress MixedArgument
838-
*/
839835
if ($this->_smushem($leftChar, $rightChar) !== null) {
840836
$amount++;
841837
}

Diff for: src/Table/DecoratorManager.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ class DecoratorManager extends AbstractPluginManager
4646
'zendtexttabledecoratorunicode' => Decorator\Unicode::class,
4747
];
4848

49-
/**
50-
* @var FactoriesConfigurationType
51-
* @psalm-suppress NonInvariantDocblockPropertyType
52-
*/
49+
/** @var FactoriesConfigurationType */
5350
protected $factories = [
5451
Decorator\Ascii::class => InvokableFactory::class,
5552
Decorator\Unicode::class => InvokableFactory::class,

Diff for: src/Table/Table.php

-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ public function render()
499499
/**
500500
* Magic method which returns the rendered table
501501
*
502-
* @psalm-suppress MethodSignatureMustProvideReturnType
503502
* @return string
504503
*/
505504
public function __toString()

Diff for: test/MultiByteTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
/**
1111
* @group Laminas_Text
12-
* @psalm-suppress DeprecatedMethod
1312
*/
1413
class MultiByteTest extends TestCase
1514
{

0 commit comments

Comments
 (0)