Skip to content

Commit

Permalink
Update psalm.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
klimick committed May 22, 2023
1 parent decef3c commit cabed4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 37 deletions.
42 changes: 7 additions & 35 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
findUnusedBaselineEntry="false"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
findUnusedPsalmSuppress="true"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<psalm errorLevel="1"
findUnusedBaselineEntry="false"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
findUnusedPsalmSuppress="true"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd">
<projectFiles>
<directory name="src"/>
<directory name="tests"/>
Expand All @@ -17,37 +15,11 @@
</projectFiles>
<issueHandlers>
<Trace errorLevel="error"/>
<DeprecatedMethod errorLevel="suppress">
<errorLevel type="suppress">
<directory name="tests"/>
</errorLevel>
</DeprecatedMethod>
<UnusedVariable errorLevel="suppress">
<errorLevel type="suppress">
<directory name="src/Fp/Functions"/>
</errorLevel>
</UnusedVariable>
<DuplicateFunction errorLevel="suppress">
<errorLevel type="suppress">
<directory name="src/Fp/Functions"/>
</errorLevel>
</DuplicateFunction>
<PropertyNotSetInConstructor errorLevel="suppress">
<errorLevel type="suppress">
<directory name="tests"/>
</errorLevel>
</PropertyNotSetInConstructor>
<DuplicateClass errorLevel="suppress">
<errorLevel type="suppress">
<directory name="src/Fp/Functional"/>
</errorLevel>
</DuplicateClass>
<UnusedClosureParam errorLevel="suppress"/>
<UnusedMethodCall errorLevel="suppress">
<errorLevel type="suppress">
<directory name="tests"/>
</errorLevel>
</UnusedMethodCall>
</issueHandlers>
<plugins>
<pluginClass class="Fp\PsalmPlugin\FunctionalPlugin"/>
Expand Down
4 changes: 2 additions & 2 deletions tests/Runtime/Classes/ExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function testCallStaticExtensionMethod(object $instance, string $extClass

public function testAddInstanceMethodTwice(): void
{
$this->expectErrorMessage("Instance extension method '{$this->testMethodName}' is already defined!");
$this->expectExceptionMessage("Instance extension method '{$this->testMethodName}' is already defined!");

ArrayListExtensions::addInstanceExtension($this->testMethodName, function(ArrayList $list): int {
/** @var ArrayList<int> $list */;
Expand All @@ -147,7 +147,7 @@ public function testAddInstanceMethodTwice(): void

public function testAddStaticMethodTwice(): void
{
$this->expectErrorMessage("Static extension method '{$this->testStaticMethodName}' is already defined!");
$this->expectExceptionMessage("Static extension method '{$this->testStaticMethodName}' is already defined!");

ArrayListExtensions::addStaticExtension($this->testStaticMethodName, function(string $string): ArrayList {
return ArrayList::collect(str_split($string));
Expand Down

0 comments on commit cabed4b

Please sign in to comment.