Closed ghost closed 9 years ago
extends
it shows only classes, no Interfaces.class MyClass {
public function __g ( shows =>
__get()
__toString()
)
so get (and set) are already working!
Ok, confirmed get, set are working, just previous it's indexing project so not shows.
hey @ptcong, I implemented completions for Interfaces (v1.0.4). Now if you are
class MyClass implements ArrayAccess
{
public function [here]
}
it will show you all functions of ArrayAccess
and complete with arguments!
If you could play around with it and give me feedback on how to improve, fantastic!
Hope to hear from you soon!
Ok, i got it, but is there anyway to click to ArrayAccess and choose option implements all methods ? It is faster if the implemented class have many methods.
And is the feature works on project ?, i mean project have interfaces, abstract class.
so, here it is, v1.0.5! If you now have this code and you are
abstract class AbstractClass
{
abstract protected function method1();
abstract protected function method2($arg);
}
class MyClass extends AbstractClass implements ArrayAccess
{
[here]
}
and you call for completions with ctrl+shift+space
(or whatever your key-binding is), it will show you
ArrayAccess (inherited)
AbstractClass (inherited)
which will give you completions for all methods. I am not sure if 'inherited' is technically correct here but it's close enough for now ;)
Please be sure to give feedback, is this working in your projects as well?
all the best!
Thax u, then when it available on packagecontrol.io ?
I published it right now. I have no control over PackageControl inner update cycle, so I don't know when exactly you will receive your update, but it never took longer than 6 hours for me!
I just downloaded from git, it's amazing~ :dancer: But have you written block comment for methods of ArrayAccess ?
And could you implement the interfaces to http://php.net/manual/en/spl.misc.php
@wizza-smile The feature seem ok, but it missing arguments type hint. Eg:
abstract class AbstractClass
{
abstract protected function method1();
abstract protected function method2(ClassName $arg);
}
class MyClass extends AbstractClass implements ArrayAccess
{
[here]
}
When i request implements AbstractClass, it complete
/** dockblocks **/
protected function method1();
/** dockblocks **/
protected function method2($arg);
It should be
/** dockblocks **/
protected function method1();
/** dockblocks **/
protected function method2(ClassName $arg);
Missing ClassName
in method2. Could you resolve it ?
I just pushed a commit that should resolve this issue!
i just downloaded and overrides to ST/Packages/CodeComplice but nothing happend
Is this working for you now?
yes, works fine man
:+1:
Hi