diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 3b39ed8f3f0..d977722fd21 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -1468,7 +1468,7 @@ public function setAdvancedErrorLevel(string $issue_key, array $config, ?string public function safeSetAdvancedErrorLevel( string $issue_key, array $config, - ?string $default_error_level = null + ?string $default_error_level = null, ): void { if (!isset($this->issue_handlers[$issue_key])) { $this->setAdvancedErrorLevel($issue_key, $config, $default_error_level); diff --git a/src/Psalm/Internal/Analyzer/Statements/DeclareAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/DeclareAnalyzer.php index fed7eb3e1f1..ee3c8059c46 100644 --- a/src/Psalm/Internal/Analyzer/Statements/DeclareAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/DeclareAnalyzer.php @@ -19,7 +19,7 @@ final class DeclareAnalyzer public static function analyze( StatementsAnalyzer $statements_analyzer, PhpParser\Node\Stmt\Declare_ $stmt, - Context $context + Context $context, ): void { foreach ($stmt->declares as $declaration) { $declaration_key = (string) $declaration->key; @@ -55,7 +55,7 @@ public static function analyze( private static function analyzeStrictTypesDeclaration( StatementsAnalyzer $statements_analyzer, PhpParser\Node\Stmt\DeclareDeclare $declaration, - Context $context + Context $context, ): void { if (!$declaration->value instanceof PhpParser\Node\Scalar\LNumber || !in_array($declaration->value->value, [0, 1], true) @@ -78,7 +78,7 @@ private static function analyzeStrictTypesDeclaration( private static function analyzeTicksDeclaration( StatementsAnalyzer $statements_analyzer, - PhpParser\Node\Stmt\DeclareDeclare $declaration + PhpParser\Node\Stmt\DeclareDeclare $declaration, ): void { if (!$declaration->value instanceof PhpParser\Node\Scalar\LNumber) { IssueBuffer::maybeAdd( @@ -93,7 +93,7 @@ private static function analyzeTicksDeclaration( private static function analyzeEncodingDeclaration( StatementsAnalyzer $statements_analyzer, - PhpParser\Node\Stmt\DeclareDeclare $declaration + PhpParser\Node\Stmt\DeclareDeclare $declaration, ): void { if (!$declaration->value instanceof PhpParser\Node\Scalar\String_) { IssueBuffer::maybeAdd( diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php index a6004cda383..0c1bdcf0010 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php @@ -979,7 +979,7 @@ private static function handleEnumName( StatementsAnalyzer $statements_analyzer, PropertyFetch $stmt, Union $stmt_var_type, - ClassLikeStorage $class_storage + ClassLikeStorage $class_storage, ): void { $relevant_enum_cases = array_filter( $stmt_var_type->getAtomicTypes(), diff --git a/src/Psalm/Internal/Cli/Psalm.php b/src/Psalm/Internal/Cli/Psalm.php index 21285a405e4..5a2df4e477f 100644 --- a/src/Psalm/Internal/Cli/Psalm.php +++ b/src/Psalm/Internal/Cli/Psalm.php @@ -1043,7 +1043,7 @@ private static function initBaseline( Config $config, string $current_dir, ?string $path_to_config, - ?array $paths_to_check + ?array $paths_to_check, ): array { $issue_baseline = []; diff --git a/src/Psalm/Internal/Codebase/AssertionsFromInheritanceResolver.php b/src/Psalm/Internal/Codebase/AssertionsFromInheritanceResolver.php index aa42e2a8942..397633c5e19 100644 --- a/src/Psalm/Internal/Codebase/AssertionsFromInheritanceResolver.php +++ b/src/Psalm/Internal/Codebase/AssertionsFromInheritanceResolver.php @@ -22,7 +22,7 @@ final class AssertionsFromInheritanceResolver private Codebase $codebase; public function __construct( - Codebase $codebase + Codebase $codebase, ) { $this->codebase = $codebase; } @@ -32,7 +32,7 @@ public function __construct( */ public function resolve( MethodStorage $method_storage, - ClassLikeStorage $called_class + ClassLikeStorage $called_class, ): array { $method_name_lc = strtolower($method_storage->cased_name ?? ''); diff --git a/src/Psalm/Internal/Codebase/Methods.php b/src/Psalm/Internal/Codebase/Methods.php index d7df9928512..0f961f65a22 100644 --- a/src/Psalm/Internal/Codebase/Methods.php +++ b/src/Psalm/Internal/Codebase/Methods.php @@ -560,7 +560,7 @@ public function getMethodReturnType( ?string &$self_class, ?SourceAnalyzer $source_analyzer = null, ?array $args = null, - ?TemplateResult $template_result = null + ?TemplateResult $template_result = null, ): ?Union { $original_fq_class_name = $method_id->fq_class_name; $original_method_name = $method_id->method_name; diff --git a/src/Psalm/Internal/Type/SimpleAssertionReconciler.php b/src/Psalm/Internal/Type/SimpleAssertionReconciler.php index b590ef98d25..d8fb79f7044 100644 --- a/src/Psalm/Internal/Type/SimpleAssertionReconciler.php +++ b/src/Psalm/Internal/Type/SimpleAssertionReconciler.php @@ -2943,7 +2943,7 @@ private static function reconcileClassConstant( private static function reconcileValueOf( Codebase $codebase, TValueOf $assertion_type, - int &$failed_reconciliation + int &$failed_reconciliation, ): ?Union { $reconciled_types = []; diff --git a/src/Psalm/Type.php b/src/Psalm/Type.php index 01bfc03c8c1..7960ef264b6 100644 --- a/src/Psalm/Type.php +++ b/src/Psalm/Type.php @@ -263,10 +263,9 @@ public static function getNumericString(): Union /** * @psalm-suppress PossiblyUnusedMethod - * @param int|string $value * @return TLiteralString|TLiteralInt */ - public static function getLiteral($value): Atomic + public static function getLiteral(int|string $value): Atomic { if (is_int($value)) { return new TLiteralInt($value); diff --git a/src/Psalm/Type/Atomic/TCallableKeyedArray.php b/src/Psalm/Type/Atomic/TCallableKeyedArray.php index 71ca857cc97..d52681c4e6d 100644 --- a/src/Psalm/Type/Atomic/TCallableKeyedArray.php +++ b/src/Psalm/Type/Atomic/TCallableKeyedArray.php @@ -27,7 +27,7 @@ public function __construct( array $properties, ?array $class_strings = null, ?array $fallback_params = null, - bool $from_docblock = false + bool $from_docblock = false, ) { parent::__construct( $properties,