Bruce Weirdan
105c6f3a1c
Remove (and prevent) unused uses ( #5704 )
...
* Updates `slevomat/coding-standard`
* Removes unused uses
* Prevents unused uses
* Fixes a number of symbol case mismatches
2021-05-03 17:22:15 -04:00
orklah
1d9987e0ed
fix phpdoc ( #4905 )
2020-12-29 11:42:41 +00:00
orklah
09fb141e49
Document lowercase-string when possible ( #4904 )
...
* document lowercase-string
* fix missing strtolower
2020-12-29 11:42:12 +00:00
Matt Brown
4aef96bbac
Use lists everywhere for args
2020-10-28 12:45:26 -04:00
orklah
ffe7874906
Misc improvements ( #4314 )
...
* extract the operation out of the loop when possible
* remove unnecessary interfaces when already inherited in parent
* simplify expressions
* avoid using alias functions
* redundant phpdoc
* unused imports
2020-10-15 13:23:35 -04:00
orklah
10f2966dcb
return types ( #4311 )
...
* return types
* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Matt Brown
ea47548dd0
4.x - Prevent AfterFunctionCallAnalysisInterface from rewriting return types
2020-10-04 23:39:20 -04:00
orklah
da47588f91
replace return;
by return null;
in every non-void method, add return null;
when mising, add return types, remove redundant phpdoc ( #4176 )
2020-09-13 16:39:06 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types ( #4137 )
...
* add native param types
* redundant phpdoc
* add more param types and adds "?" to nullable types
* remove redundant phpdoc
* add more param types and remove redundant phpdoc
* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
5905171b79
Fix api
2020-08-31 16:40:46 -04:00
Brown
64f08fa9dc
Improve Closure::fromCallable handling
2020-08-29 22:02:58 -04:00
Brown
966a3522ff
Move words
2020-08-11 14:36:59 -04:00
feek
7fe7146dc3
docs: provide some background as to what certain hooks are for ( #3978 )
2020-08-11 07:29:45 -04:00
lhchavez
ab3016af6e
Fix File-related analysis plugin hooks ( #3970 )
...
This change does a few things:
* Renames `BeforeAnalyzeFileInterface` to `BeforeFileAnalysisInterface`.
* Adds a few more parameters to `BeforeFileAnalysisInterface`.
* Since the analysis was never called due to a bug, the above two
changes are safe to do.
* Fix the above-mentioned bug, and now adds the hooks to the config.
* Update the documentation about the File-related analysis plugin hooks.
* Add a test to ensure that this does not break again in the future.
Fixes : #3969
2020-08-10 10:49:53 -04:00
feek
d60ece752c
chore: mark as lowercase string ( #3392 )
2020-05-18 16:02:46 -04:00
Brown
111303d913
Add non-empty-lowercase-string type
2020-05-15 10:18:05 -04:00
feek
7dd1823c4c
fix: code location is nullable ( #3334 )
2020-05-10 21:12:10 -04:00
orklah
8571746f8a
Add hook for plugins after FunctionLikeAnalysis ( #3258 )
2020-04-28 15:30:51 -04:00
Matthew Brown
196a0a5c4e
Replace issue data array with object
2020-02-16 18:24:40 -05:00
Philip Hofstetter
395cf587d3
add plugin hook to be called after every function call
...
compared to AfterFunctionCallAnalysisInterface which gets only called
after a call to a function declared within the project, a plugin
implementing AfterEveryFunctionCallAnalysisInterface will get called for
every function call, including calls of PHP builtins.
On the other hand, this interface doesn't allow modification of the code
nor tweaking the return type, but it's still useful for accounting
purposes and for depreacting calls to PHP builtins
this fixes #2804
2020-02-13 09:10:24 -05:00
Matthew Brown
8202af957d
Index issues by file to reduce some lookups
2020-01-21 21:07:44 -05:00
Bruce Weirdan
ede1076039
Dropped unused use ( #2495 )
2019-12-21 00:58:05 +00:00
Bruce Weirdan
7e8268fe94
Drop non-existent param from docblock ( #2492 )
...
I wonder why psalm didn't catch it.
2019-12-21 00:14:22 +00:00
Tyson Andre
ce03be2dc0
Add BeforeAnalyzeFileInterface ( #2034 )
...
This is a prerequisite of the plugin I mentioned in #378
This may be useful for other types of plugins
(e.g. checking raw file contents or file names)
2019-08-18 10:40:07 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
a1eb191f57
Remove TSqlSelectString and related dependency
2019-05-20 23:14:41 -04:00
Matthew Brown
9d4ebe6b6b
Add plugin hook for post-analysis stuff
2019-03-23 12:47:46 -04:00
Brown
85f34f2aca
Add defining class and increas string length
2019-03-12 12:58:04 -04:00
Brown
5beb26659e
Add special type for SQL select strings for plugins to consume
2019-03-07 14:56:18 -05:00
Tyson Andre
6f7295ed13
Remove unused use statements
2019-03-03 22:22:36 -05:00
Matthew Brown
317f790bde
New plugin hooks ( #1405 )
...
* Add a bunch of new hooks
* Add more integrations
* Add some broken tests
* Add more things
* Fix remaining interfaces
* Suppress proper issue
* UndefinedMethod should not stop analysis
* Add handlers for two custom method return types
2019-03-01 08:57:10 -05:00
Brown
815bf845dc
Improve handling of method/function return types
2019-02-27 17:06:44 -05:00
Bruce Weirdan
24a71be425
Added Hook\AfterCodebasePopulatedInterface
2019-02-26 01:16:22 -05:00
Bruce Weirdan
8408effe57
Dropped unused uses
2019-02-17 13:17:45 -05:00
Matthew Brown
2ef82d785f
Improve signature of FunctionReturnTypeProvider to omit internal things
2019-02-16 15:29:54 -05:00
Matthew Brown
0739d017ac
Use information from .phpstorm.meta.php files in stubs
2019-02-16 11:16:52 -05:00
Matthew Brown
d76459e138
Move to a PHPStan-like return type provider class model
2019-02-15 18:00:40 -05:00
Matthew Brown
6e585008f2
Fix #1183 - add hook for class analysis
2019-01-09 08:28:12 -05:00
Matthew Brown
1f3fab4cad
Make sure method call return type is passed by ref
2018-11-22 00:40:22 -05:00
Brown
06974221df
Change DependencyFinderVisitor name to ReflectorVisitor and update docs
2018-11-13 14:09:43 -05:00
Brown
0254322bed
Migrate Codebase-namespaced and FileManipulation-namespaced classes to internals
2018-11-12 11:20:59 -05:00
Bruce Weirdan
a338e76ef6
Plugin interface segregation ( #1076 )
...
* Split Plugin into PluginApi\Hook\* interfaces
* dropped Psalm\Plugin
* updated docs
* s/PluginApi/Plugin/g
2018-11-12 11:20:59 -05:00