Skip to content

Commit

Permalink
Update to phpstan 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Nov 2, 2021
1 parent 41ce67d commit 93387bd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"require-dev": {
"nexusphp/tachycardia": "^1.3",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^9.5"
},
"config": {
Expand Down
3 changes: 1 addition & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ includes:

parameters:
tmpDir: build/phpstan
level: 8
level: 9
paths:
- src
- tests
Expand All @@ -19,7 +19,6 @@ parameters:
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
checkMissingClosureNativeReturnTypehintRule: true
checkMissingIterableValueType: false
reportMaybesInMethodSignatures: true
reportStaticMethodSignatures: true
Expand Down
46 changes: 40 additions & 6 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,36 @@ final class Factory
/**
* Array of resolved options.
*
* @var array<string, mixed>
* @phpstan-var array{
* cacheFile: string,
* customFixers: iterable<\PhpCsFixer\Fixer\FixerInterface>,
* finder: \PhpCsFixer\Finder|iterable<string>,
* format: string,
* hideProgress: bool,
* indent: string,
* lineEnding: string,
* phpExecutable: null|string,
* isRiskyAllowed: bool,
* usingCache: bool,
* rules: array<string, mixed>
* }
*/
private $options = [];
private $options;

/**
* Constructor.
*
* @param array<string, mixed> $options
* @param array{
* cacheFile: string,
* customFixers: iterable<\PhpCsFixer\Fixer\FixerInterface>,
* finder: \PhpCsFixer\Finder|iterable<string>,
* format: string,
* hideProgress: bool,
* indent: string,
* lineEnding: string,
* phpExecutable: null|string,
* isRiskyAllowed: bool,
* usingCache: bool,
* rules: array<string, mixed>
* } $options
*/
private function __construct(RulesetInterface $ruleset, array $options)
{
Expand All @@ -54,7 +76,19 @@ private function __construct(RulesetInterface $ruleset, array $options)
* is created.
*
* @param array<string, mixed> $overrides
* @param array<string, mixed> $options
* @param array{
* cacheFile?: string,
* customFixers?: iterable<\PhpCsFixer\Fixer\FixerInterface>,
* finder?: \PhpCsFixer\Finder|iterable<string>,
* format?: string,
* hideProgress?: bool,
* indent?: string,
* lineEnding?: string,
* phpExecutable?: null|string,
* isRiskyAllowed?: bool,
* usingCache?: bool,
* customRules?: array<string, mixed>
* } $options
*/
public static function create(RulesetInterface $ruleset, array $overrides = [], array $options = []): self
{
Expand Down

0 comments on commit 93387bd

Please sign in to comment.