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": { "autoload": {
"psr-4": { "psr-4": {
"Psalm\\PhpUnitPlugin\\": ["."], "Psalm\\PhpUnitPlugin\\": "src"
"Psalm\\PhpUnitPlugin\\Hooks\\": ["hooks"],
"Psalm\\PhpUnitPlugin\\Exception\\" : ["Exception"]
} }
}, },
"autoload-dev": { "autoload-dev": {

View File

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

View File

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

View File

@ -15,14 +15,14 @@ class Plugin implements PluginEntryPointInterface
/** @return void */ /** @return void */
public function __invoke(RegistrationInterface $psalm, SimpleXMLElement $config = null) 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')) { 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/TestCase.php');
$psalm->addStubFile(__DIR__ . '/stubs/MockBuilder.php'); $psalm->addStubFile(__DIR__ . '/../stubs/MockBuilder.php');
$psalm->addStubFile(__DIR__ . '/stubs/InvocationMocker.php'); $psalm->addStubFile(__DIR__ . '/../stubs/InvocationMocker.php');
$psalm->addStubFile(__DIR__ . '/stubs/Prophecy.php'); $psalm->addStubFile(__DIR__ . '/../stubs/Prophecy.php');
class_exists(Hooks\TestCaseHandler::class, true); class_exists(Hooks\TestCaseHandler::class, true);
$psalm->registerHooksFromClass(Hooks\TestCaseHandler::class); $psalm->registerHooksFromClass(Hooks\TestCaseHandler::class);