vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Expected 1 arguments. Found 0.intelephense(1005)

Open daikisuyama-fs opened this issue 2 years ago • 5 comments

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

Screenshot

Platform and version

  • macOS Big Sur 11.6
  • Intelephense v1.8.2

daikisuyama-fs avatar Apr 18 '22 08:04 daikisuyama-fs

May be intelephense index cache issue, reindexing might fix it. Command panel > Intelephense: Index workspace

tianyiw2013 avatar Apr 19 '22 01:04 tianyiw2013

@tianyiw2013 Thank you for your advice. I tried it based on your advice, but it didn't work...

daikisuyama-fs avatar Apr 19 '22 01:04 daikisuyama-fs

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...

daikisuyama-fs avatar Apr 20 '22 07:04 daikisuyama-fs

I have a same problem. Any new information on the issue?

Snimka zaslona 2023-05-15 001753

dark2po avatar May 14 '23 22:05 dark2po