1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 02:47:02 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Matt Brown
8325317e16 Fix #4674 - is_readable should be impure 2020-11-23 08:54:11 -05:00
Matt Brown
3bde327f1b Break up CommentAnalyzer 2020-11-04 23:25:08 -05:00
Matt Brown
b5a3f45d52 Remove use of PHP 7.2 function 2020-11-04 11:02:34 -05:00
Matt Brown
4aef96bbac Use lists everywhere for args 2020-10-28 12:45:26 -04:00
orklah
10f2966dcb
return types (#4311)
* return types

* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Brown
94ed53b25a func_num_args is pure
fixes #4215
2020-09-19 13:58:29 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
c13b0efd49 Improve understanding of negated count queries 2020-08-30 11:32:01 -04:00
Brown
efe143a396 Fix #4077 - always track closure purity 2020-08-28 12:42:55 -04:00
Matthew Brown
06c231fbba glob is impure 2020-08-23 13:41:43 -04:00
Matthew Brown
f6135bcefc Add more impure functions 2020-08-23 13:15:27 -04:00
SignpostMarv
9822043ca4
flag class_exists as impure per vimeo/psalm#3975 (#4004)
`class_exists()` interacts with PHP's autoloader feature, which allows
user-defined behaviour to take place when PHP tries to load a given
class or interface.
2020-08-17 15:48:48 -04:00
Gabriel Ostrolucký
81a117be85
Mark fgets impure (#4006)
This function is used to skip line of text
2020-08-17 15:48:28 -04:00
SignpostMarv
06d4b9d6dd
mark bcscale as impure, re: vimeo/psalm#3918 (#3926) 2020-08-03 10:15:59 -04:00
Brown
76bd5b6278 Refactor type comparison 2020-07-21 19:40:35 -04:00
Tyson Andre
f17a4911d5
Add more impure functions (#3814) 2020-07-14 17:14:09 -04:00
Brown
fbe3433edd Use escape terminology 2020-06-21 11:43:08 -04:00
Matthew Brown
081a284759 Fix #3567 - remember which variables a callable sets byref in use 2020-06-14 11:58:50 -04:00
Matthew Brown
a49a0e5650 Fix #3551 - count method can be impure 2020-06-14 11:06:53 -04:00
Gabriel Ostrolucký
8ca7a88c41
Mark fgetcsv impure (#3582)
fgetcsv standalone is used to skip current row for consecutive reads
2020-06-13 00:32:00 -04:00
Bruce Weirdan
a99f92ae3a
Fix vimeo/psalm#3572 (#3575)
session_decode has side effects
2020-06-13 00:28:56 -04:00
Brown
118b700436 Simplify sink mapping for internal calls 2020-05-25 13:10:06 -04:00
Brown
b62f646388 Fix #3391 - move_uploaded_file mutates 2020-05-18 16:26:08 -04:00
Brown
111303d913 Add non-empty-lowercase-string type 2020-05-15 10:18:05 -04:00
Brown
3e58163180 Prevent empty function id
Ref #3354
2020-05-12 12:54:06 -04:00
Brown
8f57d0c738 Fix #3204 - normalise function ids where possible 2020-04-20 21:38:35 -04:00
Brown
286c396498 Fix #3185 - allow ignore_user_abort calls 2020-04-19 13:19:18 -04:00
Philip Hofstetter
ab9c82e251 mark ftp_close as impure
in theory, all ftp_* functions are impure, but not marking them
encourages the good practice of checking the return value.

However, ftp_close(), while it's possible for it to fail, what good
would checking the return type do? How is one supposed to handle the
failure to close a stream in a way that affects future program flow?
2020-03-05 15:37:08 -05:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Matthew Brown
bbdb1254ad Add line break 2020-02-05 08:51:11 -05:00
Lars Moelleken
759cfe4555 add more impure function calls 2020-02-05 08:51:11 -05:00
Philip Hofstetter
5774cfed7d mark additional impure functions (#2699)
both `fflush` and `vprintf` have very similar cousins already declared
as having side-effects.

This fixes #2687
2020-01-27 08:12:40 -05:00
Brown
311164f5ee Fix #2679 - session_start is impure 2020-01-23 10:26:11 -05:00
Brown
7482b9e56f Emit all stubs discovered by Psalm during analysis
Fixes #827
2020-01-08 17:23:40 -05:00
Matthew Brown
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Brown
4be3180512 Add more impure functions 2019-11-13 13:22:04 -05:00
Matthew Brown
d0a9bf24f8 Void-returning functions are going to be impure 2019-10-13 09:51:25 -04:00
2e3s
a658566429 Add impure functions for mcrypt and iterator_apply (#2227) 2019-10-13 09:43:25 -04:00
Brown
09cf864d9b Mark preg_replace_callback as sometimes-pure 2019-10-11 13:54:33 -04:00
bugreportuser
d8855282c6 Add more impure functions (#2203) 2019-10-03 15:01:31 -04:00
Matthew Brown
81464d8dbf Fix #2179 - add gz* to list of impure functions 2019-09-27 09:50:33 -04:00
Brown
2fa0e05802 Fix #2169 - always use most immediate function storage when analysing 2019-09-25 18:48:41 -04:00
Matthew Brown
deb36e8b27 Allow array_map alone when it uses a closure 2019-09-09 21:28:56 -04:00
Brown
a6baa2d04c Allow callables to be understood as pure
Fixes #2112
2019-09-09 12:11:04 -04:00
Brown
21aa162d0a Make assert() pure
Fixes #2113
2019-09-09 10:43:10 -04:00
Matthew Brown
a032978a85 Use a better check for functional purity 2019-09-08 11:49:14 -04:00
Matthew Brown
3dbfedb51a Make purity test more strict again 2019-09-08 11:34:16 -04:00