Skip to content

Commit 4fb48b2

Browse files
committed
Move tools to tools
1 parent e329d45 commit 4fb48b2

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
},
3737
"autoload-dev": {
3838
"psr-4": {
39-
"Nexus\\Assert\\Tests\\": "tests/"
39+
"Nexus\\Assert\\Tests\\": "tests/",
40+
"Nexus\\Assert\\Tools\\": "tools/src/"
4041
},
4142
"exclude-from-classmap": [
4243
"tests/data/**"
@@ -59,7 +60,7 @@
5960
},
6061
"scripts": {
6162
"post-autoload-dump": [
62-
"Nexus\\Assert\\ComposerScripts::postUpdate"
63+
"Nexus\\Assert\\Tools\\ComposerScripts::postUpdate"
6364
],
6465
"cs:check": "php-cs-fixer check --verbose --ansi --diff",
6566
"cs:fix": "php-cs-fixer fix --verbose --ansi --diff",

phpstan.dist.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ parameters:
1212
paths:
1313
- src
1414
- tests
15+
- tools
1516
excludePaths:
1617
analyseAndScan:
1718
- tests/data/**
19+
analyse:
20+
- tools/vendor/**
1821
bootstrapFiles:
1922
- vendor/autoload.php
2023
exceptions:

phpunit.dist.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
</include>
2525
<exclude>
2626
<directory>src/Type/</directory>
27-
<file>src/ComposerScripts.php</file>
2827
</exclude>
2928
</source>
3029

src/ComposerScripts.php renamed to tools/src/ComposerScripts.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
* the LICENSE file that was distributed with this source code.
1212
*/
1313

14-
namespace Nexus\Assert;
14+
namespace Nexus\Assert\Tools;
1515

1616
/**
1717
* @internal
1818
*/
1919
final class ComposerScripts
2020
{
21-
public const VSCODE_SETTINGS_JSON = __DIR__.'/../.vscode/settings.json';
21+
public const VSCODE_SETTINGS_JSON = __DIR__.'/../../.vscode/settings.json';
2222

2323
public static function postUpdate(): void
2424
{
2525
if (is_file(self::VSCODE_SETTINGS_JSON)) {
26-
self::recursiveDelete(__DIR__.'/../vendor/phpstan/phpstan-phar');
26+
self::recursiveDelete(__DIR__.'/../../vendor/phpstan/phpstan-phar');
2727
self::extractPhpstanPhar();
2828
self::updateVscodeIntelephenseEnvironmentIncludePaths();
2929
}
@@ -55,7 +55,7 @@ private static function recursiveDelete(string $directory): void
5555
private static function extractPhpstanPhar(): void
5656
{
5757
try {
58-
(new \Phar(__DIR__.'/../vendor/phpstan/phpstan/phpstan.phar'))->extractTo(__DIR__.'/../vendor/phpstan/phpstan-phar', null, true);
58+
(new \Phar(__DIR__.'/../../vendor/phpstan/phpstan/phpstan.phar'))->extractTo(__DIR__.'/../../vendor/phpstan/phpstan-phar', null, true);
5959
echo "\033[42m OK \033[0m PHPStan successfully extracted for IDE completion.\n";
6060
} catch (\PharException|\UnexpectedValueException $e) {
6161
echo \sprintf("\033[41m FAIL \033[0m %s\n", $e->getMessage());

0 commit comments

Comments
 (0)