1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 17:57:37 +01:00
psalm/src/Psalm/Internal/Analyzer/SourceAnalyzer.php
orklah 8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00

195 lines
3.9 KiB
PHP

<?php
namespace Psalm\Internal\Analyzer;
use Psalm\Aliases;
use Psalm\Codebase;
use Psalm\StatementsSource;
use Psalm\Type;
/**
* @internal
*/
abstract class SourceAnalyzer implements StatementsSource
{
/**
* @var SourceAnalyzer
*/
protected $source;
public function __destruct()
{
$this->source = null;
}
public function getAliases(): Aliases
{
return $this->source->getAliases();
}
/**
* @return array<string, string>
*/
public function getAliasedClassesFlipped(): array
{
return $this->source->getAliasedClassesFlipped();
}
/**
* @return array<string, string>
*/
public function getAliasedClassesFlippedReplaceable(): array
{
return $this->source->getAliasedClassesFlippedReplaceable();
}
public function getFQCLN(): ?string
{
return $this->source->getFQCLN();
}
public function getClassName(): ?string
{
return $this->source->getClassName();
}
public function getParentFQCLN(): ?string
{
return $this->source->getParentFQCLN();
}
public function getFileName(): string
{
return $this->source->getFileName();
}
public function getFilePath(): string
{
return $this->source->getFilePath();
}
/**
* @return string
*/
public function getRootFileName()
{
return $this->source->getRootFileName();
}
/**
* @return string
*/
public function getRootFilePath()
{
return $this->source->getRootFilePath();
}
/**
* @return void
*/
public function setRootFilePath(string $file_path, string $file_name)
{
$this->source->setRootFilePath($file_path, $file_name);
}
public function hasParentFilePath(string $file_path): bool
{
return $this->source->hasParentFilePath($file_path);
}
public function hasAlreadyRequiredFilePath(string $file_path): bool
{
return $this->source->hasAlreadyRequiredFilePath($file_path);
}
public function getRequireNesting(): int
{
return $this->source->getRequireNesting();
}
/**
* @psalm-mutation-free
* @return StatementsSource
*/
public function getSource()
{
return $this->source;
}
/**
* Get a list of suppressed issues
*
* @return array<string>
*/
public function getSuppressedIssues(): array
{
return $this->source->getSuppressedIssues();
}
/**
* @param array<int, string> $new_issues
*
* @return void
*/
public function addSuppressedIssues(array $new_issues)
{
$this->source->addSuppressedIssues($new_issues);
}
/**
* @param array<int, string> $new_issues
*
* @return void
*/
public function removeSuppressedIssues(array $new_issues)
{
$this->source->removeSuppressedIssues($new_issues);
}
public function getNamespace(): ?string
{
return $this->source->getNamespace();
}
public function isStatic(): bool
{
return $this->source->isStatic();
}
/**
* @psalm-mutation-free
*/
public function getCodebase() : Codebase
{
return $this->source->getCodebase();
}
/**
* @psalm-mutation-free
*/
public function getProjectAnalyzer() : ProjectAnalyzer
{
return $this->source->getProjectAnalyzer();
}
/**
* @psalm-mutation-free
*/
public function getFileAnalyzer() : FileAnalyzer
{
return $this->source->getFileAnalyzer();
}
/**
* @return array<string, array<string, array{Type\Union}>>|null
*/
public function getTemplateTypeMap(): ?array
{
return $this->source->getTemplateTypeMap();
}
public function getNodeTypeProvider() : \Psalm\NodeTypeProvider
{
return $this->source->getNodeTypeProvider();
}
}