vscode-intelephense
vscode-intelephense copied to clipboard
Expected 1 arguments. Found 0.intelephense(1005)
Describe the bug
When writing Class with no constructor, "Expected 1 arguments. Found 0.intelephense(1005)" is made if the first method has one or more parameters.
To Reproduce
<?php
class Test{
public function factorial($num){
echo array_product(range(1,$num));
}
}
$num=10;
$test_instance=new Test();
$test_instance->factorial($num);
?>
Expected behavior
No warning or error.
Screenshot
Platform and version
- macOS Big Sur 11.6
- Intelephense v1.8.2
May be intelephense index cache issue, reindexing might fix it. Command panel > Intelephense: Index workspace
@tianyiw2013 Thank you for your advice. I tried it based on your advice, but it didn't work...
As a result of my further research, the problem of the above picture is made by Intelephense index cache issue. However, if I change Test to Test10, it is left as the above picture shows...
I have a same problem. Any new information on the issue?