mirror of
https://github.com/danog/psalm-plugin-phpunit.git
synced 2024-12-02 09:27:56 +01:00
apply PSR-4 to source
This commit is contained in:
parent
ebfae6c319
commit
00b480fcb0
@ -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": {
|
||||||
|
@ -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: -->
|
||||||
|
@ -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>
|
||||||
|
@ -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);
|
Loading…
Reference in New Issue
Block a user