Matthew Brown
5575ead4b2
Make get_called_class and get_class return class-string pseudotype
...
Fixes #584
2018-03-17 22:11:16 -04:00
Matt Brown
d6e0708e88
Fix #577 - allow int in second param of strpos
2018-03-15 17:32:03 -04:00
Matt Brown
822d0a116e
Reflect all numeric types passed to abs
...
Fixes #576
2018-03-14 18:05:36 -04:00
Bruce Weirdan
1dfd103aa2
ReflectionExtension type refinements
...
Added more detailed return types for ReflectionExtension methods, fixed
`isPersistent` method name
2018-03-13 13:53:40 -04:00
Matthew Brown
4074b3fff0
Fix ctype_xdigit
2018-03-05 23:20:55 -05:00
Matthew Brown
123f70fc52
All the ctype functions con take a string or an int
2018-03-05 23:19:12 -05:00
Matt Brown
9d165bee7b
Fix generic return type for array_map
...
Ref #541
2018-02-26 10:39:48 -05:00
Tyson Andre
eb69d55b29
Update documentation of void types in CallMap ( #504 )
...
The empty string is treated more like mixed
2018-02-09 00:31:25 -05:00
Tyson Andre
7bfd782d90
Make call map types slightly more specific (manually) ( #495 )
...
* Make call map types slightly more specific (manually)
* Address review comments
2018-02-07 10:17:18 -05:00
Tyson Andre
c7f3a3c445
Make types in the call map more specific ( #496 )
...
fix a few incorrect types.
2018-02-06 23:46:22 -05:00
Matthew Brown
1288915aba
Change number return type to numeric
...
cc @TysonAndre
2018-02-06 22:22:50 -05:00
Tyson Andre
0bc7ac11f1
Improve callmap with information from docs.php.net ( #494 )
...
* Update CallMap.php with information from docs.php.net
* Undo possibly inaccurate information from docs.php.net
* Fix bug in ReflectionMethod::invoke*() signature
http://php.net/manual/en/reflectionmethod.invoke.php had a misleading
method signature description section
2018-02-06 20:50:32 -05:00
Tyson Andre
5ac01abbe5
Fix a few signatures of Iterator classes for void
...
This was done automatically via sed.
Other types can be added in separate PRs
2018-02-05 17:16:49 -05:00
Matthew Brown
c05baf47ce
Fix more Reflection return types
2018-02-02 16:35:40 -05:00
Matthew Brown
b771658821
Fix Reflector::export return types in callmap
2018-02-02 15:28:39 -05:00
Matt Brown
1a2d13ae32
Ignore falsable issues from core functions
2018-01-25 13:07:36 -05:00
Matt Brown
f46cf729bb
Allow null checks against preg_replace and related
2018-01-24 17:07:03 -05:00
Matthew Brown
2b122cb80e
Fix compact call back
2018-01-15 21:01:29 -05:00
Matthew Brown
1d16f1e352
Update the callmap from Phan
2018-01-15 20:21:08 -05:00
Matthew Brown
14e7b75dbb
Fix bad formatting for ibase_query
2018-01-15 15:27:46 -05:00
Matthew Brown
db7b80d391
Fix ArrayIterator::setOffset param type
2018-01-12 23:46:11 -05:00
Matt Brown
9d63faf544
Fix SplFixedArray::toArray return type
2018-01-09 17:14:13 -05:00
Matthew Brown
8e4f8fabe3
Fix getenv calls
...
Fixes #386
2018-01-08 00:09:22 -05:00
Matthew Brown
3de584cbc1
Add more specific argument for ReflectionObject
2018-01-05 00:54:48 -05:00
Matthew Brown
51edeead84
Fix invalid Reflection methods
2018-01-05 00:26:51 -05:00
Matthew Brown
eefa4f925f
Improve Reflection class method return types
2018-01-04 20:13:09 -05:00
Matthew Brown
6e7bab58c4
Be better about inherited core method arg types
2018-01-04 18:58:03 -05:00
Matt Brown
24c69a9a7c
Allow all DateTime/DateTimeImmutable methods to return static
2018-01-03 10:53:45 -05:00
Matt Brown
ff5b2ce799
DateTimeImmutable::add/sub return static
...
Fixes #419
2018-01-03 10:35:22 -05:00
Matthew Brown
c0e923acb9
Update get_defined_functions to more recent signature
2017-12-29 22:57:02 -05:00
Matthew Brown
8efc939a5f
Move Psalm execution code into PHP file that Psalm can analyse
2017-12-29 17:02:56 -05:00
Tim van Dijen
4d0e775346
openssl_encrypt and _decrypt can return false ( #414 )
2017-12-29 04:26:53 +01:00
Matthew Brown
68a4f30e96
Fix realpath return type
...
Fixes #405
2017-12-19 12:55:43 -05:00
Matthew Brown
5f22203bd1
Fix #385 , fix return type of sodium function
2017-12-12 02:10:17 -05:00
Matt Brown
83c65d4b2d
Add DOMNodeList::item to callmap
2017-12-04 11:59:16 -05:00
Matthew Brown
7d003c5bc1
Fix erroneous treatment of or clauses in if statements
2017-12-03 16:25:52 -05:00
Matthew Brown
681da41f0f
Allow fsockopen to return false, fixes #353
2017-11-28 22:56:28 -05:00
Matthew Brown
4312ef380b
Fix issues found by improved Psalm checks
...
cc @TysonAndre, found with RedundantCondition checks
2017-11-24 12:10:30 -05:00
Matt Brown
6db3758b81
Fix #275 with bad sig
2017-11-09 15:36:21 -05:00
Matt Brown
6d14bf65d7
Loosen restrictions on compact(), fix #267
2017-11-08 09:37:58 -05:00
Matthew Brown
02dde911ce
Allow DateTimeImmutable::__construct arg to be nullable
2017-10-28 14:53:25 -04:00
Matthew Brown
323da5ce13
Add callmap updates from Phan
2017-10-28 14:02:33 -04:00
Matthew Brown
3f9bd530fd
Fix #262 - allow return type of simplexml functions to be false
2017-10-27 20:15:00 -04:00
Steffen Weber
30465518f7
Fix signature of "gmp_import"
...
According to the PHP manual, the second and third argument of "gmp_import" have default values and are therefore optional.
https://php.net/gmp_import
2017-10-25 09:12:20 -04:00
Matt Brown
0c33db0a3e
Fix #258 - tempnam can return false
2017-10-23 13:13:07 -04:00
Matthew Brown
2e00fb19ee
Fix #246 - amend return type for DateTime::createFromFormat
2017-10-16 00:47:48 -04:00
Bruce Weirdan
ed3e429d2c
s/'mixed'/''/g
2017-10-12 09:21:49 -04:00
Bruce Weirdan
52962db24c
Adjusted Closure methods signatures
...
This fixes the following false-positive:
```php
function a(): bool {
$a = function(): bool { return true; }
return $a->call(new stdClass);
}
```
where psalm previously complained about (wrongly) inferred type to be
Closure
2017-10-12 09:21:49 -04:00
Bruce Weirdan
f080e32ef0
Corrected case of Traversable typehints
...
Affected functions/methods:
* `iterator_apply()`
* `iterator_count()`
* `IteratorIterator::__construct()`
* `iterator_to_array()`
This fixes the following false-positive:
```php
class Iter extends IteratorIterator {
public function __construct(Traversable $a) {
parent::__construct($a);
}
}
```
where psalm previously wanted `parent::__construct()` argument to be
`traversable` (all-lowercase).
2017-10-12 08:49:24 -04:00
Matt Brown
ee655e6f33
Fix #218 - strings passed to format always return string
2017-09-22 10:18:44 -04:00