Skip to content

Commit

Permalink
Merge pull request #51 from koriym/spike
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
koriym authored Apr 23, 2020
2 parents eb7c0c8 + 3473582 commit 158e0a9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

/composer.lock
/phpunit.xml
/.phpunit.result.cache
/.php_cs.cache
22 changes: 6 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"friendsofphp/php-cs-fixer": "^2.16",
"phpmd/phpmd": "^2.8",
"phpstan/phpstan" : "^0.12",
"vimeo/psalm": "^3.8"
"vimeo/psalm": "^3.8",
"phpmetrics/phpmetrics": "^2.6"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -55,21 +56,10 @@
"./vendor/bin/psalm --init"
],
"test": ["vendor/bin/phpunit"],
"tests": [
"@cs",
"./vendor/bin/phpmd src,tests text ./phpmd.xml",
"./vendor/bin/phpstan analyse -l max src tests -c phpstan.neon --no-progress",
"./vendor/bin/psalm",
"@test"
],
"tests": ["@cs", "./vendor/bin/phpmd src,tests text ./phpmd.xml", "./vendor/bin/phpstan analyse -c phpstan.neon --no-progress", "./vendor/bin/psalm", "@test"],
"coverage": ["php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-html=build/coverage"],
"cs": [
"./vendor/bin/php-cs-fixer fix -v --dry-run",
"./vendor/bin/phpcs --standard=phpcs.xml src;"
],
"cs-fix": [
"./vendor/bin/php-cs-fixer fix -v",
"./vendor/bin/phpcbf src tests"
]
"cs": ["./vendor/bin/php-cs-fixer fix -v --dry-run", "./vendor/bin/phpcs --standard=phpcs.xml src;"],
"cs-fix": ["./vendor/bin/php-cs-fixer fix -v", "./vendor/bin/phpcbf src tests"],
"metrics": ["phpmetrics --report-html=build/metrics --excluded-dirs=src/Exception src"]
}
}
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
level: max
paths:
- src
- tests
ignoreErrors:
checkMissingIterableValueType: false
2 changes: 1 addition & 1 deletion src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ private static function getDefinition(string $vendor, string $package, string $p
unset(
$composerDefinition['autoload']['files'],
$composerDefinition['scripts']['pre-install-cmd'],
$composerDefinition['scripts']['post-install-cmd'],
$composerDefinition['scripts']['pre-update-cmd'],
$composerDefinition['scripts']['post-create-project-cmd'],
$composerDefinition['keywords'],
$composerDefinition['homepage']
);

$composerDefinition['name'] = $packageName;
$composerDefinition['authors'] = [
[
Expand Down

0 comments on commit 158e0a9

Please sign in to comment.