Philip Ardery

Results 206 comments of Philip Ardery

> Could there be a token check for `>{$.*}(` and `>$.*(` where `.*` get checked for two things: > > 1. does `$method` exist > 2. do `...$arg` types match...

thanks for the feedback and link @ondrejmirtes. Given you think its achievable, do you think it's worth re-opening this, or do you think it's not wise to implement it into...

I like the the `@phpstan-assert` suggestion in OP. It would be helpful for the following two functions: ``` /** * Return true is $variable is a float or is a...

I'm trying to figure out how phpstan-phpunit does it. For example, if I run a variable through `assertNotNull` first, phpstan knows it is not null thereafter. Maybe I could code...

You beat me to it @ondrejmirtes! I had just found https://phpstan.org/developing-extensions/type-specifying-extensions and was about to post it here, but you beat me :) Thanks!

> Plus, we get a lot of deprecation errors now though, since as of PHP 8.1, `ctype_digit` only accepts `string` and the return value of `get()` is `mixed`. This is...

I see there is `$request->request->getInt()`, which is helpful in reducing some excessive type checking code.

``` $commentNew = $request->request->get('value'); $message = "Updated comment: $commentNew"; ``` PHPSTAN ERROR: `phpstan: Part $commentNew (mixed) of encapsed string cannot be cast to string.`

hopefully the above clarifies @ondrejmirtes