Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong class function insertion #22

Open
f1e opened this issue Jul 15, 2019 · 0 comments
Open

Wrong class function insertion #22

f1e opened this issue Jul 15, 2019 · 0 comments

Comments

@f1e
Copy link

f1e commented Jul 15, 2019

If a file contains several classes, insertion goes to wrong class.
What i did:
create file with following code:

<?php

class Foo
{
    private $a;
}

class Bar
{
    private $b;
}

put cursor on private $a and run insert PHP setter
What i expected:
class Foo to have setter function for private $a

<?php

class Foo
{
    private $a;

    /**
     * Set the value of a
     *
     * @return  self
     */ 
    public function setA($a)
    {
        $this->a = $a;

        return $this;
    }
}

class Bar
{
    private $b;
}

What i get instead:
class Bar got setter for private $a

<?php

class Foo
{
    private $a;
}

class Bar
{
    private $b;

    /**
     * Set the value of a
     *
     * @return  self
     */ 
    public function setA($a)
    {
        $this->a = $a;

        return $this;
    }
}

checked on win10
vscode 1.36.1
extension version: 1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant