Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Autocomplete multiple lines #287

Closed pablopunk closed 7 years ago

pablopunk commented 8 years ago

So I have a block of code like this in Symfony/Doctrine:

$queryBuilder = $this->cyclesRepository->createQueryBuilder('c')
                ->addSelect($args)
                ->addSelect($args)
                ->leftJoin($args)
                ->leftJoin($args, Join::INNER_JOIN)
                ->leftJoin($args)
                ->leftJoin($args, Join::INNER_JOIN)
                ->where($args)
                ->orderBy($args)
                ->groupBy($args);

and when I type -> I get autocomplete for the functions of the QueryBuilder:

screen shot 2016-09-08 at 5 04 26 pm

But if the function leftJoin() takes the argument Join::INNER_JOIN the following lines of the block lose the autocomplete feature:

screen shot 2016-09-08 at 5 05 14 pm

Also, the constant Join::INNER_JOIN it's not being autocompleted (like it's not recognized) so I guess that could be triggering the error, cause if I pass some other argument like leftJoin($a, $b) it is working.