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

6536 Commits

Author SHA1 Message Date
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
bcc378bd20
handle concatenation with int parts (#4938) 2021-01-06 09:01:53 -05:00
Matthew Brown
3fd47f9e10 Add comments to AtomicMethodCallAnalyzer and suppress ComplexMethod 2021-01-05 19:03:50 -05:00
Matthew Brown
0533ce61cb Break apart type combiner 2021-01-05 18:33:33 -05:00
Matthew Brown
b1028adc5a Break out large chunk to simplify function 2021-01-05 17:50:23 -05:00
Matthew Brown
13497b8d2b Break out parent and implemented class checks 2021-01-05 17:49:55 -05:00
Matthew Brown
e4b1a4fa55 Uncomment erroneously-commented return 2021-01-05 17:49:17 -05:00
Matthew Brown
630f646bd4 Break out large chunk 2021-01-05 17:47:15 -05:00
Matthew Brown
b3b2389aff Ignore recently-deleted files for scanning 2021-01-04 19:00:44 +00:00
orklah
c47230c690
Infer result of modulo 1 operation statically (#4926) 2021-01-03 16:56:04 +00:00
Lukas Bestle
2d17b744ce
SARIF report: Include help links (#4924) 2021-01-03 01:45:21 +00:00
Lukas Bestle
245a331be3
Full support for $this in @var annotations (#4922)
Fixes #4916.
2021-01-03 01:44:35 +00:00
MaximAL
d37e211eb9
Consistent curly apostrophe characters (#4918) 2020-12-31 00:59:49 +00:00
Matthew Brown
7764a4ce6c Fix #4912 - detect mismatching property type 2020-12-29 16:37:03 +00:00
Tyson Andre
00b42bf4f7
Check if included files are listed in mustBeIgnored (#4911)
Previously, when a file was included in `include()`, it was not subject
to ignoreFiles

Related to #4876
2020-12-29 14:05:17 +00:00
Matthew Brown
ddd99970a9 Fix #4901 - simplify mapping of template types within class 2020-12-29 12:24:33 +00: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
orklah
3684ceff4c
Illegal offset (#4865)
* Illegal offset access

* add tests

* fix tests
2020-12-26 10:33:49 +00:00
Matthew Brown
3390097b35 Fix #4874 - remove strok stub 2020-12-21 17:14:25 +00:00
Fran Moreno
fcd9dcb9b5
Allow by reference parameters in method docblock (#4873) 2020-12-21 17:11:34 +00:00
Bruce Weirdan
89ff4282df
Allow assertions on static class properties (#4833)
* Minimal implementation for assertions on static properties

* Added inheritance tests

* Add support for `ClassName::$var`

* Import strpos() to keep phpcs happy

* Add support for conditional assertions on static properties
2020-12-21 17:05:44 +00:00
Matt Brown
add536760f Fix phpcs 2020-12-16 12:12:26 -05:00
Matt Brown
6eae582763 Prevent mixed array offset in array creation
Fixes #4846
2020-12-16 08:18:18 -05:00
Matt Brown
c7087c150b Fix #4848 - use better inference when incorrect array keys are passed 2020-12-16 08:07:57 -05:00
Matt Brown
f9f82f1da6 Fix #4851 - use better methhod for determining incorrect stub docblocks 2020-12-16 07:31:28 -05:00
Matt Brown
05e319a6ed Fix #4827 - don’t eradicate double after int check 2020-12-14 23:08:07 -05:00
Matt Brown
4b12cd9e18 Fix #4837 - bind correct static class when checking mixin types 2020-12-14 22:51:32 -05:00
Matt Brown
e43f2259ea Fix #4839 - undefined possibly set in by-reference should be treated as such 2020-12-14 16:57:48 -05:00
Matt Brown
fbaaf05f48 Fix psl inheritance stuff cc @azjezz 2020-12-13 16:58:03 -05: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
2e3s
d8d6811ed4
Memoize private inferred mutation-free methods (#4832) 2020-12-12 10:26:14 -05:00
Matt Brown
cc1c643168 Fix #4829 – don’t crash when yielding non-existent class 2020-12-11 10:04:28 -05:00
Matt Brown
a27c674cee Add test for #4825 2020-12-10 13:51:49 -05:00
Matt Brown
8cae4047b0 Fix #4825 - check for finally var set 2020-12-10 11:48:43 -05:00
Matt Brown
2a92025737 Union types if stmt already has one 2020-12-10 01:40:20 -05:00
Matt Brown
b7a7e2fb87 Fix get magic property checks 2020-12-10 01:29:07 -05:00
Matt Brown
37659445f0 Improve accuracy of optional example 2020-12-10 01:12:58 -05:00
Matt Brown
e6dad6e65f Be smarter when choosing inherited param types
Ref #4803
2020-12-10 00:15:37 -05:00
Matt Brown
beefa2aea3 Fix #4817 - allow optional inference 2020-12-09 19:32:56 -05:00
Matt Brown
5e845260c1 Remove unnecessary null check 2020-12-09 18:30:36 -05:00
Matt Brown
9423324d65 Fix #4791 - only generate special has-array-key assertions for unknown key types 2020-12-08 19:45:47 -05:00
Matt Brown
524084a64c Tighten up rules arouund when mutation-free methods get memoised 2020-12-08 16:39:06 -05:00
Matt Brown
be3f30ff1d Fix #4812 - reconcile array assertion on template as type correctly 2020-12-08 14:17:37 -05:00
Matt Brown
1e0bcc1876 Fix #4803 - always derive method params the same way 2020-12-08 11:27:51 -05:00
Matt Brown
387ab14bda Use better stubs for Serializable and SoapClient 2020-12-08 11:27:51 -05:00
2e3s
e46c68b1e5
Overwrite memoized return type after sum-type candidate is calculated (#4805)
* Overwrite memoized return type after sum-type candidate is calculated

* Fix mismatched types

* Fix code style
2020-12-08 09:35:11 -05:00
Matt Brown
91ee4aeca3 Fix #4797 - sanitise assertion output of template result 2020-12-07 19:11:56 -05:00
Matt Brown
8a76a43d8c Fix #4798 - improve conversion from type back to PhpParser node 2020-12-07 14:39:58 -05:00
Matt Brown
f5dd6e76f8 Fix #4802 - don’t clone context when analysing coalesce 2020-12-07 14:30:57 -05:00