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
orklah
73f6fcde48
Short list syntax ( #4102 )
...
* Short list syntax
* revert unrelated CS
2020-09-02 00:17:41 -04:00
Brown
5905171b79
Fix api
2020-08-31 16:40:46 -04:00
Brown
3687d34a5a
Detect bad class constants more explicitly
2020-07-24 15:38:56 -04:00
Barney Laurance
ff432ff73d
Simplify error messages and implementation for internal errors ( #3881 )
...
* Use more consistent language for Internal errors
There's no meaningful distinction between something being internal and
being 'marked as internal'.
* Rename property psalm_internal to internal in all storage classes
This property holds metadata that can be set using either @internal
or @psalm-internal in docblocks
* Change types of internal properties in storage from ?string to string
Simpler type is easier to handle. Non-internal methods can be considered
to be internal to the entire universe of PHP code, i.e. that code whose
namespace starts with the empty string. It's not a special case.
2020-07-24 09:32:54 -04:00
Barney Laurance
3bc91b9944
Fix multiple issues with @internal and @psalm-internal ( #3841 )
...
* Add passing tests for property fetch on an @internal class
I'm trying to work out why the equivilent InvalidCodeParse test is
failing for PsalmInternal
* Treat all properties of a psalm-internal class as psalm-internal
* Remove all $internal properties from storage - use psalm_internal instead
@internal can be represented as internal to the namespace root, avoiding
the need to check for both properties in storage later.
* Raise InternalClass issue when an internal class is used with e.g. instanceOf
* fix docs and tests
* Add return type declartion to code example in doc
* Don't allow class psalm-internal to overide a tighter method psalm-internal
* Break up long line
* Code style - move && from EOL to SOL
* Restore misplaced &&
* Fix code style
* Fix namespace fetching so it works
Co-authored-by: Matthew Brown <github@muglug.com>
2020-07-22 19:27:35 -04:00
Brown
2d4381eb4e
Fix #3096 - forget clauses in context after call
2020-04-08 01:03:37 -04:00
Brown
971ae50bea
Do prep work for #3024 - improve handling of absent class references
2020-03-26 12:35:27 -04:00
Matthew Brown
43189b3d55
Allow types to be traversed
2020-03-14 23:54:51 -04:00
Matthew Brown
c0c878cc9d
Don’t cache all traits
2020-03-02 22:27:54 -05:00
Matthew Brown
653353709a
Use MethodIdentifier object instead of string
2020-02-14 20:54:26 -05:00
Matthew Brown
07a53f6b81
Fix #2789 - Numeric should not be a reserved class name
2020-02-11 22:34:34 -05:00
Brown
f141f7c526
Improve --diff checks by including trait-using classes in dependents
2020-02-11 16:39:33 -05:00
Matthew Brown
da541dbb51
Remove some unnecessary errors
2020-02-06 23:10:18 -05:00
Matthew Brown
7f093ca8ed
Fix #2626 - allow assertions on resource types
...
Also fixes #2266
2020-01-17 11:55:16 -05:00
Matthew Brown
f48ecda295
Fix ref
2020-01-05 18:53:24 -05:00
Brown
0bcb7863f3
Use better system for storing inferred types and assertions
2019-11-25 11:44:54 -05:00
Matthew Brown
781e711243
Allow use of namespaced Resource class
...
Ref #2052
2019-08-26 00:08:18 -04:00
Matthew Brown
c5f62d261d
Remove redundant @psalm-suppress in Psalm’s codebsae
2019-08-18 16:10:12 -04:00
Matthew Brown
6b7788b502
Fix FileAnalyzer memory leak
2019-06-29 21:06:21 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Matthew Brown
7fc11af49e
Fix docblocks with @andrew-demb’s suggestions
2019-06-16 09:12:32 -04:00
Matthew Brown
4fc5d1d5c8
Rewrite use statements
2019-06-05 22:13:33 -04:00
Matthew Brown
cc89b9254d
Add initial ideas for moving static methods
...
Ref #1595
2019-06-01 00:56:54 -04:00
Brown
a060da95bf
Allow MissingParamType alteration to be done in multithreaded mode
2019-05-31 11:55:24 -04:00
Matthew Brown
cd969c51e5
Generate missing param types from callers
...
Fixes #1707
2019-05-31 01:47:35 -04:00
Brown
4a434d9a2f
Add separate issue for undefined classes in docblocks
2019-05-15 18:41:26 -04:00
Matthew Brown
d68e501bfa
Fix #1528 - double check for missing dependency
2019-04-21 11:30:50 -04:00
Matthew Brown
d145f17782
Fix #1548 - allow parallel execution with --find-dead-code
2019-04-13 15:38:09 -04:00
Brown
26e2de93c7
Prepare to enable paralellised use of --find-dead-code
...
References #1548
2019-04-12 18:28:07 -04:00
Matthew Brown
bd6fea0d57
Fix #1514 - catch static interface call
2019-03-28 08:22:44 -04:00
Brown
b9ba24929d
Refactor storage of template names to prevent clashes
2019-03-22 15:59:10 -04:00
Matthew Brown
ab832207a4
Fix #1453 - traits are not valid classes
2019-03-15 22:12:35 -04: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
bugreportuser
f603449745
Infer literal string for __namespace__
2019-02-20 10:55:36 -05:00
Bruce Weirdan
8408effe57
Dropped unused uses
2019-02-17 13:17:45 -05:00
Brown
b8d822cd26
Prohibit leaking of template params across class boundaries
2019-01-10 12:13:49 -05:00
Matthew Brown
3a405f4951
Remove public from const
2019-01-05 16:34:09 -05:00
Matthew Brown
c7723df8ff
Allow gettype vars to be compared to strings
2019-01-05 16:23:18 -05:00
Matthew Brown
ca6149ed17
Improve treatment of templated params within function analysis
2018-12-17 23:29:27 -05:00
Matthew Brown
b32000fa05
Fix #689 - add checks for @internal annotations
2018-12-01 18:37:49 -05:00
Matthew Brown
26947888f6
Add some basic support for class_alias
2018-11-29 00:05:56 -05:00
Matthew Brown
37dedee7b6
Fix memory leak issues and disable garbage collection
2018-11-18 11:39:14 -05:00
Brown
0254322bed
Migrate Codebase-namespaced and FileManipulation-namespaced classes to internals
2018-11-12 11:20:59 -05:00
Matthew Brown
9709263b8d
Make many PropertyAnalyzer properties private
2018-11-12 11:20:59 -05:00
Matthew Brown
4d79b61e93
Change _checker to _analyzer
2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00