mirror of
https://github.com/danog/psalm.git
synced 2024-12-12 01:09:38 +01:00
dead code
This commit is contained in:
parent
ae1afd90c6
commit
a85cba3973
@ -580,22 +580,17 @@ abstract class ClassLikeAnalyzer extends SourceAnalyzer
|
||||
return $emit_issues ? null : true;
|
||||
|
||||
case self::VISIBILITY_PRIVATE:
|
||||
if (!$context->self || $appearing_property_class !== $context->self) {
|
||||
if ($emit_issues && IssueBuffer::accepts(
|
||||
new InaccessibleProperty(
|
||||
'Cannot access private property ' . $property_id . ' from context ' . $context->self,
|
||||
$code_location
|
||||
),
|
||||
$suppressed_issues
|
||||
)) {
|
||||
// fall through
|
||||
}
|
||||
|
||||
return null;
|
||||
if ($emit_issues && IssueBuffer::accepts(
|
||||
new InaccessibleProperty(
|
||||
'Cannot access private property ' . $property_id . ' from context ' . $context->self,
|
||||
$code_location
|
||||
),
|
||||
$suppressed_issues
|
||||
)) {
|
||||
// fall through
|
||||
}
|
||||
|
||||
return $emit_issues ? null : true;
|
||||
|
||||
return null;
|
||||
case self::VISIBILITY_PROTECTED:
|
||||
if (!$context->self) {
|
||||
if ($emit_issues && IssueBuffer::accepts(
|
||||
|
@ -126,17 +126,12 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements FileSour
|
||||
{
|
||||
foreach ($node->getComments() as $comment) {
|
||||
if ($comment instanceof PhpParser\Comment\Doc && !$node instanceof PhpParser\Node\Stmt\ClassLike) {
|
||||
$self_fqcln = $node instanceof PhpParser\Node\Stmt\ClassLike
|
||||
&& $node->name !== null
|
||||
? ($this->aliases->namespace ? $this->aliases->namespace . '\\' : '') . $node->name->name
|
||||
: null;
|
||||
|
||||
try {
|
||||
$type_aliases = Reflector\ClassLikeNodeScanner::getTypeAliasesFromComment(
|
||||
$comment,
|
||||
$this->aliases,
|
||||
$this->type_aliases,
|
||||
$self_fqcln
|
||||
null
|
||||
);
|
||||
|
||||
foreach ($type_aliases as $type_alias) {
|
||||
|
Loading…
Reference in New Issue
Block a user