KapitanOczywisty

Results 30 comments of KapitanOczywisty

Void function returns `null` and this is valid syntax. I'm not even sure if any static analysis tool has check like that.

> in what context would you ever want this behavior? I'm not sure if assigning `void` to variable is ever good solution, but PHP doesn't care about that, there are...

> Why does it show 50306 if i have configured php 8 ? It's statically defined in [stubs](https://github.com/JetBrains/phpstorm-stubs/blob/5ef8b38ef13f7f2a4f0dea87a8496da0fb7cf653/Core/Core_d.php#L173). You shouldn't rely on constant values showed in tooltips.

Dead code detection: #1718 I think this is a bad idea to have different function signature in different php versions (unless you're dealing with resource/object migration). Better is to keep...

@yozawiratama This is not the best solution but should work: ```ts class AttributedModel extends Model {} @Table export default class User extends AttributedModel { @PrimaryKey @Column id: number; @Column name:...

Would be great to specify expected callback's arguments/return types in `@param`, e.g. `@param callable(int):string`. Current link: https://psalm.dev/docs/annotating_code/type_syntax/callable_types/ As alternative there is also [php 7.4 arrow syntax](https://wiki.php.net/rfc/arrow_functions_v2) to consider, but existing...

> Another way to implement this could be via existing `@method` syntax to give the parameter a local type name. `@method` means something completely different already, If you want own...

@lublak In some cases I'm using interfaces and anonymous classes, It has some overhead, but helps with more complicated code. ```php class SomeData{ public string $whatever; } interface CallMeBackInterface {...

It's supported as far as ignoring some common formats. However if you copy type from anonymous function as `@param` it is suggesting correct types :D ```php // BAD CODE //...

@alex-kinokon nice to hear after a year that there is a problem with PR. @DojoEnglish I'm using patch-package to fix issues, which are ignored by author.