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

123 Commits

Author SHA1 Message Date
Brown
0cfe565d0a Fix #2952 - always be cloning 2020-03-09 18:59:56 -04:00
Matthew Brown
5b7ab6a542 Fix coercion 2020-03-09 01:32:27 -04:00
Matthew Brown
3243819f1b Fix #2941 - allow class-string<self> to be fleshed out 2020-03-09 01:29:16 -04:00
Brown
292a2359b3 Add slash 2020-02-21 15:44:26 -05:00
Brown
b51863fc9b Fix #2848 - allow casting templated types 2020-02-21 15:17:35 -05:00
Matthew Brown
3561c7d5dc Make sure yield from expressions counted as used
Fixes #2823
2020-02-17 19:21:04 -05:00
Matthew Brown
cf977c3542 Don’t convert constant descriptions to lowercase 2020-02-17 18:19:33 -05:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Brown
f141f7c526 Improve --diff checks by including trait-using classes in dependents 2020-02-11 16:39:33 -05:00
Brown
dcc855de95 Fix #2739 - specify wildcards in constants 2020-02-07 10:54:57 -05:00
Matthew Brown
5eb2ebc508 Add more type-system protections for bad array args 2020-01-29 23:41:17 -05:00
Matthew Brown
989123f82e Fix line length 2020-01-29 22:31:23 -05:00
Matthew Brown
933dff9e20 Fix #2712 - allow __toString to have more specific type 2020-01-29 22:28:40 -05:00
Brown
e68ca6a20b Fix #2661 - catch invalid array_push on property 2020-01-22 09:57:59 -05:00
Matthew Brown
85966d8a21 Fix #2577 - fix list cast to array 2020-01-11 11:42:09 -05:00
Brown
bd9142f131 Fix #2574 - remove assertions after increment 2020-01-09 11:51:56 -05:00
SignpostMarv
fbf66ba7f6 Typecast bool to int (#2550)
* adding specific checks for typecasting booleans, re: vimeo/psalm#2548

* satisfying phpcs

* amend check to use psalm types rather than php-parser types

* implementing tests for typecasting bools to int

* satisfying phpcs
2020-01-04 16:36:19 -05:00
Matthew Brown
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Matthew Brown
55c2f7faa2 Fix #2508 - don’t replace templated types with generic ones inside own function 2019-12-28 18:38:02 -05:00
Matthew Brown
734ad02203 Fix #2476 - flesh out iterable params 2019-12-18 17:19:54 +00:00
Matthew Brown
bf67c036aa Fix #2474 - treat free-standing binaryops as ifs instead 2019-12-16 08:32:00 -05:00
Brown
6d02aa86e8 Reconcile string emptiness a bit better 2019-12-13 15:51:54 -05:00
Matthew Brown
f45014d403 Fix #2460 - allow assertions on immutable method calls 2019-12-12 09:32:33 -05:00
Brown
b3cf9d3958 Catch circular references in constants
Fixes #2453
2019-12-10 16:16:44 -05:00
Brown
b78acf796f Fix #2445 - only generalise param when it’s generic 2019-12-09 10:58:09 -05:00
Matthew Brown
2e00ad2240 Treat more things as assignments 2019-12-07 15:58:05 -05:00
Brown
e1dd22ef6c Allow static::class to be used in array assertions 2019-12-04 12:23:26 -05:00
Brown
821f3528d2 Fix #701 - indicate issues fixable with Psalter 2019-12-02 15:24:01 -05:00
Matthew Brown
2383945fb9 Support __METHOD__ and __FUNCTION__ magic constants better 2019-11-29 22:47:20 -05:00
Matthew Brown
d1fbd1fa26 Add working arrow-functions implementation 2019-11-26 23:52:26 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Matthew Brown
7012bedf4e Fix #2326 - substitute static more responsibly in generic objects 2019-11-12 08:01:22 -05:00
Brown
96586f16c0 Fix phpcs issues 2019-11-11 10:11:42 -05:00
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