Matthew Brown
f15c26d7f4
Change how type impossibilities are treated to improve message types
2018-04-10 01:27:26 -04:00
Matt Brown
0b268eb602
Allow scalars to be empty
2018-04-05 12:11:58 -04:00
Matt Brown
1282f74931
Allow coercion from generic array to objectlike with possible keys
2018-04-04 18:01:53 -04:00
Matthew Brown
03b3a764e3
Fix #641 - allow is_a to operate on strings as well
2018-04-03 23:14:23 -04:00
Matthew Brown
4552e69ef2
Allow classes to be instantiated by their name only
...
Ref #641
2018-04-03 22:20:00 -04:00
Matthew Brown
5ff6f27178
Fix #615 - numeric-string is always still a string
2018-03-22 21:48:26 -04:00
Matt Brown
cc3aafe4c4
Improve intersection type parsing
2018-03-22 17:55:36 -04:00
Matthew Brown
837f5d7096
Fix #594 - support intersection types (and catch errors)
2018-03-20 20:56:33 -04:00
Matt Brown
24490aac0e
Fix #609 - fix callable coercion in reconciliation step
2018-03-20 13:24:16 -04:00
Matthew Brown
b8a8e9bc5b
Add two skipped (bug-identifying) tests
2018-03-20 09:30:37 -04:00
Matthew Brown
217233472c
Fix #457 - fix objectlike property isset check
2018-02-10 23:30:40 -05:00
Matt Brown
7f4be858c2
Fix #498 - add better issue type for docblock contradiction
2018-02-07 15:20:47 -05:00
Matt Brown
1df4c3d196
Add DocblockTypeContradiction to find possible issues with docblock types
...
Fixes #491
2018-02-06 18:44:53 -05:00
Matt Brown
1d46124bab
Fix issues found by detecting docblock type inconsistencies
2018-02-06 13:40:28 -05:00
Matt Brown
4b87612bb4
Add better issue message for bad array offset
...
Fixes #492
2018-02-06 11:27:01 -05:00
Matt Brown
5d25edf80c
Deal with overlapping docblock types and typehints better
2018-02-05 16:57:33 -05:00
Matthew Brown
fb300baa6d
Move a bunch of code into Codebase
2018-02-01 00:50:01 -05:00
Matt Brown
b2b2572e4d
Fix #478 - allow is_a checks with string arg
2018-01-30 16:45:29 -05:00
Matt Brown
dea5d92e9b
Add support for static::class
2018-01-23 15:46:14 -05:00
Matt Brown
c0fda0ef1e
Allow instanceof static checks
2018-01-23 14:46:46 -05:00
Matthew Brown
e05a7c00cc
Break FileScanner out from FileChecker
2018-01-21 12:44:46 -05:00
Matt Brown
4b4e09277c
Fix #450 - add checks for duplicate array keys
...
And fix the embarassing errors in tests
2018-01-18 17:16:50 -05:00
Matt Brown
2120d258a4
Fix formatting of return type adder
2018-01-11 15:50:58 -05:00
Matt Brown
edde8930af
Speed up Psalm by caching result of Union::getId
2018-01-09 15:05:48 -05:00
Matthew Brown
c38cf9b672
Migrate type reconciliation code to its own class
2017-12-29 10:55:53 -05:00
Matthew Brown
035f528581
Make sure that combining false with false simplifies to false
2017-12-19 00:06:05 -05:00
Matthew Brown
298ee214e9
Only allow variables greater than a number to be non-null
2017-12-13 20:48:01 -05:00
Matthew Brown
e63441af1e
Make sure $a > 0 removes null from $a
...
Fixes #186
2017-12-13 20:06:19 -05:00
Matthew Brown
a345ec49a1
Fix is_bool checks on true vars
2017-12-09 16:05:31 -05:00
Matthew Brown
13f290038a
Improve RedundantCondition checks and add true type
...
Fixes #383
2017-12-09 14:53:39 -05:00
Matt Brown
e2b1b24dbf
Fix empty checks, make them more like isset checks
...
Fixes #372
2017-12-05 12:14:10 -05:00
Matthew Brown
7d003c5bc1
Fix erroneous treatment of or clauses in if statements
2017-12-03 16:25:52 -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
b1a35d6a6e
Remove numeric types with !is_numeric check, fix #330
2017-11-21 20:58:08 -05:00
Matthew Brown
f5f7849d3a
Fix erroneous merging of types
2017-11-20 20:06:00 -05:00
Matthew Brown
467bbba593
Prevent falsy values from leaking into the type system
2017-10-23 22:04:07 -04:00
Matthew Brown
a34de5b79c
Fix #257 - prevent collapsing callable into string
2017-10-23 08:00:28 -04:00
Matthew Brown
e41e1fa57d
Fix #256 - don’t crash when encountering types that match one another
2017-10-23 07:35:28 -04:00
Matthew Brown
2c18686c8c
Fix #247 - allow is_callable checks on array
2017-10-22 21:07:06 -04:00
Matthew Brown
f9032924e6
Allow == true comparisons to be evaluated to !falsy
2017-10-22 12:09:22 -04:00
Matthew Brown
f6e01b5925
Change empty type assertions to "falsy"
...
As empty has a special meaning
2017-10-22 11:57:41 -04:00
Matthew Brown
8aabcbce35
Introduce UntypedParam warnings when functions are missing param types
2017-09-02 11:18:56 -04:00
Matthew Brown
4175295113
Isolate where we load static storage objects ( #195 )
...
* Move FileChecker::$storage calls to provider
* Add ClassLikeStorageProvider
* Use ClassLikeStorageProvider everywhere
* Move storage arrays into providers
2017-07-29 15:05:06 -04:00
Matt Brown
ac70ea31b2
Change test assertion keying
2017-06-29 10:22:49 -04:00
Matthew Brown
bc35f88859
Fix issue with $this instanceof checks in traits
2017-06-23 00:39:37 -04:00
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