Matthew Brown
ec65f31aaa
Improve dead code analysis and fix errors found
2017-02-02 00:20:58 -05:00
Matthew Brown
1051ba9fc1
Wait to evaluate property defaults until analysis
2017-02-01 18:27:24 -05:00
Matthew Brown
d3abc0011d
Fix #80 - add dead code checks via command line
2017-01-31 23:24:33 -05:00
Matthew Brown
1ece3071f9
Add reference counting for methods and remove dead code
2017-01-29 23:44:05 -05:00
Jon Ursenbach
c66082897d
Fixing a typo in the ClassLikeChecker exception message.
2017-01-29 00:34:42 -05:00
Matthew Brown
ea06f62d72
Fix registration of private trait properties
2017-01-27 17:57:59 -07:00
Matthew Brown
3c3d22164c
Add private properties to context
2017-01-27 08:49:37 -07:00
Matthew Brown
c485a3d056
Check for not-set-in-constructor errors across traits too
2017-01-27 08:28:21 -07:00
Matthew Brown
98d4ced24f
Make location of not-set-in-constructor errors more precise
2017-01-26 23:40:22 -07:00
Matthew Brown
63801c38c0
Make location of constructor error more specific
2017-01-26 23:32:03 -07:00
Matthew Brown
6bcc763414
Fix #3 by checking inside __constructor calls for initialisations
2017-01-26 23:23:12 -07:00
Matthew Brown
daa923e243
Stop analysis if parent class cannot be located
2017-01-23 13:36:06 -07:00
Matthew Brown
3ad6ec2e34
Be more resilient if we ignore that parent class does not exist
2017-01-23 13:21:40 -07:00
Matthew Brown
894b25487f
Fix #71 - prevent instantiation of abstract classes
2017-01-20 00:10:10 -05:00
Matthew Brown
9d1b382820
Fix #48 by recording class definition line number & file path
2017-01-19 23:45:21 -05:00
Matt Brown
77ff99206e
Inherit all parent properties when analyzing method
2017-01-19 13:11:45 -05:00
Matt Brown
0ba02f304f
Make project checker always aware of file paths to classes
2017-01-19 10:55:58 -05:00
Matthew Brown
d7096df7a6
Don’t complain about non-user-defined class casing
2017-01-18 00:33:48 -05:00
Matthew Brown
b438e4c305
Revert "Don’t complain about incorrectly cased builtin classes"
...
This reverts commit 20558c6039
.
2017-01-18 00:23:17 -05:00
Matthew Brown
20558c6039
Don’t complain about incorrectly cased builtin classes
...
As they can never cause autoloader issues
2017-01-18 00:20:24 -05:00
Matthew Brown
b9bad01dbd
Treat reflected interface parents correctly
2017-01-16 20:47:23 -05:00
Matthew Brown
3cdb1753d5
Update to the more accurate TypeChecker::isContainedBy
2017-01-16 20:00:51 -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
e3a9cb98c3
Add extra issue for invalid clone and fix issue reporting;
2017-01-16 12:59:09 -05:00
Matthew Brown
d46282e13f
Fix issue with constants defined inside interfaces
2017-01-16 00:13:08 -05:00
Matthew Brown
de9d282205
Be more robust in the case of missing parent class
2017-01-15 22:09:32 -05:00
Matthew Brown
5845463dab
Fix #61 - don’t warn about non-implementing abstract classes
2017-01-15 19:02:36 -05:00
Matthew Brown
03141e41c2
Move string-stored types into named classes
2017-01-15 10:22:05 -05:00
Matthew Brown
78c1138a94
Fix #53 - add back extends checks for reflected classes
2017-01-14 19:34:10 -05:00
Matt Brown
e300550209
Be less brittle when interface does not exist
2017-01-12 11:16:00 -05:00
Matthew Brown
5f54a9571c
Fix deep project checks
2017-01-12 01:03:48 -05:00
Matthew Brown
107d8352fc
Add back mutation checks
2017-01-12 00:38:15 -05:00
Matthew Brown
56be346191
Add back mutation checks
2017-01-11 21:37:53 -05:00
Matthew Brown
03c5ea3cef
Store all class keys lowercased
2017-01-09 00:14:39 -05:00
Matthew Brown
c90a479b15
Fix self-referential issue
2017-01-08 13:53:40 -05:00
Matthew Brown
e670ce4ca4
Revisit files to save memory usage
2017-01-08 12:55:32 -05:00
Matthew Brown
28cd8caca8
Change analyzeMethods to analyze
2017-01-07 15:57:25 -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
6ee69e547f
Do more to separate out processing steps
2017-01-06 01:07:11 -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
30c910109c
Fix inherited reflected properties/methods
2017-01-01 19:50:29 -05:00
Matthew Brown
883ca6a5db
Fix #30 by consolidating properties into single storage array
2017-01-01 19:09:17 -05:00
Matthew Brown
0b3b3f01f3
Fix support for traits returning self
2016-12-31 11:49:04 -05:00
Matthew Brown
e972f4106c
Remove erroneous array index
2016-12-30 20:19:40 -05:00
Matthew Brown
77dacf23e6
Remove var_dump
2016-12-30 20:07:12 -05:00
Matthew Brown
b068bd7858
Fix many bugs
2016-12-30 20:05:32 -05:00
Matthew Brown
4a10bdbc60
Fix suppressed warnings in tests
2016-12-30 19:36:35 -05:00
Matthew Brown
b529fa4877
Move static method arrays into MethodStorage classes
2016-12-30 15:53:35 -05:00
Matthew Brown
92fe58b97c
Shift storage from static arrays to dedicated ClassLikeStorage objects
2016-12-30 12:41:14 -05:00
Matthew Brown
3e78405836
# This is a combination of 4 commits.
...
# The first commit's message is:
Make cofig schema more relaxed about ordering
# This is the 2nd commit message:
Add tests for awkward case
# This is the 3rd commit message:
Fix static calls to class methods within traits
# This is the 4th commit message:
Repopulate fewer arrays
2016-12-30 01:50:33 -05:00
Matthew Brown
641ffc09c9
Add NullOperand issue for easy ignoring
2016-12-29 00:32:12 -05:00
Matthew Brown
ed03104ca8
Fix overridden method interface checks
2016-12-28 21:37:24 -05:00
Matthew Brown
c1e1c0ae85
Check trait methods against interfaces
2016-12-28 20:33:26 -05:00
Matthew Brown
fa1da90fbe
Only warn about unimplemented interface methods for non-abstract classes
2016-12-28 16:46:30 -05:00
Matthew Brown
74727c9564
Prevent value from breaking outside of scope
2016-12-26 11:39:50 +00:00
Matthew Brown
1007d1682c
Fix mixed operand issues
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
9746c8972f
Fix MixedAssignment errors
2016-12-17 00:48:31 -05:00
Matthew Brown
972e3b5c6e
Fix failure to warn when class does not implement all interface methods
2016-12-16 22:15:31 -05:00
Matt Brown
d012510a41
Fix some mixed assignment issues
2016-12-16 19:22:30 -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
2cfbefee08
Avoid doubling-up values
2016-12-14 19:26:26 -05:00
Matt Brown
8d693d7db2
Fix issues around incorrectly registering inherited private methods
2016-12-12 14:29:58 -05:00
Matt Brown
7d3753ddd8
Fix errors on inherited trait protected/private methods
2016-12-12 13:57:45 -05:00
Matt Brown
c7a758ceb1
Fix trait method call checks
2016-12-12 13:50:46 -05:00
Matthew Brown
a5195b2571
Add JSON output format
2016-12-07 22:38:57 -05:00
Matt Brown
55a060b53a
Add support for closure checks
2016-12-07 14:13:39 -05:00
Matthew Brown
7aac9985de
Remove unnecessary suppression
2016-12-07 01:14:47 -05:00
Matthew Brown
cb9fe6e231
Add typehint to property/call maps
2016-12-07 01:12:42 -05:00
Matthew Brown
638fdad3ad
Add support for PHP 7.1 iterable pseudo-type
2016-12-04 21:04:25 -05:00
Matthew Brown
23334700f6
Add config option to determine whether or not to use a property default value for its type
2016-12-04 18:43:07 -05:00
Matthew Brown
7cb6891a0b
Add support for class constant visibility
2016-12-04 01:44:33 -05:00
Matthew Brown
0675e3364a
Fix PHPParser 3.0.1 compatibility issues
2016-12-03 22:41:45 -05:00
Matthew Brown
ae16353f94
Suppress a couple more issues
2016-12-03 20:44:04 -05:00
Matthew Brown
a1acbfec07
Show code snippets when reporting errors
...
This also introduces a new method of identifying specific code locations when creating issues
2016-12-03 19:11:30 -05:00
Matthew Brown
55a3ffa773
Add missing return types
2016-11-20 23:45:10 -05:00
Matthew Brown
9d3dcc7401
Do not panic when bad types are passed
2016-11-20 23:31:10 -05:00
Matthew Brown
6822f46a2c
Add suppprt for PHP 7.0 grouped uses
2016-11-20 22:40:19 -05:00
Matthew Brown
4b3f63c843
Fix missing properties
2016-11-20 22:02:26 -05:00
Matthew Brown
5a9f99c24e
Fix namespacing issues in PHP 5.6
2016-11-20 21:49:06 -05:00
Matthew Brown
4a66dad2ac
Improve interface inheritance
2016-11-20 11:51:19 -05:00
Matthew Brown
38daca5edd
Fix Psalm errors in Psalm
2016-11-13 11:24:46 -05:00
Matthew Brown
8dfca6cce2
Add dummy --update-docblocks option
2016-11-12 18:51:48 -05:00
Matthew Brown
264e77addd
Change a few more words
2016-11-07 19:16:51 -05:00
Matthew Brown
36fc49965b
Correct speling
2016-11-07 17:31:02 -05:00
Matthew Brown
622a0794c3
Swap in Fully-Qualified for Absolute terms
2016-11-07 17:29:51 -05:00
Matthew Brown
12a12e15c2
Emit issue if return type is missing
2016-11-07 17:07:59 -05:00
Matthew Brown
8d0a8ab055
Rely on call map more
2016-11-06 23:30:14 -05:00
Matthew Brown
7d6ac4719f
Fix offset assignment creation
2016-11-05 20:17:22 -04:00
Matthew Brown
492269ddd4
Ignore inability to infer when requiring
2016-11-05 18:46:17 -04:00
Matthew Brown
c5591adf10
Add support for global in functions and mixed inferred return errors
2016-11-05 17:54:34 -04:00
Matthew Brown
299bc45319
Fix trait inheritance diff
2016-11-04 20:49:04 -04:00
Jon Ursenbach
917ee41461
Fixing some code styling issues.
2016-11-04 20:10:59 -04:00
Jon Ursenbach
8a6e8e9940
Fixing remaining PSR-2 violations.
2016-11-03 20:51:56 -04:00
Jon Ursenbach
27c2db1d1d
PSR-2
2016-11-02 17:50:54 -04:00
Matthew Brown
d27e06cc86
Fix interface inheritance
2016-11-02 12:14:21 -04:00
Matthew Brown
70f8947336
Break apart long functions
2016-11-02 09:24:36 -04:00
Matthew Brown
1c09ea7380
Fix Psalm errors in Psalm
2016-10-31 15:42:20 -04:00
Matthew Brown
c2f63c392e
Emit issue if property type is missing
2016-10-31 15:17:54 -04:00