1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00
Commit Graph

91 Commits

Author SHA1 Message Date
Matthew Brown
b3f6b56f9c Add support for @psalm-readonly-allow-private-mutation 2020-02-02 15:56:08 -05:00
Matthew Brown
93fc1b1cc7 Fix #2729 - allow mutation of otherwise-readonly properties 2020-02-02 15:35:12 -05:00
Matthew Brown
d5d4a1826d Add initial support for @mixin Foo 2020-01-02 23:50:19 -05:00
Matthew Brown
508c2e268a Process phpstan-template in class docblocks 2019-12-29 16:08:09 -05:00
Matthew Brown
1b54d058aa Fix #2488 - add support for @phpstan- annotations 2019-12-20 10:49:10 +00:00
Matthew Brown
15cd62d332 Fix #2484 - add support for spaces in assert-if-true types 2019-12-19 19:24:26 +00:00
Brown
2f9b1ff665 Fix too-long line 2019-12-11 11:40:47 -05:00
Brown
e564d67214 Add support for simple default arrays in @method docblocks
Fixes #2455
2019-12-11 11:29:00 -05:00
Matthew Brown
d6a731be73 Fix #2441 - add error when @template type is missing 2019-12-08 21:19:29 -05:00
Matthew Brown
baef67e0d8 Fix evaluation order of covariant template params before invariant ones 2019-11-30 01:02:23 -05:00
Brown
78a3894403 Fix Psalm errors 2019-11-21 11:03:18 -05:00
Brown
b29227aaf6 Allow taints to be removed via annotation 2019-10-15 16:25:27 -04:00
Matthew Brown
0ae04c9743 Fix #2148 - support arrays properly 2019-09-21 21:50:11 -04:00
Brown
c5ef2516b5 Fix #2150 - add detection for unnecessary @var annotations
And also remove them from codebase
2019-09-19 11:59:43 -04:00
Matthew Brown
78175c9765 Support @psalm-readonly too 2019-09-08 15:12:30 -04:00
Matthew Brown
b61d0c6dcd Fix #2104 - only treat @method returns as separate if attached to method name 2019-09-07 22:30:09 -04:00
Matthew Brown
dcc4de59df Change @immutable to @psalm-immutable 2019-08-31 18:43:45 -04:00
Matthew Brown
f20dc16295 Make @immutable work properly 2019-08-31 10:07:23 -04:00
Matthew Brown
7886d5a408 Add support for @psalm-mutation-free annotation on methods 2019-08-31 00:47:12 -04:00
Brown
b7b4baff8f Add support for @immutable
Fixes #1272
2019-08-30 12:36:35 -04:00
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -04:00
Matthew Brown
2a5e0d8f39 Fix #1444 - track unused suppressions 2019-08-18 14:27:50 -04:00
Matthew Brown
2146f73782 Prepare for tracking unused suppressions
Ref #1444
2019-08-18 12:25:48 -04:00
Brown
2b2988b072 Fix #2019 - allow union in @throws 2019-08-13 15:44:18 -04:00
Matthew Brown
7ed30cd5b0 Add support for @readonly annotation 2019-08-11 16:01:37 -04:00
Brown
bdac01582d Fix #1989 - support fully-qualified params in @method annotations 2019-08-08 17:25:56 -04:00
Matthew Brown
b2c0993cdc Add framework for taint analysis to Psalm
Ref #611
2019-08-04 10:37:36 -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
3df248eea2 Add concept of purity to functions and methods 2019-07-18 01:31:48 -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
Brown
e4e48d2d06 Add support for templated @var on return statements 2019-06-26 16:33:43 -04:00
Brown
1864d9a2be Allow templated @var on return docblocks 2019-06-26 16:26:14 -04:00
Matthew Brown
31c8a2e4d7 Add offsets to type tokenisation
Ref #1832
2019-06-22 23:30:40 -04:00
Brown
b12f05185a Fix #1799 - support trailing commas in object-like docblock types 2019-06-18 17:47:06 -04:00
Matthew Brown
a0866da88e Strip extranous data 2019-06-16 12:45:02 -04:00
Brown
7a6395490c Allow @property to contain union types 2019-06-14 10:45:00 -04:00
Brown
b1d1ab974c Preserve formatting of callable type 2019-06-06 14:27:49 -04:00
Brown
0221282074 Be resilient to docblock spaces 2019-06-06 13:57:00 -04:00
Brown
20422cf223 Fix #1730 - parse @param * $foo properly 2019-06-03 15:46:25 -04:00
Brown
2f29dcce93 Fix #1728 - remove extra data in template-extends annotation 2019-06-03 10:28:54 -04:00
Matthew Brown
c569f3932c Use separate method for parsing docblocks 2019-06-01 18:44:59 -04:00
Matthew Brown
22b6c8120a Fix spacing issue 2019-06-01 17:22:33 -04:00
Matthew Brown
62be1cc1b0 Add rest of files 2019-06-01 16:57:33 -04:00
Matthew Brown
736f01c29e Store more accurate return type location 2019-06-01 13:02:20 -04:00
Matthew Brown
909e02d441 Move var docblocks within function 2019-06-01 12:25:57 -04:00
Matthew Brown
dc5a5bcd9d Simplify var docblock parsing signature 2019-06-01 11:53:32 -04:00
Matthew Brown
c80f9d8ecd Add class-based support for key-of
Ref #762
2019-05-24 02:12:58 -04:00
Matthew Brown
574545e149 Add initial support for key-of<T>
Ref #762
2019-05-23 23:53:48 -04:00
Brown
66bbe5bb74 Allow space in intersection type
Ref #1645
2019-05-16 13:52:58 -04:00
Barney Laurance
f4c754737f psalm-internal: Prevent use of @psalm-internal without @internal 2019-05-14 18:54:16 -04:00