Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 12, 2024
1 parent eaf2206 commit 1c80e94
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 5 deletions.
24 changes: 24 additions & 0 deletions build/composer-php-74.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "tomasvotruba/type-coverage",
"type": "phpstan-extension",
"description": "Measure type coverage of your project",
"license": "MIT",
"keywords": ["static analysis", "phpstan-extension"],
"require": {
"php": "^7.4 || ^8.0",
"phpstan/phpstan": "^2.0",
"nette/utils": "^3.2 || ^4.0"
},
"autoload": {
"psr-4": {
"TomasVotruba\\TypeCoverage\\": "src"
}
},
"extra": {
"phpstan": {
"includes": [
"config/extension.neon"
]
}
}
}
10 changes: 10 additions & 0 deletions build/rector-downgrade-php-74.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\DowngradeLevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([DowngradeLevelSetList::DOWN_TO_PHP_74]);
};
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"keywords": ["static analysis", "phpstan-extension"],
"require": {
"php": "^8.2",
"phpstan/phpstan": "^2.0"
"phpstan/phpstan": "^2.0.3"
},
"require-dev": {
"phpstan/extension-installer": "^1.3",
"phpunit/phpunit": "^10.5",
"symplify/easy-coding-standard": "^12.1",
"phpstan/extension-installer": "^1.4",
"phpunit/phpunit": "^11.5",
"symplify/easy-coding-standard": "^12.4",
"rector/rector": "^2.0",
"tracy/tracy": "^2.10",
"tomasvotruba/unused-public": "^0.2"
"tomasvotruba/unused-public": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ parameters:
ignoreErrors:
- identifier: missingType.generics

# used in tests
- message: '#Public constant "TomasVotruba\\TypeCoverage\\(.*?)::ERROR_MESSAGE" is never#'

excludePaths:
- "*/Fixture/*"
- "*/Source/*"
1 change: 1 addition & 0 deletions src/Rules/ReturnTypeCoverageRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
final readonly class ReturnTypeCoverageRule implements Rule
{
/**
* @api used in tests
* @var string
*/
public const ERROR_MESSAGE = 'Out of %d possible return types, only %d - %.1f %% actually have it. Add more return types to get over %s %%';
Expand Down

0 comments on commit 1c80e94

Please sign in to comment.