1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

57 Commits

Author SHA1 Message Date
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Matt Brown
a4bdca55e9 Fix sscanf test with new types 2017-05-05 19:56:45 -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
Matthew Brown
1a8cdc5da9 Allow two or more instanceof interface checks side by side 2017-04-15 21:25:53 -04:00
Matthew Brown
f67e92023b Add support for intersection types
Fixes #140
2017-04-15 20:36:40 -04:00
Matthew Brown
eebaf5795d Fix regression dealing with union types from docblocks 2017-04-15 12:44:38 -04:00
Matthew Brown
40427839ea Get all variables possibly assigned in conditional 2017-04-06 22:56:37 -04:00
Matthew Brown
20b0460a33 Fix #123 - ternary byref vars now adjusted 2017-04-06 21:53:29 -04:00
Matt Brown
c09b0e459a Make is_numeric a proper type refinement 2017-04-06 18:06:24 -04:00
Matt Brown
e7aec27eae Prevent emitting issues when comparing mixed values 2017-04-06 17:40:15 -04:00
Matt Brown
da19b55db1 Add special TypeDoesNotContainNull issue as distinct from TypeDoesNotContainType 2017-04-06 15:36:22 -04:00
Matt Brown
14bb967c7d Warn when doing === comparisons on incompatible types 2017-04-06 14:53:45 -04:00
Matthew Brown
c33e66813a Move type algebra functionality to separate checker 2017-03-18 13:37:00 -04:00
Matthew Brown
6cfe540c98 Fix issue evaluating elseif empty assertions 2017-03-14 15:48:52 -04:00
Matt Brown
b3bb8b72cc Add additional tests 2017-03-13 18:07:36 -04:00
Matthew Brown
a7da88bad3 Improve solution to allow for more user errors 2017-03-11 12:32:27 -05:00
Matthew Brown
39b9afcdac Fix issue running isset after empty array check 2017-03-11 12:05:23 -05:00
Matt Brown
c6a625c16e Fix #102 - be more lenient about whether a type can be reconciled 2017-02-21 16:15:39 -05:00
Matthew Brown
cdcacc395d Rename DeadCode to UnusedVariable, UnusedMethod and UnusedClass 2017-02-08 00:28:26 -05:00
Matthew Brown
01beb97413 Fix #87 - array types from docblocks can be reasoned about safely 2017-02-03 22:07:14 -05:00
Matthew Brown
e925e8b4db Fix #86 - remove empty array from type on !empty check 2017-02-01 13:51:26 -05:00
Matt Brown
a7872472be Add stubbing tests and modify config initialisation 2017-01-31 19:22:05 -05:00
Matthew Brown
ce93c4ef2d Assert smart things when offset is variable 2017-01-31 01:35:44 -05:00
Matthew Brown
965a79251d Fix #82 by updating how isset calls are handled 2017-01-31 00:34:06 -05:00
Matthew Brown
6bcc763414 Fix #3 by checking inside __constructor calls for initialisations 2017-01-26 23:23:12 -07:00
Matt Brown
d3a9452cde Make sure we don’t lose type information while reconciling 2017-01-19 17:45:42 -05:00
Matthew Brown
27a018095b Fix invalid InvalidParamDefault error when comparing to false 2017-01-19 01:12:19 -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
0613324df9 Add test for #64 2017-01-16 16:33:35 -05:00
Matthew Brown
4b283564ca Allow variadic params to be passed by reference 2017-01-16 12:39:38 -05:00
Matthew Brown
ce89ac4986 Fix #50 - asserting about docblock types no longer causes error 2017-01-15 17:52:01 -05:00
Matthew Brown
1bf2139149 Fix #58 - treat callmap args correctly when evaluating variadic 2017-01-15 13:17:11 -05:00
Matthew Brown
2e4996e562 Fix how we treat numeric strings 2017-01-15 12:55:07 -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
7609ca02c0 Fix #32 by evaluating all class references in files lazily 2017-01-04 23:42:58 -05:00
Matthew Brown
05834a0db3 Fix #13 by revamping how we treat type assertions in if statements and ternary expressions 2016-12-28 13:12:06 -05:00
Matthew Brown
07c415d588 Add tests for upcoming functionality 2016-12-24 18:29:11 +00:00
Matthew Brown
c55870e26c Allow generic TypeChecker::isContainedBy checks 2016-12-24 18:28:43 +00:00
Matthew Brown
52b3e1ba8c Simplify test config setup; 2016-12-18 19:00:32 -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
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
c7a758ceb1 Fix trait method call checks 2016-12-12 13:50:46 -05:00
Matthew Brown
4c21a5af7c Add so many new tests 2016-12-11 23:41:11 -05:00
Matthew Brown
562f71b21f Add TypeDoesNotContainType issue and fix those issues in Psalm code 2016-12-11 13:48:11 -05:00
Jon Ursenbach
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00
Matthew Brown
18a55e2854 Also inspect arrays from strings 2016-10-15 13:10:05 -04:00