1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

89 Commits

Author SHA1 Message Date
Brown
0e4c8ce482 Split apart TypeCoercion issues, allowing more granular issue filtering 2019-04-25 18:02:19 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Brown
601f303de2 Fix position of invalid param 2019-02-27 16:00:44 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matthew Brown
b0733254bb
Use individual type objects for each string (#757)
* Experiment with individual types for each string

* Fix bunch of errors

* Fix a few more issues

* Fix a whole bunch of bugs

* Fix most remaining bugs

* Fix isset warnings

* Fix psalm errors in psalm

* Limit big string size

* Fix falsiness of ints

* Fix issue with type widening, allowing value set in nested if to be altered

* Don’t complain if type is mixed

* Add skipped-for-now test

* Add specific test to address issue
2018-05-18 11:02:50 -04:00
Matthew Brown
7dd86efa13 Add support for checking negative values 2018-05-12 18:46:47 -04:00
Matthew Brown
8f9b4098bc Allow scalar to work with false
Fixes #718
2018-05-08 22:18:58 -04:00
Matthew Brown
1a4ddc7cdd
Support value types (#707)
* Add first idea

* Add initial count experiments

* Remove false positives

* Fix getId to support changes in conditionals

* Add better tests

* Strip types when not exists

* Fix array offsets

* More fixes

* Add class constant value types

* Clone constants everywhere

* Don’t complain unnecessarily

* Be more lenient with possibly invalid __sets

* Fix mixed issues

* Fix bug concerning orred string equality

* Remove unnecessary casts
2018-05-03 13:56:30 -04:00
Matt Brown
f2ff727649 Fix #706 - don’t namespace & 2018-05-03 13:15:16 -04:00
Radosław Kowalewski
15c1a82d8c Few fixes to make tests pass on windows
* changed / to DIRECTORY_SEPARATOR in expected messages
* cahnged most occurences PHP_EOL to "\n" in tests and src
* added output buffering in test to avoid marking test as risky
2018-04-12 22:41:13 -04:00
Matthew Brown
861d907845 Add more information to TooMany/TooFewArguments issues
Fixes #481
2018-02-02 11:26:55 -05:00
Matthew Brown
799aef628e Fix type assignment checks 2018-01-20 11:48:16 -05:00
Matthew Brown
5200ffa214 Do not crash on intersection type method lookup 2018-01-20 01:04:15 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
fb9f20f4b8 Find unused properties with dead code checks
Fixes #424
2018-01-10 23:29:18 -05:00
Matt Brown
27e47365e3 Fix #422 - be better about checking isset call variables 2018-01-09 19:33:39 -05:00
Tyson Andre
d0fe5e3127 Don't convert standalone false/true to bool in combineTypes (#396)
Fixes #392
2017-12-15 16:36:42 -05:00
Matthew Brown
6843dfb7fc Remove from_docblock status if we make a successful method call 2017-12-03 17:21:20 -05:00
Matthew Brown
f27bd50abe
Add RedundantCondition issue, replacing FailedTypeResolution (#344)
* Group changes

* Don’t worry about vars defined before exiting

* Fix issues with vars defined in conditionals

* Add failing test

* Only add failed reconciliation flag if nothing could be salvaged

* Avoid notice when removing clauses

* Improve handling of loops

* Fix evaluation of binary op expressions

* Remove unset vars from outer context after loop

* Ignore RedundantCondition in some more configs
2017-11-28 00:46:41 -05:00
Matthew Brown
ae799da8d0 Add root array var when updating array key type in if 2017-11-19 23:25:14 -05:00
Matthew Brown
f136fc3296 Fix #305 by making test error message checks more accurate 2017-11-15 21:04:25 -05:00
Matthew Brown
4f2a200b45 Fix #283 - add more refined PossiblyUndefinedMethod check 2017-11-11 14:53:35 -05:00
Matt Brown
ac70ea31b2 Change test assertion keying 2017-06-29 10:22:49 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Jon Ursenbach
11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00
Matt Brown
b3bb8b72cc Add additional tests 2017-03-13 18:07:36 -04:00
Matthew Brown
c41c873d33 Add exception messages to TypeTest.php 2017-02-13 01:13:22 -05:00
Matthew Brown
35e4b380cc Add collection of PossiblyNull* issues 2017-02-11 17:55:08 -05:00
Matthew Brown
cdcacc395d Rename DeadCode to UnusedVariable, UnusedMethod and UnusedClass 2017-02-08 00:28:26 -05:00
Matt Brown
a7872472be Add stubbing tests and modify config initialisation 2017-01-31 19:22:05 -05:00
Matthew Brown
6bcc763414 Fix #3 by checking inside __constructor calls for initialisations 2017-01-26 23:23:12 -07:00
Matthew Brown
f03807e7b7 Fix unaryplus/minus type inference 2017-01-25 20:02:19 -07:00
Matt Brown
d3a9452cde Make sure we don’t lose type information while reconciling 2017-01-19 17:45:42 -05:00
Matt Brown
b23c55e570 Fix #70 by allowing string to be a numeric 2017-01-18 11:07:38 -05:00
Matthew Brown
b3726c9de5 Use getcwd() for the project’s base, not the config file parent directory 2017-01-16 18:33:04 -05:00
Matthew Brown
faccc73dc1 Fix #52 by analysing non-main parts of issets 2017-01-15 13:58:20 -05:00
Matt Brown
6e6106c080 Add docblocks to tests 2017-01-13 14:07:23 -05:00
Matthew Brown
17329015dc Discriminate between checking, visiting and analyzing in method names 2017-01-07 15:09:47 -05:00
Matthew Brown
694da2cabd Simplify a lot of APIs 2017-01-07 14:35:07 -05:00
Matthew Brown
7609ca02c0 Fix #32 by evaluating all class references in files lazily 2017-01-04 23:42:58 -05:00
Matthew Brown
8b5e066ba6 Add case-sensitive function names 2016-12-30 13:09:00 -05:00
Matthew Brown
9746c8972f Fix MixedAssignment errors 2016-12-17 00:48:31 -05:00
Matt Brown
6755c8724a Add tests for M* issues, fixing bugs along the way 2016-12-16 18:56:23 -05:00
Matt Brown
16e89a8c1c Fix #26 - Allow refinement via type intersection
Not just via explict subsets
2016-12-16 17:59:27 -05:00
Matt Brown
c91e457c28 Add psalm.xml support for checking tests 2016-12-14 12:55:23 -05:00
Matt Brown
154d023a9d Add more robust config testing 2016-12-14 12:28:38 -05:00
Matt Brown
5077424844 Fix a bunch of tests to not emit issues on echo 2016-12-09 13:04:08 -05:00
Matt Brown
e6ff24b8d2 Fix assignment in elseif 2016-12-09 12:06:14 -05:00
Matt Brown
55a060b53a Add support for closure checks 2016-12-07 14:13:39 -05:00
Matthew Brown
ded2cb5460 Add (skipped) test for #1 2016-11-21 16:48:35 -05:00