Skip to content

Commit ba50781

Browse files
committed
update structures
1 parent a92c509 commit ba50781

File tree

10 files changed

+16
-36
lines changed

10 files changed

+16
-36
lines changed

codeception.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ paths:
33
tests: tests
44
output: tests/_output
55
data: tests/_data
6-
support: tests/_support
6+
support: tests
77
envs: tests/_envs
88
actor_suffix: Tester
99
extensions:

composer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^7.4.0 || ^8.0 || ^8.1 || ^8.2",
15+
"ext-simplexml": "*",
1516
"vimeo/psalm": "^5"
1617
},
1718
"require-dev": {
@@ -26,15 +27,12 @@
2627
},
2728
"autoload": {
2829
"psr-4": {
29-
"Sfp\\Psalm\\PsrLogPlugin\\": ["."]
30+
"Sfp\\Psalm\\PsrLogPlugin\\": "src"
3031
}
3132
},
3233
"autoload-dev": {
3334
"psr-4": {
34-
"SfpTest\\Psalm\\PsrLogPlugin\\": [
35-
"tests/_support",
36-
"tests/acceptance"
37-
]
35+
"SfpTest\\Psalm\\PsrLogPlugin\\": "tests"
3836
}
3937
},
4038
"config": {

phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<arg name="colors"/>
66

77
<!-- Paths to check -->
8-
<file>Plugin.php</file>
8+
<file>src</file>
99

1010
<!-- inherit rules from: -->
1111
<rule ref="PSR12"/>

phpunit.xml.dist

Lines changed: 0 additions & 11 deletions
This file was deleted.

psalm.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@
99
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
1010
>
1111
<projectFiles>
12-
<directory name="." />
12+
<directory name="src" />
1313
<ignoreFiles>
1414
<directory name="vendor" />
1515
</ignoreFiles>
1616
</projectFiles>
1717

1818
<issueHandlers>
1919
<LessSpecificReturnType errorLevel="info" />
20-
<PropertyNotSetInConstructor>
21-
<errorLevel type="suppress">
22-
<directory name="tests" />
23-
</errorLevel>
24-
</PropertyNotSetInConstructor>
20+
<UnnecessaryVarAnnotation errorLevel="suppress" />
2521
</issueHandlers>
2622
</psalm>

Plugin.php renamed to src/Plugin.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@
66
use Psalm\Plugin\PluginEntryPointInterface;
77
use Psalm\Plugin\RegistrationInterface;
88

9+
/**
10+
* @api
11+
* @psalm-suppress UnusedClass
12+
*/
913
class Plugin implements PluginEntryPointInterface
1014
{
1115
public function __invoke(RegistrationInterface $psalm, SimpleXMLElement $config = null) : void
1216
{
1317
if (isset($config->throwable) && ((bool)$config->throwable === true)) {
14-
$psalm->addStubFile(__DIR__ . '/throwable-stubs/LoggerInterface.php');
15-
$psalm->addStubFile(__DIR__ . '/throwable-stubs/AbstractLogger.php');
18+
$psalm->addStubFile(__DIR__ . '/../throwable-stubs/LoggerInterface.php');
19+
$psalm->addStubFile(__DIR__ . '/../throwable-stubs/AbstractLogger.php');
1620
} else {
17-
$psalm->addStubFile(__DIR__ . '/stubs/LoggerInterface.php');
18-
$psalm->addStubFile(__DIR__ . '/stubs/AbstractLogger.php');
21+
$psalm->addStubFile(__DIR__ . '/../stubs/LoggerInterface.php');
22+
$psalm->addStubFile(__DIR__ . '/../stubs/AbstractLogger.php');
1923
}
2024
}
2125
}

tests/_support/AcceptanceTester.php renamed to tests/AcceptanceTester.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
namespace SfpTest\Psalm\PsrLogPlugin;
44

5-
use Behat\Gherkin\Node\TableNode;
6-
use Codeception\Exception\TestRuntimeException;
7-
use PHPUnit\Framework\Assert;
8-
95
/**
106
* Inherited Methods
117
* @method void wantToTest($text)
File renamed without changes.
File renamed without changes.

tests/acceptance/ExceptionAcceptance.feature

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ Feature: Exception
55
"""
66
<?xml version="1.0"?>
77
<psalm>
8-
<projectFiles>
9-
<directory name="."/>
10-
<ignoreFiles> <directory name="../../vendor"/> </ignoreFiles>
11-
</projectFiles>
8+
<projectFiles><directory name="."/></projectFiles>
129
<plugins>
1310
<pluginClass class="Sfp\Psalm\PsrLogPlugin\Plugin"/>
1411
</plugins>

0 commit comments

Comments
 (0)