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

90 Commits

Author SHA1 Message Date
Joram Schrijver
c97ba8f713 Implement type-checking and forbidding for print (#2314)
* Add type-checking for print

* Allow print to be forbidden
2019-11-08 07:01:34 -05:00
Brown
06b64a4a01 Detect erroneous use of empty check on bools 2019-11-06 16:14:46 -05:00
Brown
818f0c0985 Flesh out list types
Fixes #2300
2019-11-05 13:08:12 -05:00
Brown
353cf2351e Fix #2259 - if error suppression is use, list destructuring values will be nullable 2019-10-22 10:40:37 -04:00
Brown
d225374d6d Fix #2156 - do better inference after isset 2019-10-01 19:31:08 -04:00
Brown
f8f8b633b1 Suppress a bunch of PossiblyUndefinedArrayOffset issues 2019-10-01 15:44:43 -04:00
Matthew Brown
a9d0296252 Fix #2182 - allow modification to cloned objects inside 2019-09-30 22:07:20 -04:00
Brown
4ec966d72a Fix variable 2019-09-26 15:53:41 -04:00
Brown
cf799d0926 Fix #2173 - remove @var annotations automatically 2019-09-26 15:08:05 -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
Brown
6423a5e68a Fix #2145 - complain make byref params passed to closures mixed afterwards 2019-09-16 18:42:44 -04:00
Matthew Brown
0b4981f01b Fix #1551 - do better at inferring class constant types 2019-09-14 14:26:31 -04:00
Matthew Brown
d941294a84 Move class const analysis 2019-09-14 13:12:54 -04:00
Brown
a6baa2d04c Allow callables to be understood as pure
Fixes #2112
2019-09-09 12:11:04 -04:00
Brown
b49444b8ad Allow immutable objects to be cloned
Fixes #2111
2019-09-09 11:14:40 -04:00
Matthew Brown
504ccdab8c $a++, $a-- etc should be treated as assignments 2019-08-30 18:06:45 -04:00
Brown
b7b4baff8f Add support for @immutable
Fixes #1272
2019-08-30 12:36:35 -04:00
Brown
9835943294 Fix #2041 - make sure property is always set 2019-08-21 11:25:08 -04:00
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -04:00
Brown
b5614d03f8 Add detection for unused function calls 2019-08-13 13:15:23 -04:00
Matthew Brown
b2c0993cdc Add framework for taint analysis to Psalm
Ref #611
2019-08-04 10:37:36 -04:00
Matthew Brown
3df248eea2 Add concept of purity to functions and methods 2019-07-18 01:31:48 -04:00
Matthew Brown
1ae9ea5fed Use object instead of by-ref params 2019-07-10 01:35:57 -04:00
Matthew Brown
f5809ec24a Only add node references to explicit locations 2019-07-01 11:12:12 -04:00
Matthew Brown
ca53019d6b Simplify class completion lookup
Ref #1822
2019-06-29 21:32:26 -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
4baa4d70d8 Allow templated static type in fleshOutType 2019-06-24 15:08:55 -04:00
Brown
edf3307f84 Fix Psalm errors 2019-06-14 15:55:23 -04:00
Brown
1bc1af140f Move method calls outside classes and __CLASS__ constants 2019-06-14 15:54:15 -04:00
Matthew Brown
20c66f693e Fix handling of class const types 2019-06-06 18:46:40 -04:00
Brown
f309c755f8 Add ability to move classes 2019-06-05 08:50:24 -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
cd969c51e5 Generate missing param types from callers
Fixes #1707
2019-05-31 01:47:35 -04:00
Brown
7df88197ef Fix #762 - support key-of and value-of types 2019-05-28 10:44:04 -04:00
Matthew Brown
518330dcf4 Fix class constant assertions on self/static 2019-05-27 13:33:14 -04:00
Matthew Brown
790bc53bfd Fix #1681 - interpret parent annotation properly 2019-05-25 11:51:09 -04:00
Brown
751253ddf0 Fix #1603 - prevent invalid covariant template classes from being passed 2019-05-06 16:38:08 -04:00
Brown
0e4c8ce482 Split apart TypeCoercion issues, allowing more granular issue filtering 2019-04-25 18:02:19 -04:00
Brown
ff14f671b1 Add hopefully-more-portable method for evaluating method/property usage 2019-04-16 16:07:48 -04:00
bugreportuser
8454c0db39 Support for bitwise not 2019-04-14 10:16:38 -04:00
Brown
be5a262deb Add better handling for non-edge-case function calls 2019-04-11 14:53:21 -04:00
Tyson Andre
fc83f1c3ea Fix typo: "Arithmentic" -> "Arithmetic" 2019-03-24 23:00:51 -04:00
Matthew Brown
6bcc3d0261 Don’t stop analysing on var_dump 2019-03-23 10:58:26 -04:00
Matthew Brown
472ab29d74 Add PossiblyInvalidCast for more refined checks 2019-03-17 17:10:51 -04:00
Matthew Brown
bf586bf93b Fix #1471 - report issue with string casting inside string 2019-03-17 16:31:56 -04:00
Matthew Brown
b82709897a Fix #1460 2019-03-15 21:50:16 -04:00
Matthew Brown
848b070946 Fix #1413 - don’t complain about byref use param 2019-03-10 16:36:35 -04:00
bugreportuser
57a4522ee7 Flesh out callable arg types 2019-03-07 23:24:50 -05:00
Brown
5beb26659e Add special type for SQL select strings for plugins to consume 2019-03-07 14:56:18 -05:00