Skip to content

[] passed to method confused folding #8

@swekaj

Description

@swekaj

There appears to be a bug when there's a ([ ]) fold.

 function let(Config $config)
 {
     $config
         ->get(strtolower($this->module).'.buildable')
         ->willReturn([
             $this->classname,
             []
         ]);
     $config
         ->get(strtolower($this->nonexistentModule).'.buildable')
         ->willReturn([
             $this->nonexistantClassname,
             []
         ]);
     $config
         ->get(strtolower($this->moduleWithGoodConstruct).'.buildable')
         ->willReturn([
             $this->moduleWithGoodConstructClassname,
             [
                 'arg1',
                 'named' => 'arg'
             ]
         ]);
     $config
         ->get(strtolower($this->moduleWithBadConstruct).'.buildable')
         ->willReturn([
             $this->moduleWithBadConstructClassname,
             'badConstruct'
         ]);
     $this->beConstructedWith($config);
 }

resulted in

     function let(Config $config)
     {
         $config
             ->get(strtolower($this->module).'.buildable')
 +--- 27 lines:  ->willReturn([...}-----------------------------

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions