Matthew Brown
0fdf281896
Add support for @deprecated classes
2017-05-25 00:34:39 -04:00
Matthew Brown
44b4d04e0a
Fix #95 - emit issue on private constructor calls
2017-05-24 23:55:54 -04:00
Matthew Brown
8f317cd8a2
Fix #133 - emit issue when calling no-constructor class with args
2017-05-24 23:11:40 -04:00
Matthew Brown
4fd46e1752
Improve formatting
2017-05-24 22:07:49 -04:00
Matthew Brown
7532e32b9d
Fixed spacing and use statement formatting
2017-05-19 00:48:26 -04:00
github@muglug.com
9ff8736e53
Add the means to ignore PossiblyNull* errors from the type itself
2017-05-09 16:38:58 -04:00
Matthew Brown
c9b9b29cf4
Fix all phpcs issues
2017-05-04 21:57:26 -04:00
Jon Ursenbach
f65c618b2e
PSR-2 adjustments and adding PHPCS checks into the Travis config. ( #149 )
...
* PSR-2 adjustments and adding PHPCS checks into the Travis config.
* Reverting some CallChecker changes and no longer casting vars to null.
2017-04-28 00:31:55 -04:00
Matthew Brown
007442fdd0
Fix possibly-private error
2017-04-15 21:10:49 -04:00
Matthew Brown
f67e92023b
Add support for intersection types
...
Fixes #140
2017-04-15 20:36:40 -04:00
Matthew Brown
ce6ca58291
Fix #114 - add optional Hack-like checks calls
2017-04-14 21:32:14 -04:00
Matthew Brown
32efdfd0f7
Fix #129 - emit PossiblyNullFuntionCall when encountering such a thing
2017-04-08 11:38:06 -04:00
Matthew Brown
2d454d6e10
Fix #130 - check class exists before checking for __invoke
2017-04-08 11:15:17 -04:00
Matthew Brown
a985fd9324
Add PossiblyInvalidArgument for closure param type checks
2017-04-08 09:47:03 -04:00
Matthew Brown
64361ad2c3
Add more descriptive message to PossiblyInvalidArgument issue
2017-04-08 09:43:58 -04:00
Matthew Brown
c663062816
Add PossiblyUndefinedArgument issue to cope with #126
2017-04-08 09:28:02 -04:00
Matthew Brown
b3a454cf5b
Create new InvalidMethodCall issue for calling methods on non-objects
2017-04-08 09:20:32 -04:00
Matt Brown
f011197090
Fix #124 - don’t check array_filter closures when >2 args passed
2017-04-07 18:30:15 -04:00
Matt Brown
14bb967c7d
Warn when doing === comparisons on incompatible types
2017-04-06 14:53:45 -04:00
Matt Brown
fe43c4e37f
Fix #122 - allow multiple types of filtering
2017-04-03 12:36:49 -04:00
Matthew Brown
c33e66813a
Move type algebra functionality to separate checker
2017-03-18 13:37:00 -04:00
Matt Brown
ae0ca9553f
Remove training wheels
2017-03-13 12:02:28 -04:00
Matt Brown
f9f38f283e
Emit issue when property type is not defined
2017-03-02 12:19:18 -05:00
Matthew Brown
18b5617443
Prevent duplicate lookup of functionstorage
2017-03-02 00:00:31 -05:00
Matthew Brown
5cd1b6735f
Add even more references in docblocks
2017-03-01 22:27:52 -05:00
Matt Brown
864d242f13
Improve labelling of referencing expressions
2017-03-01 11:56:36 -05:00
Matt Brown
518184f388
Don’t do a full class check where not necessary
2017-02-28 11:00:32 -05:00
Matt Brown
4f597a4068
Fix references
2017-02-27 16:38:43 -05:00
github@muglug.com
07c9cfb848
Check template typeof class references
2017-02-27 16:35:24 -05:00
Matt Brown
729954573b
Allow generics to work even if variables not checked
2017-02-27 11:07:44 -05:00
Matt Brown
ac1a45f129
Fix erroneous error message
2017-02-27 10:53:32 -05:00
Matt Brown
7baf942eaa
Prevent false positives after extract call
2017-02-27 10:52:43 -05:00
Matthew Brown
d9433c9491
Add way to find all references to a given class or method in the codebase
2017-02-27 01:30:44 -05:00
Matthew Brown
cd5f727d2e
Collect explicit references to classes/methods
2017-02-26 23:09:18 -05:00
Matthew Brown
12cb72ae4b
Prevent recursion when checking for initialisations
2017-02-22 00:51:34 -05:00
Matthew Brown
9579460c59
Fix #97 - is_callable shouldn’t prevent evaluation of calls to existing functions
2017-02-16 20:51:53 -05:00
Matthew Brown
32dd5d5512
Be better about dealing with byref args when not checking functions
2017-02-15 01:47:03 -05:00
Matthew Brown
1001e03f8a
Prevent empty typeof types
2017-02-12 19:51:48 -05:00
Matthew Brown
4f43a7eccb
Fix possible nullref
2017-02-12 19:31:35 -05:00
Matthew Brown
1d09616e9d
Prevent template types from leaking when no generics are provided
2017-02-12 19:26:23 -05:00
Matthew Brown
2f2b487236
Fix #96
2017-02-12 12:31:39 -05:00
Matthew Brown
f32fabd798
Remove dead code
2017-02-11 19:30:06 -05:00
Matthew Brown
35e4b380cc
Add collection of PossiblyNull* issues
2017-02-11 17:55:08 -05:00
Matthew Brown
14c487d3e6
Always supply default template params as return type
2017-02-10 22:51:47 -05:00
Matt Brown
32d85e20da
Remove unused vars
2017-02-10 19:10:13 -05:00
Matt Brown
c0a6fc9125
Fix #90 - add genericised stubs for common array functions
2017-02-10 18:12:59 -05:00
Matthew Brown
4a82c0a09a
Add support for nested types in templates
2017-02-09 22:57:23 -05:00
Matthew Brown
98b0ed280c
Add support for templating
2017-02-09 20:35:17 -05:00
Matthew Brown
585cf91ef0
If using assertions for type, count as a soft type check
2017-02-08 22:17:16 -05:00
Matthew Brown
cedb70b0b4
Reduce false positives for unused variables
2017-02-08 01:59:49 -05:00
Matt Brown
6b2bb7d917
Store first code location for all variables in a statement list
2017-02-07 18:09:12 -05:00
Matthew Brown
0fbf8b5619
Remove more dead code
2017-02-02 00:45:23 -05:00
Matthew Brown
ec65f31aaa
Improve dead code analysis and fix errors found
2017-02-02 00:20:58 -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
Matthew Brown
d978966db4
Fix #37 - check parent calls for staticness
2017-01-29 22:13:53 -05:00
Matthew Brown
a9203b63f8
Allow phan-like use of assert
2017-01-28 15:17:14 -05:00
Matthew Brown
199686c4db
Add back local vars when descending into method call
2017-01-28 03:55:19 -07:00
Matthew Brown
6bcc763414
Fix #3 by checking inside __constructor calls for initialisations
2017-01-26 23:23:12 -07:00
Matthew Brown
894b25487f
Fix #71 - prevent instantiation of abstract classes
2017-01-20 00:10:10 -05:00
Matt Brown
7116585e85
Be more robust when ignoring UndefinedClass errors
2017-01-19 11:45:25 -05:00
Matthew Brown
e4769fd04a
Don’t give up when faced with variadic type
2017-01-17 00:07:58 -05:00
Matthew Brown
9220b958eb
Fix phpcs errors
2017-01-16 19:06:39 -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
4b283564ca
Allow variadic params to be passed by reference
2017-01-16 12:39:38 -05:00
Matthew Brown
ac92de181f
Allow classes that use __invoke to be called
2017-01-16 00:29:18 -05:00
Matthew Brown
f614944b63
Add predefined functions to avoid throwing errors
2017-01-15 20:11:02 -05:00
Matthew Brown
9b06b672ba
Fix #54 - register function constants when function is invoked
2017-01-15 16:43:49 -05:00
Matthew Brown
8836f05027
Fix #56 - functions in root namespaces should not need slash
2017-01-15 12:34:23 -05:00
Matthew Brown
03141e41c2
Move string-stored types into named classes
2017-01-15 10:22:05 -05:00
Matt Brown
dc585ff22a
Fix #47 - check closure param types properly
2017-01-13 12:40:01 -05:00
Matthew Brown
c20f31855c
Fix namespaced function calls
2017-01-12 09:42:24 -05:00
Matthew Brown
5f54a9571c
Fix deep project checks
2017-01-12 01:03:48 -05:00
Matthew Brown
56be346191
Add back mutation checks
2017-01-11 21:37:53 -05:00
Matthew Brown
380ae61b3c
Don’t emit another error if we’re already ignoring TypeCoercion
2017-01-09 00:58:18 -05:00
Matthew Brown
f318c52876
Improve function rechecking
2017-01-09 00:31:23 -05:00
Matthew Brown
03c5ea3cef
Store all class keys lowercased
2017-01-09 00:14:39 -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
d9bf89f72b
Fix multiple possible method signature bug
2017-01-01 20:10:28 -05:00
Matthew Brown
30a39a0ee6
Do not emit issue when callable is called
2017-01-01 19:24:15 -05:00
Matthew Brown
8f7072c175
Fix change empty arrays to nulls
2017-01-01 17:39:39 -05:00
Matthew Brown
846cc59d5f
Add support for checking closure return types
2016-12-31 10:51:42 -05:00
Matthew Brown
34c238c1a7
Fall through when checking for static/deprecated
2016-12-31 09:25:04 -05:00
Matthew Brown
49f7817a2a
Emit specific issue when calling instance method with self::
2016-12-31 09:20:10 -05:00
Matthew Brown
f515327f16
Fix file_name/file_path mixup
2016-12-30 19:06:45 -05:00
Matthew Brown
c65a0bf181
Move function static arrays into FileStorage
2016-12-30 18:08:07 -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
18e7c65430
Emit more InvalidOperand issues
2016-12-29 00:14:06 -05:00
Matthew Brown
c55870e26c
Allow generic TypeChecker::isContainedBy checks
2016-12-24 18:28:43 +00: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
1b8abc8f17
Change NullReference issue to NullArgument when in method call
2016-12-14 12:54:34 -05:00
Matt Brown
154d023a9d
Add more robust config testing
2016-12-14 12:28:38 -05:00
Matthew Brown
592ee98efc
Fix bugs discovered by adding more tests
2016-12-11 23:40:46 -05:00
Matthew Brown
562f71b21f
Add TypeDoesNotContainType issue and fix those issues in Psalm code
2016-12-11 13:48:11 -05:00
Matt Brown
eff98bfe00
Ignore nullrefs when using echo
2016-12-09 18:53:26 -05:00
Matt Brown
30159d8f70
Ignore invalid scalar argument issue in echo
2016-12-09 12:53:22 -05:00
Matt Brown
b3106c68bb
Fix #6 - raise error with erroneous __toString
2016-12-09 12:48:02 -05:00
Matt Brown
260a6d4df5
Make class errors more specific
2016-12-08 17:15:51 -05:00
Matt Brown
55a060b53a
Add support for closure checks
2016-12-07 14:13:39 -05:00
Matthew Brown
ef1049224d
Add selection of return types in code preview
2016-12-06 16:33:47 -05:00
Matthew Brown
60e15c255b
Add support for gettype switch statements too
2016-12-06 13:51:03 -05:00
Matthew Brown
35802ccaa6
Don't totally panic when encountering invalid argument error
2016-12-04 18:42:20 -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
5a9f99c24e
Fix namespacing issues in PHP 5.6
2016-11-20 21:49:06 -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
7df4d74a7b
Fix Psalm errors
2016-11-04 21:14:04 -04:00
Jon Ursenbach
27c2db1d1d
PSR-2
2016-11-02 17:50:54 -04:00
Matthew Brown
88eb43e9ca
Break out ExpressionChecker
2016-11-01 14:14:41 -04:00