1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-05 13:10:49 +01:00

param defaults

This commit is contained in:
orklah 2021-09-26 21:09:20 +02:00
parent b65af9bf2f
commit fce60a018a
7 changed files with 7 additions and 7 deletions

View File

@ -345,7 +345,7 @@ class Analyzer
$this->progress->debug('Analyzing ' . $file_analyzer->getFilePath() . "\n");
$file_analyzer->analyze(null);
$file_analyzer->analyze();
$file_analyzer->context = null;
$file_analyzer->clearSourceBeforeDestruction();
unset($file_analyzer);

View File

@ -220,7 +220,7 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
$this->verboseLog("Initializing: Registering stub files...");
$this->clientStatus('initializing', 'registering stub files');
$codebase->config->visitStubFiles($codebase, null);
$codebase->config->visitStubFiles($codebase);
if ($this->textDocument === null) {
$this->textDocument = new TextDocument(

View File

@ -68,7 +68,7 @@ class SimpleNameResolver extends NodeVisitorAbstract
$this->nameContext->startNamespace($node->name);
} elseif ($node instanceof Stmt\Use_) {
foreach ($node->uses as $use) {
$this->addAlias($use, $node->type, null);
$this->addAlias($use, $node->type);
}
} elseif ($node instanceof Stmt\GroupUse) {
foreach ($node->uses as $use) {

View File

@ -87,7 +87,7 @@ abstract class CodeIssue
return $this->message;
}
public function toIssueData(string $severity = Config::REPORT_ERROR): \Psalm\Internal\Analyzer\IssueData
public function toIssueData(string $severity): \Psalm\Internal\Analyzer\IssueData
{
$location = $this->code_location;
$selection_bounds = $location->getSelectionBounds();

View File

@ -105,7 +105,7 @@ abstract class Report
protected function xmlEncode(string $data): string
{
return htmlspecialchars($data, ENT_XML1 | ENT_QUOTES, 'UTF-8');
return htmlspecialchars($data, ENT_XML1 | ENT_QUOTES);
}
abstract public function create(): string;

View File

@ -242,7 +242,7 @@ abstract class FunctionLikeStorage
return $this->getSignature(false);
}
public function getSignature(bool $allow_newlines = false): string
public function getSignature(bool $allow_newlines): string
{
$newlines = $allow_newlines && !empty($this->params);

View File

@ -13,7 +13,7 @@ class TEnumCase extends TNamedObject
public function __construct(string $fq_enum_name, string $case_name)
{
parent::__construct($fq_enum_name, false);
parent::__construct($fq_enum_name);
$this->case_name = $case_name;
}