Skip to content

[WR] Could not resolve ExpressionStatement #96

Closed

Description

@dantleech
[2017-08-05T09:23:47.519573+02:00] phpactor.WARNING: Did not know how to resolve node of type "Microsoft\PhpParser\Node\Statement\ExpressionStatement" with text "$locator = $this->serviceLocator;" [] []
<?php

namespace Phpactor\WorseReflection\Reflection;

use Phpactor\WorseReflection\Reflector;
use Microsoft\PhpParser\Node\ClassConstDeclaration;
use Microsoft\PhpParser\Node\ConstElement;
use Microsoft\PhpParser\Node;
use Phpactor\WorseReflection\Type;
use Phpactor\WorseReflection\ServiceLocator;

final class ReflectionConstant extends AbstractReflectedNode
{
    /**
     * @var ServiceLocator
     */
    private $serviceLocator;

    /**
     * @var ConstElement
     */
    private $node;

    public function __construct(
        ServiceLocator $serviceLocator,
        ConstElement $node
    )
    {
        $this->serviceLocator = $serviceLocator;
        $this->node = $node;
    }

    public function name()
    {
        return $this->node->getName();
    }

    public function type(): Type
    {
        $locator = $this->serviceLocator;
        return Type::unknown();
    }

    protected function node(): Node
    {
        return $this->node;
    }
}

Activity

  1. dantleech commented on Aug 7, 2017

    @dantleech
    CollaboratorAuthor

    Happens on the semi-colon....

  2. dantleech commented on Aug 12, 2017

    @dantleech
    CollaboratorAuthor

    We don't care about this I think.

  3. added 2 commits that reference this issue on Jan 10, 2021
  4. added a commit that references this issue on Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions