mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix unused imports in psalm, wrong param order doc comments (#523)
(Some of the imports appear as strings elsewhere in the same file)
This commit is contained in:
parent
61b13b68cf
commit
aea3779c96
@ -9,7 +9,6 @@ use Psalm\Context;
|
||||
use Psalm\Issue\DeprecatedClass;
|
||||
use Psalm\Issue\DeprecatedInterface;
|
||||
use Psalm\Issue\InaccessibleMethod;
|
||||
use Psalm\Issue\InvalidReturnType;
|
||||
use Psalm\Issue\MissingConstructor;
|
||||
use Psalm\Issue\MissingPropertyType;
|
||||
use Psalm\Issue\PropertyNotSetInConstructor;
|
||||
|
@ -73,9 +73,9 @@ class FileChecker extends SourceChecker implements StatementsSource
|
||||
public $project_checker;
|
||||
|
||||
/**
|
||||
* @param ProjectChecker $project_checker
|
||||
* @param string $file_path
|
||||
* @param string $file_name
|
||||
* @param ProjectChecker $project_checker
|
||||
*/
|
||||
public function __construct(ProjectChecker $project_checker, $file_path, $file_name)
|
||||
{
|
||||
|
@ -4,7 +4,6 @@ namespace Psalm\Checker;
|
||||
use Psalm\Codebase;
|
||||
use Psalm\Config;
|
||||
use Psalm\Context;
|
||||
use Psalm\Issue\PossiblyUnusedMethod;
|
||||
use Psalm\Provider\ClassLikeStorageProvider;
|
||||
use Psalm\Provider\FileProvider;
|
||||
use Psalm\Provider\FileReferenceProvider;
|
||||
|
@ -170,7 +170,7 @@ class TryChecker
|
||||
|
||||
$catch_var_id = '$' . $catch->var;
|
||||
|
||||
$catch_context->vars_in_scope[$catch_var_id] = new Type\Union(
|
||||
$catch_context->vars_in_scope[$catch_var_id] = new Union(
|
||||
array_map(
|
||||
/**
|
||||
* @param string $fq_catch_class
|
||||
|
@ -10,7 +10,6 @@ use Psalm\Checker\Statements\ExpressionChecker;
|
||||
use Psalm\Checker\StatementsChecker;
|
||||
use Psalm\Codebase\CallMap;
|
||||
use Psalm\CodeLocation;
|
||||
use Psalm\Config;
|
||||
use Psalm\Context;
|
||||
use Psalm\Issue\ForbiddenCode;
|
||||
use Psalm\Issue\InvalidFunctionCall;
|
||||
|
@ -140,8 +140,8 @@ class ArrayFetchChecker
|
||||
/**
|
||||
* @param Type\Union $array_type
|
||||
* @param Type\Union $offset_type
|
||||
* @param null|string $array_var_id
|
||||
* @param bool $in_assignment
|
||||
* @param null|string $array_var_id
|
||||
* @param bool $inside_isset
|
||||
*
|
||||
* @return Type\Union
|
||||
|
@ -501,8 +501,8 @@ class ExpressionChecker
|
||||
* @param StatementsChecker $statements_checker
|
||||
* @param PhpParser\Node\Expr $stmt
|
||||
* @param Type\Union $by_ref_type
|
||||
* @param bool $constrain_type
|
||||
* @param Context $context
|
||||
* @param bool $constrain_type
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -254,9 +254,9 @@ class TypeChecker
|
||||
/**
|
||||
* Does the input param atomic type match the given param atomic type
|
||||
*
|
||||
* @param Codebase $codebase
|
||||
* @param Type\Atomic $input_type_part
|
||||
* @param Type\Atomic $container_type_part
|
||||
* @param Codebase $codebase
|
||||
* @param bool &$has_scalar_match
|
||||
* @param bool &$type_coerced whether or not there was type coercion involved
|
||||
* @param bool &$type_coerced_from_mixed
|
||||
|
@ -69,8 +69,8 @@ class CodeLocation
|
||||
|
||||
/**
|
||||
* @param bool $single_line
|
||||
* @param null|int $regex_type
|
||||
* @param null|CodeLocation $previous_location
|
||||
* @param null|int $regex_type
|
||||
* @param null|string $selected_text
|
||||
*/
|
||||
public function __construct(
|
||||
|
@ -121,7 +121,6 @@ class Codebase
|
||||
public $populator;
|
||||
|
||||
/**
|
||||
* @param bool $collect_references
|
||||
* @param bool $debug_output
|
||||
*/
|
||||
public function __construct(
|
||||
|
@ -85,7 +85,6 @@ class Analyzer
|
||||
/**
|
||||
* @param string $file_path
|
||||
* @param array<string, string> $filetype_checkers
|
||||
* @param bool $will_analyze
|
||||
*
|
||||
* @return FileChecker
|
||||
*
|
||||
|
@ -778,8 +778,6 @@ class Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ProjectChecker $project_checker
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function visitStubFiles(Codebase $codebase)
|
||||
|
@ -12,8 +12,8 @@ class ErrorLevelFileFilter extends FileFilter
|
||||
|
||||
/**
|
||||
* @param SimpleXMLElement $e
|
||||
* @param bool $inclusive
|
||||
* @param string $base_dir
|
||||
* @param bool $inclusive
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace Psalm\Config;
|
||||
|
||||
use Psalm\Config;
|
||||
use SimpleXMLElement;
|
||||
|
||||
class FileFilter
|
||||
|
@ -86,7 +86,6 @@ abstract class Plugin
|
||||
|
||||
/**
|
||||
* @param string $method_id - the method id being checked
|
||||
* @param string $appearing_method_id - the method id of the class that contains the method
|
||||
* @param string $declaring_method_id - the method id of the class or trait that declares the method
|
||||
* @param PhpParser\Node\Arg[] $args
|
||||
* @param FileManipulation[] $file_replacements
|
||||
|
@ -6,9 +6,9 @@ use PhpParser;
|
||||
class NoParserCacheProvider extends \Psalm\Provider\ParserCacheProvider
|
||||
{
|
||||
/**
|
||||
* @param int $file_modified_time
|
||||
* @param string $file_content_hash
|
||||
* @param string $file_cache_key
|
||||
* @param mixed $file_modified_time
|
||||
*
|
||||
* @return array<int, PhpParser\Node\Stmt>|null
|
||||
*/
|
||||
|
@ -26,9 +26,9 @@ class ParserCacheProvider
|
||||
public $use_igbinary = false;
|
||||
|
||||
/**
|
||||
* @param int $file_modified_time
|
||||
* @param string $file_content_hash
|
||||
* @param string $file_cache_key
|
||||
* @param mixed $file_modified_time
|
||||
*
|
||||
* @return array<int, PhpParser\Node\Stmt>|null
|
||||
*
|
||||
|
@ -9,7 +9,6 @@ use Psalm\IssueBuffer;
|
||||
use Psalm\StatementsSource;
|
||||
use Psalm\Type;
|
||||
use Psalm\Type\Atomic\ObjectLike;
|
||||
use Psalm\Type\Atomic\Scalar;
|
||||
use Psalm\Type\Atomic\TArray;
|
||||
use Psalm\Type\Atomic\TBool;
|
||||
use Psalm\Type\Atomic\TCallable;
|
||||
|
@ -905,9 +905,9 @@ class Reconciler
|
||||
/**
|
||||
* Gets the type for a given (non-existent key) based on the passed keys
|
||||
*
|
||||
* @param ProjectChecker $project_checker
|
||||
* @param string $key
|
||||
* @param array<string,Type\Union> $existing_keys
|
||||
* @param ProjectChecker $project_checker
|
||||
*
|
||||
* @return Type\Union|null
|
||||
*/
|
||||
|
@ -1019,8 +1019,8 @@ class DependencyFinderVisitor extends PhpParser\NodeVisitorAbstract implements P
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, array{type:string,name:string,line_number:int}> $docblock_params
|
||||
* @param FunctionLikeStorage $storage
|
||||
* @param array<int, array{type:string,name:string,line_number:int}> $docblock_params
|
||||
* @param PhpParser\Node\FunctionLike $function
|
||||
*
|
||||
* @return void
|
||||
|
Loading…
Reference in New Issue
Block a user