1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 17:57:37 +01:00
Commit Graph

73 Commits

Author SHA1 Message Date
rarila
97e6511fab Set number of lines before and after namespace. 2021-12-15 04:58:32 +01:00
rarila
1c298c4605 Conversion of Psalm\Type 2021-12-14 02:31:22 +01:00
rarila
39402c233d
Return type hints (#7065)
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
f833085a15 Fix fqn usage in php-doc 2021-12-04 03:37:19 +01:00
ralila
30a65685a2 Import instead of using fqn classes 2021-12-03 21:40:18 +01:00
ralila
2a956498bf Import instead of using fqn functions 2021-12-03 21:07:25 +01:00
ralila
245920e53c Import instead of using fqn 2021-12-03 20:11:20 +01:00
Matthew Brown
175ba83332
Migrate most IssueBuffer::accepts calls to IssueBuffer::maybeAdd (#7020) 2021-11-29 14:54:17 -05:00
orklah
ae193ca4da replace elvis operator by coalesce operator when applicable 2021-10-13 20:16:06 +02:00
orklah
41ea541084 unset instead of reassign 2021-09-25 18:11:54 +02:00
Bruce Weirdan
6abce3525a
Enforce use sort (#5900) 2021-06-07 22:55:21 -04:00
Matthew Brown
832a190dd4
Support enums (#5699)
* Add initial enum preparation

* Support cases method

* Ignore bad use error

cc @weirdan

* Fix type
2021-05-03 17:54:09 -04:00
Matt Brown
0f5b117534 Migrate ClassLikeName options to object 2021-04-30 15:01:33 -04:00
orklah
81e557e3a8
adds statements list in the event (#4835) 2021-01-07 09:04:50 -05:00
orklah
f9fccb2b2d
implement DTO for plugins (#4881)
* implement DTO for plugins

* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
orklah
09fb141e49
Document lowercase-string when possible (#4904)
* document lowercase-string

* fix missing strtolower
2020-12-29 11:42:12 +00:00
orklah
8974da5610
preserve analyzers until the end of file (#4834)
* preserve analyzers until the end of file

* remove unused variable
2020-12-13 01:17:13 -05:00
Matt Brown
5f065d3d74 Turn template bound tuples into object
Ref #4714
2020-11-27 11:43:30 -05:00
Matt Brown
3bde327f1b Break up CommentAnalyzer 2020-11-04 23:25:08 -05:00
orklah
ceaaa39ec3
improve phpdoc (#4352) 2020-10-17 12:36:44 -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
464795d86c Fix #4309 - improve reuse of callmap callable inference 2020-10-12 13:46:43 -04:00
orklah
250fa8e42d
misc changes (#4227)
* misc changes

* misc changes
2020-09-22 00:44:31 -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
98ce590e9d Remove some redundant calls 2020-08-28 12:48:33 -04:00
Brown
efe143a396 Fix #4077 - always track closure purity 2020-08-28 12:42:55 -04:00
Bruce Weirdan
7adc25c421
Improve import errors (#3997)
* Better errors for invalid type imports

Fixes vimeo/psalm#3885

* Finishing touches

Docs, schema, CS

* Drop unused import

* Drop more unused imports
2020-08-16 22:53:53 -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
Brown
afce2dc66f Tighten up rules around instantiation a bit more 2020-08-06 10:18:55 -04:00
Brown
20a9b103ec Restrict narrowing fix 2020-08-03 02:20:58 -04:00
Matthew Brown
19ba53f28c Fix too-long line 2020-06-13 16:45:54 -04:00
Matthew Brown
edb2b4c5ef Get type of requires 2020-06-13 15:48:12 -04:00
Brown
0fc3398631 Move parsing methods into internal namespace 2020-05-13 19:12:45 -04:00
Matthew Brown
1b752d06ab Fix #3201 - add additional constraints on constructor initialisation 2020-04-21 00:04:47 -04:00
Matthew Brown
93735712f0 Fix #3032 - always replay docblock issues when analysing files 2020-03-28 19:54:55 -04:00
Matthew Brown
47c1470e3b Refactor reference checks to use more appropriate properties 2020-03-28 16:30:56 -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
bfb919d26a Break out methods into their own classes 2020-03-11 23:04:52 -04:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Brown
d8f5ad190b Improve invalidation of inherited properties 2020-02-10 17:03:51 -05:00
Matthew Brown
87fec3e6fe Fix #2505 - don’t attempt to analyse classes that weren‘t properly scanned 2019-12-31 08:04:51 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Matthew Brown
9ad6c36d9b
Conditionally verify that array offsets exist (#2147)
* Check array offsets idea

* Clean up some issues

* Add a few light fixes

* Add docs
2019-09-18 14:21:06 -04:00
Matthew Brown
2146f73782 Prepare for tracking unused suppressions
Ref #1444
2019-08-18 12:25:48 -04: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
Tyson Andre
5d5a9c6eac Remove redundant casts and unused use statements (#1955)
* Remove redundant casts

(not sure about older versions of php-parser)

* Remove unused use statements
2019-07-18 23:37:36 -04:00
Matthew Brown
9ab3161675 Fix issues found by Psalm 2019-06-29 21:13:02 -04:00