Hugo Thunnissen
f2f9e94376
Format docstring
4 weeks ago
Hugo Thunnissen
e020bb4e05
Add testcase for derived statement starting with function + fix bug
...
- Derived statements starting with functions were not resolved to a type. This
was caused by bugs in `phpinspect--get-derived-statement-type-in-block' and
`phpinspect--interpret-expression-type-in-block'. The division in each
function's functionalities was blurry and both duplicated some of each other's
logic. The situation has now been cleaned up a bit.
- An extra testcase was added for derived statements starting with a function
call
- a bunch of code that broke because of the changes was fixed
4 weeks ago
Hugo Thunnissen
81194568e3
Use match-sequence to detect "newed" objects
4 weeks ago
Hugo Thunnissen
1ab4a3b1f5
Explicitly test and implement the resolving of function call return types
4 weeks ago
Hugo Thunnissen
de248b0901
Bump version to 1.1.0
4 weeks ago
Hugo Thunnissen
f7fdac911b
Make import sort function customizable + only sort when necessary
4 weeks ago
Hugo Thunnissen
d38b28686a
Increase version number to 1.0
1 month ago
Hugo Thunnissen
95735e7b94
Add more development info to README.md
1 month ago
Hugo Thunnissen
afb9a9e4ed
Cleanup suggest-attribute scoping code
1 month ago
Hugo Thunnissen
f84327523b
prefix unused lexical argument
1 month ago
Hugo Thunnissen
c77decb3ea
fix reference to free variable
1 month ago
Hugo Thunnissen
e111df4ca9
Completion: filter out attributes that are not accessible from the current scope
1 month ago
Hugo Thunnissen
25ae878cfc
Implement indexation of functions nested within blocks/lists
...
- This fixes a bug that caused laravel helper functions not to be indexed,
unless you were to open them in a buffer (the way in which live buffers are
indexed is more sophisticated and it already indexed these functions).
1 month ago
Hugo Thunnissen
7eed1d57e9
Fix a bug in the incremental parsing of function tokens
...
Incrementally parsed functions would lose their blocks because of a faulty if
statement that was leftover from before the function body parser was added.
1 month ago
Hugo Thunnissen
2c82e844d3
Require project when resolving class property type
1 month ago
Hugo Thunnissen
855529095a
Index types used in class property initializers and combine change calls for fix-imports
1 month ago
Hugo Thunnissen
d7704c9d7c
Add test for incremental parser accuracy and fix some gnarly parser bugs
1 month ago
Hugo Thunnissen
4793b78ad5
Detect use of type for casting and try/catch exception types
1 month ago
Hugo Thunnissen
b01d5dfbc3
Add tests for aliased imports + fix bugs
1 month ago
Hugo Thunnissen
23b85fca6a
Pop variable from arg-list when indexed
1 month ago
Hugo Thunnissen
b7d493610c
Use when-let to prevent attempting to fetch nil type
1 month ago
Hugo Thunnissen
33922a6ff2
Implement parsing and indexation of @throws annotations
1 month ago
Hugo Thunnissen
6f1e11c32a
Implement indexation and resolving of @param annotation types
1 month ago
Hugo Thunnissen
5c61d4b293
Implement resolving types from typecasted statements
1 month ago
Hugo Thunnissen
8a96383407
Implement resolving variable types through inline @var annotations
1 month ago
Hugo Thunnissen
99e628847c
Wrap buffer edit logic in `save-excursion'
1 month ago
Hugo Thunnissen
e0f494feb4
s/class/namespace/
1 month ago
Hugo Thunnissen
93f5cb1f45
Remove unused lexical variables and fix invalid inline-function
1 month ago
Hugo Thunnissen
8734c9418d
Test + improve `phpinspect-fix-imports' (and parse enums as classes)
...
- `phpinspect-fix-imports' now sorts the imports alphabetically
- `phpinspect-fix-imports' removes excess trailing newlines
- "enum" keywords are now regarded like "class" keywords. (enum cases not yet
supported)
- Namespaces were added to token index
1 month ago
Hugo Thunnissen
be2f8dada5
Add test for phpinspect-fix-imports
1 month ago
Hugo Thunnissen
5032ae74ff
Resolve types of expressions nested in list tokens
...
- Resolve "(new Foo())->bar"
- Resolve "if ($foo = new Bar()) { $foo->baz"
1 month ago
Hugo Thunnissen
14c63e4187
Improve method return-type test
1 month ago
Hugo Thunnissen
58ef5e3599
Refactor use of project root to project obj injection + test and fix some bugs
...
- Test/Fix indexation of method return types
- Get rid of some technical debt (use of project-root and global variables)
- Cleanup/refactor tests
1 month ago
Hugo Thunnissen
e04ab0c118
Resolve types of suggested variable completions
1 month ago
Hugo Thunnissen
ae681a0663
Fix bug that broke stub cache
...
Empty, non-indexed classes were created by
`phpinspect-project-enqueue-if-not-present', which caused them to override any
fully indexed stub classes that might be available.
1 month ago
Hugo Thunnissen
2052c289e1
Use `phpinspect--display-format-type-name' as standardized propertized string
...
- Move `propertize' calls into `phpinspect--display-format-type-name'
- Use for completion as well as eldoc hints
1 month ago
Hugo Thunnissen
4ec4c40c9d
Add eldoc for sigil variables and allow display of multiple eldoc results
...
By allowing multiple eldoc results, displaying variable information doesn't
interfere with function parameter hints.
1 month ago
Hugo Thunnissen
2e064d52e1
Implement containing type inference for collection-like class properties
1 month ago
Hugo Thunnissen
3a0ce3ac2d
Fix another infinite recursion bug
...
Bug occured in scenario's where array-members were self-referentially assigned
in a foreach loop.
like so:
foreach($things as $thing) {
$thing = $this->something;
}
1 month ago
Hugo Thunnissen
2d93ec7f79
Fix infinite recursion bug in `phpinspect--get-pattern-type-in-block'
1 month ago
Hugo Thunnissen
93b815d71a
Index used traits (juste use of type, no actual functionality outside of that)
1 month ago
Hugo Thunnissen
130e2c06c5
Index types used in arrays
1 month ago
Hugo Thunnissen
b6eadfb799
Make autoload indexation more robust and prevent double indexation
...
Prevent the project directory from being indexed multiple times (because of
directory-files-recursively also returning "." and "..".
1 month ago
Hugo Thunnissen
f1dc699560
Detect types used with "instanceoff"
1 month ago
Hugo Thunnissen
c20f010ee4
Introduce `phpinspect-buffer-fresh-p' and `phpinspect-buffer-reparse-if-not-fresh'
...
+ use in `phpinspect-fix-imports' instead of `phpinspect-buffer-reparse'
1 month ago
Hugo Thunnissen
31c6e06934
Reparse buffer when fixing import (+ add comment explaining why)
1 month ago
Hugo Thunnissen
d141f8a6db
Infer namespace token within import manipulation loop
1 month ago
Hugo Thunnissen
8296641ba9
Implement removal of unused imports in `phpinspect-fix-imports'
1 month ago
Hugo Thunnissen
6a175c9e44
Update a few doc strings in phpinspect-index.el
1 month ago
Hugo Thunnissen
f2f1ac9b84
Add property types and anonymous function argument types to used-types index
1 month ago