apply PSR-4 to source

This commit is contained in:
Ilian Ranguelov 2020-04-03 19:40:49 +02:00
parent ebfae6c319
commit 00b480fcb0
No known key found for this signature in database
GPG Key ID: A5A3FC7EA12C7942
6 changed files with 9 additions and 18 deletions

View File

@ -27,9 +27,7 @@
},
"autoload": {
"psr-4": {
"Psalm\\PhpUnitPlugin\\": ["."],
"Psalm\\PhpUnitPlugin\\Hooks\\": ["hooks"],
"Psalm\\PhpUnitPlugin\\Exception\\" : ["Exception"]
"Psalm\\PhpUnitPlugin\\": "src"
}
},
"autoload-dev": {

View File

@ -5,11 +5,9 @@
<arg name="colors"/>
<!-- Paths to check -->
<file>Plugin.php</file>
<file>src</file>
<file>tests/_support/Helper</file>
<file>tests/_support/AcceptanceTester.php</file>
<file>hooks</file>
<file>Exception</file>
<!-- inherit rules from: -->

View File

@ -6,12 +6,7 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="." />
<ignoreFiles>
<directory name="vendor" />
<directory name="stubs" />
<directory name="tests/_support" />
</ignoreFiles>
<directory name="src" />
</projectFiles>
<issueHandlers>

View File

@ -15,14 +15,14 @@ class Plugin implements PluginEntryPointInterface
/** @return void */
public function __invoke(RegistrationInterface $psalm, SimpleXMLElement $config = null)
{
$psalm->addStubFile(__DIR__ . '/stubs/Assert.php');
$psalm->addStubFile(__DIR__ . '/../stubs/Assert.php');
if ($this->packageVersionIs('phpunit/phpunit', '>=', '7.5')) {
$psalm->addStubFile(__DIR__ . '/stubs/Assert_75.php');
$psalm->addStubFile(__DIR__ . '/../stubs/Assert_75.php');
}
$psalm->addStubFile(__DIR__ . '/stubs/TestCase.php');
$psalm->addStubFile(__DIR__ . '/stubs/MockBuilder.php');
$psalm->addStubFile(__DIR__ . '/stubs/InvocationMocker.php');
$psalm->addStubFile(__DIR__ . '/stubs/Prophecy.php');
$psalm->addStubFile(__DIR__ . '/../stubs/TestCase.php');
$psalm->addStubFile(__DIR__ . '/../stubs/MockBuilder.php');
$psalm->addStubFile(__DIR__ . '/../stubs/InvocationMocker.php');
$psalm->addStubFile(__DIR__ . '/../stubs/Prophecy.php');
class_exists(Hooks\TestCaseHandler::class, true);
$psalm->registerHooksFromClass(Hooks\TestCaseHandler::class);