Skip to content

Add param type inferer based on passed arguments  #1887

@TomasVotruba

Description

@TomasVotruba
<?php // fix

class A {
-  public function takesString($s) : void {
+  public function takesString(string $s) : void {
    echo $s;
  }
}

(new A)->takesString("hello");

Inpised by https://psalm.dev/articles/psalm-3-and-a-half

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions